Exported PgCodec loses polymorphic information 
### Summary
Polymorphism is broken when using exported schemas. `polymorphic` isn't written to `PgCodec`s serialised by `graphile-export`/AST

### Steps to reproduce

Setup basic polymorphic schema 

```sql
DROP SCHEMA IF EXISTS "public" CASCADE;
CREATE SCHEMA IF NOT EXISTS "public";

CREATE TYPE event_type AS ENUM (
    'foo',
    'bar',
    'baz'
);

CREATE TABLE IF NOT EXISTS public.event_base (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    name TEXT NOT NULL,
    type event_type NOT NULL,

    foo_data TEXT,
    bar_data INT,
    baz_data UUID
);

COMMENT ON TABLE public.event_base IS $$
    @name EventBase
    @interface mode:single type:type
    @type foo name:EventFoo attributes: foo_data
    @type baz name:EventBaz attributes: baz_data
    @type bar name:EventBar attributes: bar_data
$$;

INSERT INTO public.event_base (name, type, foo_data, bar_data, baz_data)
VALUES
    ('Event 1', 'foo', 'foo data 1', NULL, NULL),
    ('Event 2', 'bar', NULL, 2, NULL),
    ('Event 3', 'baz', NULL, NULL, gen_random_uuid()),
    ('Event 4', 'foo', 'foo data 4', NULL, NULL),
    ('Event 5', 'bar', NULL, 5, NULL),
    ('Event 6', 'baz', NULL, NULL, gen_random_uuid());

```

# Results

```
query {
  allEventBases {
    nodes {
      name
      __typename
    }
  }
}
```

```
Masked GraphQL error (hash: 'OwOlEPayH3GtrgGwfwl2VInGl_Q', id: '4UKWDZ2MTC') Error: Query planning error: PgSelectSingle{2}<EventBase>[21]: Don't know how to plan this as polymorphic for EventFoo
    at OperationPlan.planOperation (/Users/dyl/dev/crystal-example/node_modules/grafast/dist/engine/OperationPlan.js:375:19)
```
### Additional context

Looking at `exported-schema.mjs`. It looks like the `polymorphic` property is missing entirely on the interface PgCodec:
```
const EventBaseCodec = recordCodec({
  name: "EventBase",
  identifier: sql.identifier("public", "event_base"),
  attributes: Object.assign(Object.create(null), {
    id: {
      description: undefined,
      codec: TYPES.uuid,
      notNull: true,
      hasDefault: true,
      extensions: {
        tags: {},
      },
    },
    name: {
      description: undefined,
      codec: TYPES.text,
      notNull: true,
      hasDefault: false,
      extensions: {
        tags: {
          behavior: ["-filterBy -orderBy"],
        },
      },
    },
    ...
  }),
  description: undefined,
  extensions: extensions2,
  executor,
});
```

### Possible Solution

https://github.com/graphile/crystal/blob/9e144962dba3e6682b98021486042b94e1412700/graphile-build/graphile-build-pg/src/plugins/PgCodecsPlugin.ts#L421-L464

PgCodecsPlugin defines the CodecSpec EXPORTABLE before running `pgCodecs_recordType_spec` hooks, which is when polymorphic info is added. I'm not entirely sure why this is a sperate `EXPORTABLE`. But from my testing removing EXPORTABLE from `spec` resolved it. 

```
          const spec: PgRecordTypeCodecSpec<any, any> = {
            name: codecName,
            identifier: sqlIdent,
            attributes,
            description,
            extensions,
            executor,
          };

          await info.process("pgCodecs_recordType_spec", {
            serviceName,
            pgClass,
            spec,
          });

          const codec = EXPORTABLE(
            (recordCodec, spec) => recordCodec(spec),
            [recordCodec, spec],
            `${spec.name}Codec`,
          );
          await info.process("pgCodecs_PgCodec", {
            pgCodec: codec,
            pgType: pgClass.getType()!,
            pgClass,
            serviceName,
          });
          return codec;
```

There are other issues with Polymorphism & exported schema. But by only exporting the registry and rebuilding the schema as you describe in #2017, i was able to perform the previous query.