graphile-build-pg 5.0.0-beta.19 → 5.0.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # graphile-build-pg
2
2
 
3
+ ## 5.0.0-beta.20
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1955](https://github.com/graphile/crystal/pull/1955)
8
+ [`6c6be29f1`](https://github.com/graphile/crystal/commit/6c6be29f12b24782c926b2bc62ed2ede09ac05de)
9
+ Thanks [@benjie](https://github.com/benjie)! - Steps are now prevented from
10
+ calling other steps' lifecycle methods. GRAPHILE_ENV is actively encouraged,
11
+ and falls back to NODE_ENV.
12
+
13
+ - [#1949](https://github.com/graphile/crystal/pull/1949)
14
+ [`179d25b09`](https://github.com/graphile/crystal/commit/179d25b09bb3272eeef564067b8e512d8de0112f)
15
+ Thanks [@benjie](https://github.com/benjie)! - Add support for registering
16
+ PgCodecs via plugins, add support for ltree type, improve error messages, no
17
+ longer need to set a gather namespace to use cache/state.
18
+
19
+ - [#1958](https://github.com/graphile/crystal/pull/1958)
20
+ [`8315e8d01`](https://github.com/graphile/crystal/commit/8315e8d01c118cebc4ebbc53a2f264b958b252ad)
21
+ Thanks [@benjie](https://github.com/benjie)! - EXPORTABLE now accepts a third
22
+ argument, `nameHint`, which is used to hint what variable name to use for the
23
+ given value. Used this in `graphile-export` along with some fixes and
24
+ optimizations to improve the exports further.
25
+ - Updated dependencies
26
+ [[`9f85c614d`](https://github.com/graphile/crystal/commit/9f85c614d48dc745c5fed15333dbb75af7fddc88),
27
+ [`6c6be29f1`](https://github.com/graphile/crystal/commit/6c6be29f12b24782c926b2bc62ed2ede09ac05de),
28
+ [`6c80c44b7`](https://github.com/graphile/crystal/commit/6c80c44b76a5eb30cc2b1555ba81a4b6236f4300),
29
+ [`179d25b09`](https://github.com/graphile/crystal/commit/179d25b09bb3272eeef564067b8e512d8de0112f),
30
+ [`8315e8d01`](https://github.com/graphile/crystal/commit/8315e8d01c118cebc4ebbc53a2f264b958b252ad),
31
+ [`9d53dde72`](https://github.com/graphile/crystal/commit/9d53dde726b7304962e921b88a159649e49156e5),
32
+ [`46d8289b4`](https://github.com/graphile/crystal/commit/46d8289b44ab10aea1ff3d2915184650d6896b81)]:
33
+ - @dataplan/pg@0.0.1-beta.17
34
+ - grafast@0.1.1-beta.6
35
+ - graphile-build@5.0.0-beta.16
36
+ - tamedevil@0.0.0-beta.6
37
+ - pg-introspection@0.0.1-beta.7
38
+
3
39
  ## 5.0.0-beta.19
4
40
 
5
41
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export { PgFirstLastBeforeAfterArgsPlugin } from "./plugins/PgFirstLastBeforeAft
16
16
  export { PgInterfaceModeUnionAllRowsPlugin } from "./plugins/PgInterfaceModeUnionAllRowsPlugin.js";
17
17
  export { PgIntrospectionPlugin } from "./plugins/PgIntrospectionPlugin.js";
18
18
  export { PgJWTPlugin } from "./plugins/PgJWTPlugin.js";
19
+ export { PgLtreePlugin } from "./plugins/PgLtreePlugin.js";
19
20
  export { PgMutationCreatePlugin } from "./plugins/PgMutationCreatePlugin.js";
20
21
  export { PgMutationPayloadEdgePlugin } from "./plugins/PgMutationPayloadEdgePlugin.js";
21
22
  export { PgMutationUpdateDeletePlugin } from "./plugins/PgMutationUpdateDeletePlugin.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,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BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withPgClientFromPgService = exports.getWithPgClientFromPgService = exports.version = exports.parseDatabaseIdentifiers = exports.parseDatabaseIdentifier = exports.addBehaviorToTags = exports.defaultPreset = exports.PgTypesPlugin = exports.PgTablesPlugin = exports.PgTableNodePlugin = exports.PgRowByUniquePlugin = exports.PgRelationsPlugin = exports.PgRegistryPlugin = exports.PgRBACPlugin = exports.PgProceduresPlugin = exports.PgPolymorphismPlugin = exports.PgOrderCustomFieldsPlugin = exports.PgOrderByPrimaryKeyPlugin = exports.PgOrderAllAttributesPlugin = exports.PgNodeIdAttributesPlugin = exports.PgMutationUpdateDeletePlugin = exports.PgMutationPayloadEdgePlugin = exports.PgMutationCreatePlugin = exports.PgJWTPlugin = exports.PgIntrospectionPlugin = exports.PgInterfaceModeUnionAllRowsPlugin = exports.PgFirstLastBeforeAfterArgsPlugin = exports.PgFakeConstraintsPlugin = exports.PgEnumTablesPlugin = exports.PgCustomTypeFieldPlugin = exports.PgConnectionTotalCountPlugin = exports.PgConnectionArgOrderByPlugin = exports.PgConnectionArgOrderByDefaultValuePlugin = exports.PgConditionCustomFieldsPlugin = exports.PgConditionArgumentPlugin = exports.PgCodecsPlugin = exports.PgBasicsPlugin = exports.PgAttributesPlugin = exports.PgAttributeDeprecationPlugin = exports.PgAllRowsPlugin = void 0;
3
+ exports.withPgClientFromPgService = exports.getWithPgClientFromPgService = exports.version = exports.parseDatabaseIdentifiers = exports.parseDatabaseIdentifier = exports.addBehaviorToTags = exports.defaultPreset = exports.PgTypesPlugin = exports.PgTablesPlugin = exports.PgTableNodePlugin = exports.PgRowByUniquePlugin = exports.PgRelationsPlugin = exports.PgRegistryPlugin = exports.PgRBACPlugin = exports.PgProceduresPlugin = exports.PgPolymorphismPlugin = exports.PgOrderCustomFieldsPlugin = exports.PgOrderByPrimaryKeyPlugin = exports.PgOrderAllAttributesPlugin = exports.PgNodeIdAttributesPlugin = exports.PgMutationUpdateDeletePlugin = exports.PgMutationPayloadEdgePlugin = exports.PgMutationCreatePlugin = exports.PgLtreePlugin = exports.PgJWTPlugin = exports.PgIntrospectionPlugin = exports.PgInterfaceModeUnionAllRowsPlugin = exports.PgFirstLastBeforeAfterArgsPlugin = exports.PgFakeConstraintsPlugin = exports.PgEnumTablesPlugin = exports.PgCustomTypeFieldPlugin = exports.PgConnectionTotalCountPlugin = exports.PgConnectionArgOrderByPlugin = exports.PgConnectionArgOrderByDefaultValuePlugin = exports.PgConditionCustomFieldsPlugin = exports.PgConditionArgumentPlugin = exports.PgCodecsPlugin = exports.PgBasicsPlugin = exports.PgAttributesPlugin = exports.PgAttributeDeprecationPlugin = exports.PgAllRowsPlugin = void 0;
4
4
  var PgAllRowsPlugin_js_1 = require("./plugins/PgAllRowsPlugin.js");
5
5
  Object.defineProperty(exports, "PgAllRowsPlugin", { enumerable: true, get: function () { return PgAllRowsPlugin_js_1.PgAllRowsPlugin; } });
6
6
  var PgAttributeDeprecationPlugin_js_1 = require("./plugins/PgAttributeDeprecationPlugin.js");
@@ -35,6 +35,8 @@ var PgIntrospectionPlugin_js_1 = require("./plugins/PgIntrospectionPlugin.js");
35
35
  Object.defineProperty(exports, "PgIntrospectionPlugin", { enumerable: true, get: function () { return PgIntrospectionPlugin_js_1.PgIntrospectionPlugin; } });
36
36
  var PgJWTPlugin_js_1 = require("./plugins/PgJWTPlugin.js");
37
37
  Object.defineProperty(exports, "PgJWTPlugin", { enumerable: true, get: function () { return PgJWTPlugin_js_1.PgJWTPlugin; } });
38
+ var PgLtreePlugin_js_1 = require("./plugins/PgLtreePlugin.js");
39
+ Object.defineProperty(exports, "PgLtreePlugin", { enumerable: true, get: function () { return PgLtreePlugin_js_1.PgLtreePlugin; } });
38
40
  var PgMutationCreatePlugin_js_1 = require("./plugins/PgMutationCreatePlugin.js");
39
41
  Object.defineProperty(exports, "PgMutationCreatePlugin", { enumerable: true, get: function () { return PgMutationCreatePlugin_js_1.PgMutationCreatePlugin; } });
40
42
  var PgMutationPayloadEdgePlugin_js_1 = require("./plugins/PgMutationPayloadEdgePlugin.js");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,mEAA+D;AAAtD,qHAAA,eAAe,OAAA;AACxB,6FAAyF;AAAhF,+IAAA,4BAA4B,OAAA;AACrC,yEAAqE;AAA5D,2HAAA,kBAAkB,OAAA;AAC3B,iEAA6D;AAApD,mHAAA,cAAc,OAAA;AACvB,iEAA6D;AAApD,mHAAA,cAAc,OAAA;AACvB,uFAAmF;AAA1E,yIAAA,yBAAyB,OAAA;AAClC,+FAA2F;AAAlF,iJAAA,6BAA6B,OAAA;AACtC,qHAAiH;AAAxG,uKAAA,wCAAwC,OAAA;AACjD,6FAAyF;AAAhF,+IAAA,4BAA4B,OAAA;AACrC,6FAAyF;AAAhF,+IAAA,4BAA4B,OAAA;AACrC,mFAA+E;AAAtE,qIAAA,uBAAuB,OAAA;AAChC,yEAAqE;AAA5D,2HAAA,kBAAkB,OAAA;AAC3B,mFAA+E;AAAtE,qIAAA,uBAAuB,OAAA;AAChC,qGAAiG;AAAxF,uJAAA,gCAAgC,OAAA;AACzC,uGAAmG;AAA1F,yJAAA,iCAAiC,OAAA;AAC1C,+EAA2E;AAAlE,iIAAA,qBAAqB,OAAA;AAC9B,2DAAuD;AAA9C,6GAAA,WAAW,OAAA;AACpB,iFAA6E;AAApE,mIAAA,sBAAsB,OAAA;AAC/B,2FAAuF;AAA9E,6IAAA,2BAA2B,OAAA;AACpC,6FAAyF;AAAhF,+IAAA,4BAA4B,OAAA;AACrC,qFAAiF;AAAxE,uIAAA,wBAAwB,OAAA;AACjC,yFAAqF;AAA5E,2IAAA,0BAA0B,OAAA;AACnC,uFAAmF;AAA1E,yIAAA,yBAAyB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AAyB,OAAA"}
@@ -44,6 +44,12 @@ declare global {
44
44
  };
45
45
  }
46
46
  interface GatherHooks {
47
+ pgCodecs_findPgCodec(event: {
48
+ serviceName: string;
49
+ pgCodec: PgCodec | null;
50
+ pgType: PgType;
51
+ typeModifier: string | number | null | undefined;
52
+ }): Promise<void> | void;
47
53
  pgCodecs_PgCodec(event: {
48
54
  serviceName: string;
49
55
  pgCodec: PgCodec;
@@ -1 +1 @@
1
- {"version":3,"file":"PgCodecsPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/PgCodecsPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAGhB,WAAW,EACX,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AAYtB,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAgBrE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,aAAa,CAAC;QACtB,UAAU,UAAU;YAClB,cAAc,CAAC,OAAO,EAAE;gBACtB,OAAO,EAAE,OAAO,CAAC;gBACjB,WAAW,EAAE,MAAM,CAAC;aACrB,GAAG,MAAM,CAAC;YAEX,aAAa,CAAC,OAAO,EAAE;gBAAE,MAAM,EAAE,MAAM,CAAC;gBAAC,WAAW,EAAE,MAAM,CAAA;aAAE,GAAG,MAAM,CAAC;YAExE,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAAC;YACvE,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;YACpE,SAAS,CACP,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,MAAM,CAAC;YACV,cAAc,CAAC,KAAK,EAAE;gBACpB,KAAK,E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AC;QACnB,UAAU,yBAAyB;YACjC,YAAY,CAAC,EAAE,MAAM,CAAC;SACvB;KACF;CACF;AAED,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,MA60C3C,CAAC"}
@@ -217,6 +217,8 @@ exports.PgCodecsPlugin = {
217
217
  };
218
218
  const executor = info.helpers.pgIntrospection.getExecutorForService(serviceName);
219
219
  const sqlIdent = info.helpers.pgBasics.identifier(nspName, className);
220
+ (0, utils_js_1.exportNameHint)(sqlIdent, `${codecName}Identifier`);
221
+ (0, utils_js_1.exportNameHint)(attributes, `${codecName}Attributes`);
220
222
  const spec = (0, graphile_build_1.EXPORTABLE)((attributes, codecName, description, executor, extensions, sqlIdent) => ({
221
223
  name: codecName,
222
224
  identifier: sqlIdent,
@@ -231,13 +233,13 @@ exports.PgCodecsPlugin = {
231
233
  executor,
232
234
  extensions,
233
235
  sqlIdent,
234
- ]);
236
+ ], `${codecName}CodecSpec`);
235
237
  await info.process("pgCodecs_recordType_spec", {
236
238
  serviceName,
237
239
  pgClass,
238
240
  spec,
239
241
  });
240
- const codec = (0, graphile_build_1.EXPORTABLE)((recordCodec, spec) => recordCodec(spec), [pg_1.recordCodec, spec]);
242
+ const codec = (0, graphile_build_1.EXPORTABLE)((recordCodec, spec) => recordCodec(spec), [pg_1.recordCodec, spec], `${spec.name}Codec`);
241
243
  await info.process("pgCodecs_PgCodec", {
242
244
  pgCodec: codec,
243
245
  pgType: pgClass.getType(),
@@ -263,47 +265,216 @@ exports.PgCodecsPlugin = {
263
265
  if (!type) {
264
266
  return null;
265
267
  }
266
- const citextExt = await info.helpers.pgIntrospection.getExtensionByName(serviceName, "citext");
267
- const hstoreExt = await info.helpers.pgIntrospection.getExtensionByName(serviceName, "hstore");
268
- const pgCatalog = await info.helpers.pgIntrospection.getNamespaceByName(serviceName, "pg_catalog");
269
- if (!pgCatalog) {
270
- return null;
271
- }
272
268
  // Class types are handled via getCodecFromClass (they have to add attributes)
273
269
  if (type.typtype === "c") {
274
270
  return info.helpers.pgCodecs.getCodecFromClass(serviceName, type.typrelid);
275
271
  }
276
- const codec = await (async () => {
277
- const namespace = await info.helpers.pgIntrospection.getNamespace(serviceName, type.typnamespace);
278
- if (!namespace) {
279
- throw new Error(`Could not get namespace '${type.typnamespace}'`);
280
- }
281
- const namespaceName = namespace.nspname;
282
- // For the standard pg_catalog types, we have standard handling.
283
- // (In v4 we used OIDs for this, but using the name is safer for PostgreSQL-likes.)
284
- if (type.typnamespace == pgCatalog._id) {
285
- const knownType = (0, pg_1.getCodecByPgCatalogTypeName)(type.typname);
286
- if (knownType) {
287
- return knownType;
288
- }
289
- }
290
- if (type.typname === "citext" &&
291
- type.typnamespace === citextExt?.extnamespace) {
292
- return pg_1.TYPES.citext;
293
- }
294
- else if (type.typname === "hstore" &&
295
- type.typnamespace === hstoreExt?.extnamespace) {
296
- return pg_1.TYPES.hstore;
297
- }
298
- // Enum type
299
- if (type.typtype === "e") {
300
- const enumValues = await info.helpers.pgIntrospection.getEnumsForType(serviceName, type._id);
301
- const typeName = type.typname;
302
- const codecName = info.inflection.typeCodecName({
303
- pgType: type,
272
+ const event = {
273
+ pgCodec: null,
274
+ pgType: type,
275
+ typeModifier,
276
+ serviceName,
277
+ };
278
+ await info.process("pgCodecs_findPgCodec", event);
279
+ if (event.pgCodec) {
280
+ const codec = event.pgCodec;
281
+ // Be careful not to call this for class codecs!
282
+ await info.process("pgCodecs_PgCodec", {
283
+ pgCodec: codec,
284
+ pgType: type,
285
+ serviceName,
286
+ });
287
+ return codec;
288
+ }
289
+ else {
290
+ console.dir(event);
291
+ console.warn(`Could not build PgCodec for '${type.getNamespace()?.nspname ?? "??"}.${type.typname}'; maybe you need a plugin implementing gather.hooks.pgCodecs_findPgCodec to add support.`);
292
+ return null;
293
+ }
294
+ })();
295
+ map.set(typeId, promise);
296
+ return promise;
297
+ },
298
+ },
299
+ hooks: {
300
+ async pgCodecs_findPgCodec(info, event) {
301
+ if (event.pgCodec) {
302
+ // Another plugin has already supplied a codec; skip
303
+ return;
304
+ }
305
+ const { serviceName, pgType: type, typeModifier } = event;
306
+ const namespace = type.getNamespace();
307
+ if (!namespace) {
308
+ throw new Error(`Could not get namespace '${type.typnamespace}'`);
309
+ }
310
+ const namespaceName = namespace.nspname;
311
+ const pgCatalog = await info.helpers.pgIntrospection.getNamespaceByName(serviceName, "pg_catalog");
312
+ if (!pgCatalog) {
313
+ return;
314
+ }
315
+ // For the standard pg_catalog types, we have standard handling.
316
+ // (In v4 we used OIDs for this, but using the name is safer for PostgreSQL-likes.)
317
+ if (type.typnamespace == pgCatalog._id) {
318
+ const knownType = (0, pg_1.getCodecByPgCatalogTypeName)(type.typname);
319
+ if (knownType) {
320
+ event.pgCodec = knownType;
321
+ return;
322
+ }
323
+ }
324
+ const citextExt = await info.helpers.pgIntrospection.getExtensionByName(serviceName, "citext");
325
+ const hstoreExt = await info.helpers.pgIntrospection.getExtensionByName(serviceName, "hstore");
326
+ if (type.typname === "citext" &&
327
+ type.typnamespace === citextExt?.extnamespace) {
328
+ event.pgCodec = pg_1.TYPES.citext;
329
+ return;
330
+ }
331
+ else if (type.typname === "hstore" &&
332
+ type.typnamespace === hstoreExt?.extnamespace) {
333
+ event.pgCodec = pg_1.TYPES.hstore;
334
+ return;
335
+ }
336
+ // Enum type
337
+ if (type.typtype === "e") {
338
+ const enumValues = await info.helpers.pgIntrospection.getEnumsForType(serviceName, type._id);
339
+ const typeName = type.typname;
340
+ const codecName = info.inflection.typeCodecName({
341
+ pgType: type,
342
+ serviceName,
343
+ });
344
+ const enumLabels = enumValues.map((e) => e.enumlabel);
345
+ const { tags, description } = type.getTagsAndDescription();
346
+ const extensions = {
347
+ oid: type._id,
348
+ pg: {
349
+ serviceName,
350
+ schemaName: type.getNamespace().nspname,
351
+ name: type.typname,
352
+ },
353
+ tags,
354
+ };
355
+ await info.process("pgCodecs_enumType_extensions", {
356
+ serviceName,
357
+ pgType: type,
358
+ extensions,
359
+ });
360
+ const sqlIdent = info.helpers.pgBasics.identifier(namespaceName, typeName);
361
+ event.pgCodec = (0, graphile_build_1.EXPORTABLE)((codecName, description, enumCodec, enumLabels, extensions, sqlIdent) => enumCodec({
362
+ name: codecName,
363
+ identifier: sqlIdent,
364
+ values: enumLabels,
365
+ description,
366
+ extensions,
367
+ }), [
368
+ codecName,
369
+ description,
370
+ pg_1.enumCodec,
371
+ enumLabels,
372
+ extensions,
373
+ sqlIdent,
374
+ ], `${codecName}Codec`);
375
+ return;
376
+ }
377
+ // Range type
378
+ if (type.typtype === "r") {
379
+ const range = await info.helpers.pgIntrospection.getRangeByType(serviceName, type._id);
380
+ if (!range) {
381
+ throw new Error(`Failed to get range entry related to '${type._id}'`);
382
+ }
383
+ const innerCodec = (await info.helpers.pgCodecs.getCodecFromType(serviceName, range.rngsubtype));
384
+ const namespaceName = namespace.nspname;
385
+ const typeName = type.typname;
386
+ if (!innerCodec) {
387
+ console.warn(`PgCodec could not build codec for '${namespaceName}.${typeName}', we don't know how to process the subtype`);
388
+ return;
389
+ }
390
+ const codecName = info.inflection.typeCodecName({
391
+ pgType: type,
392
+ serviceName,
393
+ });
394
+ const { tags, description } = type.getTagsAndDescription();
395
+ const extensions = {
396
+ oid: type._id,
397
+ pg: {
398
+ serviceName,
399
+ schemaName: type.getNamespace().nspname,
400
+ name: type.typname,
401
+ },
402
+ tags,
403
+ };
404
+ await info.process("pgCodecs_rangeOfCodec_extensions", {
405
+ serviceName,
406
+ pgType: type,
407
+ innerCodec,
408
+ extensions,
409
+ });
410
+ const sqlIdent = info.helpers.pgBasics.identifier(namespaceName, typeName);
411
+ event.pgCodec = (0, graphile_build_1.EXPORTABLE)((codecName, description, extensions, innerCodec, rangeOfCodec, sqlIdent) => rangeOfCodec(innerCodec, codecName, sqlIdent, {
412
+ description,
413
+ extensions,
414
+ }), [
415
+ codecName,
416
+ description,
417
+ extensions,
418
+ innerCodec,
419
+ pg_1.rangeOfCodec,
420
+ sqlIdent,
421
+ ], `${codecName}Codec`);
422
+ return;
423
+ }
424
+ // Domains are wrappers under an underlying type
425
+ if (type.typtype === "d") {
426
+ const { typnotnull: notNull, typbasetype: baseTypeOid, typtypmod: baseTypeModifier, typndims: _numberOfArrayDimensions, typcollation: _domainCollation, typdefaultbin: _defaultValueNodeTree, } = type;
427
+ const innerCodec = baseTypeOid
428
+ ? await info.helpers.pgCodecs.getCodecFromType(serviceName, baseTypeOid, baseTypeModifier)
429
+ : null;
430
+ const namespaceName = namespace.nspname;
431
+ const typeName = type.typname;
432
+ if (innerCodec) {
433
+ const { tags, description } = type.getTagsAndDescription();
434
+ const extensions = {
435
+ oid: type._id,
436
+ pg: {
304
437
  serviceName,
305
- });
306
- const enumLabels = enumValues.map((e) => e.enumlabel);
438
+ schemaName: type.getNamespace().nspname,
439
+ name: type.typname,
440
+ },
441
+ tags,
442
+ };
443
+ await info.process("pgCodecs_domainOfCodec_extensions", {
444
+ serviceName,
445
+ pgType: type,
446
+ innerCodec,
447
+ extensions,
448
+ });
449
+ const codecName = info.inflection.typeCodecName({
450
+ pgType: type,
451
+ serviceName,
452
+ });
453
+ const sqlIdent = info.helpers.pgBasics.identifier(namespaceName, typeName);
454
+ (0, utils_js_1.exportNameHint)(sqlIdent, `${codecName}Identifier`);
455
+ event.pgCodec = (0, graphile_build_1.EXPORTABLE)((codecName, description, domainOfCodec, extensions, innerCodec, notNull, sqlIdent) => domainOfCodec(innerCodec, codecName, sqlIdent, {
456
+ description,
457
+ extensions,
458
+ notNull,
459
+ }), [
460
+ codecName,
461
+ description,
462
+ pg_1.domainOfCodec,
463
+ extensions,
464
+ innerCodec,
465
+ notNull,
466
+ sqlIdent,
467
+ ], `${codecName}Codec`);
468
+ return;
469
+ }
470
+ }
471
+ // Array types are just listOfCodec() of their inner type
472
+ if (type.typcategory === "A") {
473
+ const innerType = await info.helpers.pgIntrospection.getTypeByArray(serviceName, type._id);
474
+ if (innerType) {
475
+ const innerCodec = (await info.helpers.pgCodecs.getCodecFromType(serviceName, innerType._id, typeModifier));
476
+ if (innerCodec) {
477
+ const typeDelim = innerType.typdelim;
307
478
  const { tags, description } = type.getTagsAndDescription();
308
479
  const extensions = {
309
480
  oid: type._id,
@@ -314,182 +485,36 @@ exports.PgCodecsPlugin = {
314
485
  },
315
486
  tags,
316
487
  };
317
- await info.process("pgCodecs_enumType_extensions", {
488
+ await info.process("pgCodecs_listOfCodec_extensions", {
318
489
  serviceName,
319
490
  pgType: type,
491
+ innerCodec,
320
492
  extensions,
321
493
  });
322
- const sqlIdent = info.helpers.pgBasics.identifier(namespaceName, typeName);
323
- return (0, graphile_build_1.EXPORTABLE)((codecName, description, enumCodec, enumLabels, extensions, sqlIdent) => enumCodec({
324
- name: codecName,
325
- identifier: sqlIdent,
326
- values: enumLabels,
327
- description,
328
- extensions,
329
- }), [
330
- codecName,
331
- description,
332
- pg_1.enumCodec,
333
- enumLabels,
334
- extensions,
335
- sqlIdent,
336
- ]);
337
- }
338
- // Range type
339
- if (type.typtype === "r") {
340
- const range = await info.helpers.pgIntrospection.getRangeByType(serviceName, type._id);
341
- if (!range) {
342
- throw new Error(`Failed to get range entry related to '${type._id}'`);
343
- }
344
- const innerCodec = (await info.helpers.pgCodecs.getCodecFromType(serviceName, range.rngsubtype));
345
- const namespaceName = namespace.nspname;
346
- const typeName = type.typname;
347
- if (!innerCodec) {
348
- console.warn(`PgCodec could not build codec for '${namespaceName}.${typeName}', we don't know how to process the subtype`);
349
- return null;
350
- }
351
- const codecName = info.inflection.typeCodecName({
494
+ const name = info.inflection.typeCodecName({
352
495
  pgType: type,
353
496
  serviceName,
354
497
  });
355
- const { tags, description } = type.getTagsAndDescription();
356
- const extensions = {
357
- oid: type._id,
358
- pg: {
359
- serviceName,
360
- schemaName: type.getNamespace().nspname,
361
- name: type.typname,
362
- },
363
- tags,
364
- };
365
- await info.process("pgCodecs_rangeOfCodec_extensions", {
366
- serviceName,
367
- pgType: type,
368
- innerCodec,
498
+ (0, utils_js_1.exportNameHint)(extensions, `${name}CodecExtensions`);
499
+ event.pgCodec = (0, graphile_build_1.EXPORTABLE)((description, extensions, innerCodec, listOfCodec, name, typeDelim) => listOfCodec(innerCodec, {
369
500
  extensions,
370
- });
371
- const sqlIdent = info.helpers.pgBasics.identifier(namespaceName, typeName);
372
- return (0, graphile_build_1.EXPORTABLE)((codecName, description, extensions, innerCodec, rangeOfCodec, sqlIdent) => rangeOfCodec(innerCodec, codecName, sqlIdent, {
501
+ typeDelim,
373
502
  description,
374
- extensions,
503
+ name,
375
504
  }), [
376
- codecName,
377
505
  description,
378
506
  extensions,
379
507
  innerCodec,
380
- pg_1.rangeOfCodec,
381
- sqlIdent,
382
- ]);
383
- }
384
- // Domains are wrappers under an underlying type
385
- if (type.typtype === "d") {
386
- const { typnotnull: notNull, typbasetype: baseTypeOid, typtypmod: baseTypeModifier, typndims: _numberOfArrayDimensions, typcollation: _domainCollation, typdefaultbin: _defaultValueNodeTree, } = type;
387
- const innerCodec = baseTypeOid
388
- ? await info.helpers.pgCodecs.getCodecFromType(serviceName, baseTypeOid, baseTypeModifier)
389
- : null;
390
- const namespaceName = namespace.nspname;
391
- const typeName = type.typname;
392
- if (innerCodec) {
393
- const { tags, description } = type.getTagsAndDescription();
394
- const extensions = {
395
- oid: type._id,
396
- pg: {
397
- serviceName,
398
- schemaName: type.getNamespace().nspname,
399
- name: type.typname,
400
- },
401
- tags,
402
- };
403
- await info.process("pgCodecs_domainOfCodec_extensions", {
404
- serviceName,
405
- pgType: type,
406
- innerCodec,
407
- extensions,
408
- });
409
- const codecName = info.inflection.typeCodecName({
410
- pgType: type,
411
- serviceName,
412
- });
413
- const sqlIdent = info.helpers.pgBasics.identifier(namespaceName, typeName);
414
- return (0, graphile_build_1.EXPORTABLE)((codecName, description, domainOfCodec, extensions, innerCodec, notNull, sqlIdent) => domainOfCodec(innerCodec, codecName, sqlIdent, {
415
- description,
416
- extensions,
417
- notNull,
418
- }), [
419
- codecName,
420
- description,
421
- pg_1.domainOfCodec,
422
- extensions,
423
- innerCodec,
424
- notNull,
425
- sqlIdent,
426
- ]);
427
- }
428
- }
429
- // Array types are just listOfCodec() of their inner type
430
- if (type.typcategory === "A") {
431
- const innerType = await info.helpers.pgIntrospection.getTypeByArray(serviceName, type._id);
432
- if (innerType) {
433
- const innerCodec = (await info.helpers.pgCodecs.getCodecFromType(serviceName, innerType._id, typeModifier));
434
- if (innerCodec) {
435
- const typeDelim = innerType.typdelim;
436
- const { tags, description } = type.getTagsAndDescription();
437
- const extensions = {
438
- oid: type._id,
439
- pg: {
440
- serviceName,
441
- schemaName: type.getNamespace().nspname,
442
- name: type.typname,
443
- },
444
- tags,
445
- };
446
- await info.process("pgCodecs_listOfCodec_extensions", {
447
- serviceName,
448
- pgType: type,
449
- innerCodec,
450
- extensions,
451
- });
452
- const name = info.inflection.typeCodecName({
453
- pgType: type,
454
- serviceName,
455
- });
456
- return (0, graphile_build_1.EXPORTABLE)((description, extensions, innerCodec, listOfCodec, name, typeDelim) => listOfCodec(innerCodec, {
457
- extensions,
458
- typeDelim,
459
- description,
460
- name,
461
- }), [
462
- description,
463
- extensions,
464
- innerCodec,
465
- pg_1.listOfCodec,
466
- name,
467
- typeDelim,
468
- ]);
469
- }
470
- }
471
- console.warn(`Could not build PgCodec for '${namespaceName}.${type.typname}' due to issue with getting codec for underlying type`);
472
- return null;
508
+ pg_1.listOfCodec,
509
+ name,
510
+ typeDelim,
511
+ ], `${name}Codec`);
512
+ return;
473
513
  }
474
- // TODO: basic type support
475
- console.warn(`Don't understand how to build type for ${type.typname}`);
476
- return null;
477
- })();
478
- if (codec) {
479
- // Be careful not to call this for class codecs!
480
- await info.process("pgCodecs_PgCodec", {
481
- pgCodec: codec,
482
- pgType: type,
483
- serviceName,
484
- });
485
514
  }
486
- return codec;
487
- })();
488
- map.set(typeId, promise);
489
- return promise;
515
+ return;
516
+ }
490
517
  },
491
- },
492
- hooks: {
493
518
  async pgRegistry_PgRegistryBuilder_pgCodecs(info, event) {
494
519
  const { registryBuilder } = event;
495
520
  const codecs = new Set();
@@ -923,7 +948,7 @@ exports.PgCodecsPlugin = {
923
948
  else {
924
949
  // We have no idea what this is or how to handle it.
925
950
  // TODO: add some default handling, like "behavesLike = TYPES.text"?
926
- console.warn(`PgCodec '${codec.name}' not understood, please set 'domainOfCodec' to indicate the underlying behaviour the type should have when exposed to GraphQL`);
951
+ console.warn(`Do not know how to convert PgCodec '${codec.name}' into a GraphQL type; please use \`build.setGraphQLTypeForPgCodec(codec, mode, typeName)\` inside \`plugin.schema.hooks.init\` for each mode/typeName combo you want to support.`);
927
952
  }
928
953
  }
929
954
  const visited = new Set();