postgraphile 4.13.0 → 5.0.0-0.10

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.
Files changed (134) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/LICENSE.md +15 -20
  3. package/README.md +15 -170
  4. package/dist/cli-run.d.ts +3 -0
  5. package/dist/cli-run.d.ts.map +1 -0
  6. package/dist/cli-run.js +7 -0
  7. package/dist/cli-run.js.map +1 -0
  8. package/dist/cli.d.ts +21 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +199 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/index.d.ts +14 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +88 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/plugins/PgV4BehaviorPlugin.d.ts +11 -0
  17. package/dist/plugins/PgV4BehaviorPlugin.d.ts.map +1 -0
  18. package/dist/plugins/PgV4BehaviorPlugin.js +73 -0
  19. package/dist/plugins/PgV4BehaviorPlugin.js.map +1 -0
  20. package/dist/plugins/PgV4InflectionPlugin.d.ts +11 -0
  21. package/dist/plugins/PgV4InflectionPlugin.d.ts.map +1 -0
  22. package/dist/plugins/PgV4InflectionPlugin.js +91 -0
  23. package/dist/plugins/PgV4InflectionPlugin.js.map +1 -0
  24. package/dist/plugins/PgV4NoIgnoreIndexes.d.ts +2 -0
  25. package/dist/plugins/PgV4NoIgnoreIndexes.d.ts.map +1 -0
  26. package/dist/plugins/PgV4NoIgnoreIndexes.js +72 -0
  27. package/dist/plugins/PgV4NoIgnoreIndexes.js.map +1 -0
  28. package/dist/plugins/PgV4SmartTagsPlugin.d.ts +11 -0
  29. package/dist/plugins/PgV4SmartTagsPlugin.d.ts.map +1 -0
  30. package/dist/plugins/PgV4SmartTagsPlugin.js +190 -0
  31. package/dist/plugins/PgV4SmartTagsPlugin.js.map +1 -0
  32. package/dist/presets/amber.d.ts +5 -0
  33. package/dist/presets/amber.d.ts.map +1 -0
  34. package/dist/presets/amber.js +38 -0
  35. package/dist/presets/amber.js.map +1 -0
  36. package/dist/presets/v4.d.ts +34 -0
  37. package/dist/presets/v4.d.ts.map +1 -0
  38. package/dist/presets/v4.js +142 -0
  39. package/dist/presets/v4.js.map +1 -0
  40. package/dist/schema.d.ts +34 -0
  41. package/dist/schema.d.ts.map +1 -0
  42. package/dist/schema.js +82 -0
  43. package/dist/schema.js.map +1 -0
  44. package/package.json +79 -154
  45. package/build/assets/favicon.ico.d.ts +0 -3
  46. package/build/assets/favicon.ico.js +0 -6
  47. package/build/assets/graphiql.html.d.ts +0 -2
  48. package/build/assets/graphiql.html.js +0 -6
  49. package/build/index.d.ts +0 -8
  50. package/build/index.js +0 -34
  51. package/build/interfaces.d.ts +0 -163
  52. package/build/interfaces.js +0 -3
  53. package/build/plugins.d.ts +0 -3
  54. package/build/plugins.js +0 -53
  55. package/build/postgraphile/cli.d.ts +0 -3
  56. package/build/postgraphile/cli.js +0 -541
  57. package/build/postgraphile/extendedFormatError.d.ts +0 -9
  58. package/build/postgraphile/extendedFormatError.js +0 -51
  59. package/build/postgraphile/http/createPostGraphileHttpRequestHandler.d.ts +0 -11
  60. package/build/postgraphile/http/createPostGraphileHttpRequestHandler.js +0 -976
  61. package/build/postgraphile/http/frameworks.d.ts +0 -110
  62. package/build/postgraphile/http/frameworks.js +0 -258
  63. package/build/postgraphile/http/liveSubscribe.d.ts +0 -22
  64. package/build/postgraphile/http/liveSubscribe.js +0 -89
  65. package/build/postgraphile/http/mapAsyncIterator.d.ts +0 -15
  66. package/build/postgraphile/http/mapAsyncIterator.js +0 -71
  67. package/build/postgraphile/http/setupServerSentEvents.d.ts +0 -9
  68. package/build/postgraphile/http/setupServerSentEvents.js +0 -51
  69. package/build/postgraphile/http/subscriptions.d.ts +0 -7
  70. package/build/postgraphile/http/subscriptions.js +0 -411
  71. package/build/postgraphile/index.d.ts +0 -5
  72. package/build/postgraphile/index.js +0 -14
  73. package/build/postgraphile/pluginHook.d.ts +0 -104
  74. package/build/postgraphile/pluginHook.js +0 -100
  75. package/build/postgraphile/postgraphile.d.ts +0 -20
  76. package/build/postgraphile/postgraphile.js +0 -332
  77. package/build/postgraphile/postgraphilerc.d.ts +0 -2
  78. package/build/postgraphile/postgraphilerc.js +0 -16
  79. package/build/postgraphile/schema/exportPostGraphileSchema.d.ts +0 -6
  80. package/build/postgraphile/schema/exportPostGraphileSchema.js +0 -45
  81. package/build/postgraphile/shutdownActions.d.ts +0 -41
  82. package/build/postgraphile/shutdownActions.js +0 -87
  83. package/build/postgraphile/withPostGraphileContext.d.ts +0 -55
  84. package/build/postgraphile/withPostGraphileContext.js +0 -457
  85. package/build/postgres/inventory/pgClientFromContext.d.ts +0 -8
  86. package/build/postgres/inventory/pgClientFromContext.js +0 -21
  87. package/build-turbo/assets/favicon.ico.d.ts +0 -3
  88. package/build-turbo/assets/favicon.ico.js +0 -6
  89. package/build-turbo/assets/graphiql.html.d.ts +0 -2
  90. package/build-turbo/assets/graphiql.html.js +0 -6
  91. package/build-turbo/index.d.ts +0 -8
  92. package/build-turbo/index.js +0 -34
  93. package/build-turbo/interfaces.d.ts +0 -163
  94. package/build-turbo/interfaces.js +0 -3
  95. package/build-turbo/plugins.d.ts +0 -3
  96. package/build-turbo/plugins.js +0 -53
  97. package/build-turbo/postgraphile/cli.d.ts +0 -3
  98. package/build-turbo/postgraphile/cli.js +0 -572
  99. package/build-turbo/postgraphile/extendedFormatError.d.ts +0 -9
  100. package/build-turbo/postgraphile/extendedFormatError.js +0 -61
  101. package/build-turbo/postgraphile/http/createPostGraphileHttpRequestHandler.d.ts +0 -11
  102. package/build-turbo/postgraphile/http/createPostGraphileHttpRequestHandler.js +0 -984
  103. package/build-turbo/postgraphile/http/frameworks.d.ts +0 -110
  104. package/build-turbo/postgraphile/http/frameworks.js +0 -258
  105. package/build-turbo/postgraphile/http/liveSubscribe.d.ts +0 -22
  106. package/build-turbo/postgraphile/http/liveSubscribe.js +0 -89
  107. package/build-turbo/postgraphile/http/mapAsyncIterator.d.ts +0 -15
  108. package/build-turbo/postgraphile/http/mapAsyncIterator.js +0 -71
  109. package/build-turbo/postgraphile/http/setupServerSentEvents.d.ts +0 -9
  110. package/build-turbo/postgraphile/http/setupServerSentEvents.js +0 -51
  111. package/build-turbo/postgraphile/http/subscriptions.d.ts +0 -7
  112. package/build-turbo/postgraphile/http/subscriptions.js +0 -410
  113. package/build-turbo/postgraphile/index.d.ts +0 -5
  114. package/build-turbo/postgraphile/index.js +0 -14
  115. package/build-turbo/postgraphile/pluginHook.d.ts +0 -104
  116. package/build-turbo/postgraphile/pluginHook.js +0 -100
  117. package/build-turbo/postgraphile/postgraphile.d.ts +0 -20
  118. package/build-turbo/postgraphile/postgraphile.js +0 -337
  119. package/build-turbo/postgraphile/postgraphilerc.d.ts +0 -2
  120. package/build-turbo/postgraphile/postgraphilerc.js +0 -16
  121. package/build-turbo/postgraphile/schema/exportPostGraphileSchema.d.ts +0 -6
  122. package/build-turbo/postgraphile/schema/exportPostGraphileSchema.js +0 -45
  123. package/build-turbo/postgraphile/shutdownActions.d.ts +0 -41
  124. package/build-turbo/postgraphile/shutdownActions.js +0 -87
  125. package/build-turbo/postgraphile/withPostGraphileContext.d.ts +0 -55
  126. package/build-turbo/postgraphile/withPostGraphileContext.js +0 -466
  127. package/build-turbo/postgres/inventory/pgClientFromContext.d.ts +0 -8
  128. package/build-turbo/postgres/inventory/pgClientFromContext.js +0 -21
  129. package/cli.js +0 -6
  130. package/index.js +0 -5
  131. package/isTurbo.js +0 -11
  132. package/plugins.d.ts +0 -1
  133. package/plugins.js +0 -5
  134. package/sponsors.json +0 -151
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.postgraphilePresetAmber = exports.orderedPlugins = void 0;
4
+ require("graphile-config");
5
+ const graphile_build_1 = require("graphile-build");
6
+ const graphile_build_pg_1 = require("graphile-build-pg");
7
+ // Shunts the plugins into an order that's more compatible with PostGraphile V4.
8
+ exports.orderedPlugins = {
9
+ plugins: [
10
+ graphile_build_1.QueryQueryPlugin,
11
+ graphile_build_pg_1.PgBasicsPlugin,
12
+ graphile_build_pg_1.PgCodecsPlugin,
13
+ graphile_build_pg_1.PgTypesPlugin,
14
+ graphile_build_pg_1.PgIntrospectionPlugin,
15
+ graphile_build_pg_1.PgTablesPlugin,
16
+ graphile_build_1.AddNodeInterfaceToSuitableTypesPlugin,
17
+ graphile_build_1.NodePlugin,
18
+ graphile_build_pg_1.PgAllRowsPlugin,
19
+ graphile_build_pg_1.PgRowByUniquePlugin,
20
+ graphile_build_pg_1.PgColumnsPlugin,
21
+ graphile_build_1.MutationPayloadQueryPlugin,
22
+ graphile_build_pg_1.PgRelationsPlugin,
23
+ graphile_build_pg_1.PgMutationCreatePlugin,
24
+ graphile_build_pg_1.PgMutationUpdateDeletePlugin,
25
+ graphile_build_pg_1.PgCustomTypeFieldPlugin,
26
+ graphile_build_1.NodeAccessorPlugin,
27
+ graphile_build_pg_1.PgOrderAllColumnsPlugin,
28
+ graphile_build_pg_1.PgOrderCustomFieldsPlugin,
29
+ graphile_build_pg_1.PgOrderByPrimaryKeyPlugin,
30
+ graphile_build_pg_1.PgMutationPayloadEdgePlugin,
31
+ ],
32
+ };
33
+ exports.postgraphilePresetAmber = {
34
+ extends: [exports.orderedPlugins, graphile_build_1.defaultPreset, graphile_build_pg_1.defaultPreset],
35
+ plugins: [graphile_build_1.SwallowErrorsPlugin],
36
+ };
37
+ exports.default = exports.postgraphilePresetAmber;
38
+ //# sourceMappingURL=amber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amber.js","sourceRoot":"","sources":["../../src/presets/amber.ts"],"names":[],"mappings":";;;AAAA,2BAAyB;AAEzB,mDAQwB;AACxB,yDAkB2B;AAE3B,gFAAgF;AACnE,QAAA,cAAc,GAA0B;IACnD,OAAO,EAAE;QACP,iCAAgB;QAChB,kCAAc;QACd,kCAAc;QACd,iCAAa;QACb,yCAAqB;QACrB,kCAAc;QACd,sDAAqC;QACrC,2BAAU;QACV,mCAAe;QACf,uCAAmB;QACnB,mCAAe;QACf,2CAA0B;QAC1B,qCAAiB;QACjB,0CAAsB;QACtB,gDAA4B;QAC5B,2CAAuB;QACvB,mCAAkB;QAClB,2CAAuB;QACvB,6CAAyB;QACzB,6CAAyB;QACzB,+CAA2B;KAC5B;CACF,CAAC;AAEW,QAAA,uBAAuB,GAA0B;IAC5D,OAAO,EAAE,CAAC,sBAAc,EAAE,8BAAmB,EAAE,iCAAqB,CAAC;IACrE,OAAO,EAAE,CAAC,oCAAmB,CAAC;CAC/B,CAAC;AAEF,kBAAe,+BAAuB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /// <reference types="node" />
2
+ import "graphile-config";
3
+ import type { IncomingMessage, ServerResponse } from "http";
4
+ declare type PromiseOrDirect<T> = T | Promise<T>;
5
+ declare type DirectOrCallback<Request, T> = T | ((req: Request) => PromiseOrDirect<T>);
6
+ export interface V4GraphileBuildOptions {
7
+ pgUseCustomNetworkScalars?: boolean;
8
+ }
9
+ export interface V4Options<Request extends IncomingMessage = IncomingMessage, Response extends ServerResponse = ServerResponse> {
10
+ simpleCollections?: "both" | "only" | "omit";
11
+ classicIds?: boolean;
12
+ setofFunctionsContainNulls?: boolean;
13
+ dynamicJson?: boolean;
14
+ jwtPgTypeIdentifier?: string;
15
+ jwtSecret?: string;
16
+ disableDefaultMutations?: boolean;
17
+ ignoreIndexes?: boolean;
18
+ appendPlugins?: GraphileConfig.Plugin[];
19
+ skipPlugins?: GraphileConfig.Plugin[];
20
+ /** @deprecated Please use grafast.context 'pgSettings' key instead */
21
+ pgSettings?: DirectOrCallback<Request, {
22
+ [key: string]: string | undefined;
23
+ }>;
24
+ allowExplain?: DirectOrCallback<Request, boolean>;
25
+ /** @deprecated Please use grafast.context callback instead */
26
+ additionalGraphQLContextFromRequest?: (req: Request, res: Response) => Promise<Record<string, any>>;
27
+ subscriptions?: boolean;
28
+ ignoreRBAC?: boolean;
29
+ graphileBuildOptions?: V4GraphileBuildOptions;
30
+ }
31
+ export declare const makeV4Preset: (options?: V4Options) => GraphileConfig.Preset;
32
+ declare const _default: GraphileConfig.Preset;
33
+ export default _default;
34
+ //# sourceMappingURL=v4.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v4.d.ts","sourceRoot":"","sources":["../../src/presets/v4.ts"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAO5D,aAAK,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AACzC,aAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACrC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,SAAS,CACxB,OAAO,SAAS,eAAe,GAAG,eAAe,EACjD,QAAQ,SAAS,cAAc,GAAG,cAAc;IAEhD,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC;IAEtC,sEAAsE;IACtE,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IAC9E,YAAY,CAAC,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClD,8DAA8D;IAC9D,mCAAmC,CAAC,EAAE,CACpC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,KACV,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAElC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,oBAAoB,CAAC,EAAE,sBAAsB,CAAC;CAC/C;AAmFD,eAAO,MAAM,YAAY,aACd,SAAS,KACjB,eAAe,MAmEjB,CAAC;;AAEF,wBAA8B"}
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeV4Preset = void 0;
4
+ require("graphile-config");
5
+ const graphile_build_pg_1 = require("graphile-build-pg");
6
+ const PgV4BehaviorPlugin_js_1 = require("../plugins/PgV4BehaviorPlugin.js");
7
+ const PgV4InflectionPlugin_js_1 = require("../plugins/PgV4InflectionPlugin.js");
8
+ const PgV4NoIgnoreIndexes_js_1 = require("../plugins/PgV4NoIgnoreIndexes.js");
9
+ const PgV4SmartTagsPlugin_js_1 = require("../plugins/PgV4SmartTagsPlugin.js");
10
+ function isNotNullish(arg) {
11
+ return arg != null;
12
+ }
13
+ const makeV4Plugin = (options) => {
14
+ const { classicIds = false } = options;
15
+ return {
16
+ name: "PostGraphileV4CompatibilityPlugin",
17
+ version: "0.0.0",
18
+ inflection: {
19
+ replace: {
20
+ ...(classicIds
21
+ ? null
22
+ : {
23
+ // Rename GraphQL Global Object Identification 'id' to 'nodeId'
24
+ // TODO: this will be better as `_id` in general, but V4 uses `nodeId`
25
+ nodeIdFieldName() {
26
+ return "nodeId";
27
+ },
28
+ // Don't rename 'id' to 'rowId'
29
+ column(previous, options, details) {
30
+ const columnFieldName = this.camelCase(this._columnName(details));
31
+ return columnFieldName;
32
+ },
33
+ }),
34
+ },
35
+ },
36
+ schema: {
37
+ hooks: {
38
+ build: {
39
+ callback(build) {
40
+ switch (options.simpleCollections) {
41
+ case "both": {
42
+ build.behavior.addDefaultBehavior("+connection +list");
43
+ break;
44
+ }
45
+ case "only": {
46
+ build.behavior.addDefaultBehavior("-connection +list");
47
+ break;
48
+ }
49
+ case "omit": {
50
+ build.behavior.addDefaultBehavior("+connection -list");
51
+ break;
52
+ }
53
+ }
54
+ // We could base this on the legacy relations setting; but how to set deprecated?
55
+ build.behavior.addDefaultBehavior("-singularRelation:connection -singularRelation:list");
56
+ return build;
57
+ },
58
+ },
59
+ },
60
+ },
61
+ };
62
+ };
63
+ function parseJWTType(type) {
64
+ const parts = type.split(".");
65
+ // TODO: parse this better!
66
+ if (parts.length !== 2) {
67
+ throw new Error("Cannot parse JWT type - it must have schema and type name separated by a period");
68
+ }
69
+ return parts.map((part) => {
70
+ if (part[0] === '"') {
71
+ if (part[part.length - 1] !== '"') {
72
+ throw new Error(`Cannot parse JWT type; invalid quoting '${part}'`);
73
+ }
74
+ return part.slice(1, part.length - 1);
75
+ }
76
+ else {
77
+ return part;
78
+ }
79
+ });
80
+ }
81
+ const makeV4Preset = (options = {}) => {
82
+ const { pgUseCustomNetworkScalars, ...otherGraphileBuildOptions } = options.graphileBuildOptions ?? {};
83
+ return {
84
+ plugins: [
85
+ ...(options.ignoreRBAC === false ? [graphile_build_pg_1.PgRBACPlugin] : []),
86
+ PgV4InflectionPlugin_js_1.PgV4InflectionPlugin,
87
+ PgV4SmartTagsPlugin_js_1.PgV4SmartTagsPlugin,
88
+ PgV4BehaviorPlugin_js_1.PgV4BehaviorPlugin,
89
+ ...(options.ignoreIndexes === false ? [PgV4NoIgnoreIndexes_js_1.PgV4NoIgnoreIndexesPlugin] : []),
90
+ makeV4Plugin(options),
91
+ ...(options.appendPlugins ? options.appendPlugins : []),
92
+ ].filter(isNotNullish),
93
+ disablePlugins: [
94
+ ...(options.disableDefaultMutations
95
+ ? ["PgMutationCreatePlugin", "PgMutationUpdateDeletePlugin"]
96
+ : []),
97
+ ...(options.skipPlugins ? options.skipPlugins.map((p) => p.name) : []),
98
+ ],
99
+ schema: {
100
+ ...otherGraphileBuildOptions,
101
+ pgUseCustomNetworkScalars: pgUseCustomNetworkScalars ?? false,
102
+ pgV4UseTableNameForNodeIdentifier: true,
103
+ pgForbidSetofFunctionsToReturnNull: options.setofFunctionsContainNulls === false,
104
+ jsonScalarAsString: options.dynamicJson !== true,
105
+ ...(options.jwtSecret != null
106
+ ? {
107
+ pgJwtSecret: options.jwtSecret,
108
+ }
109
+ : null),
110
+ },
111
+ gather: {
112
+ ...(options.jwtPgTypeIdentifier
113
+ ? {
114
+ pgJwtType: parseJWTType(options.jwtPgTypeIdentifier),
115
+ }
116
+ : null),
117
+ },
118
+ grafast: {
119
+ ...(options.additionalGraphQLContextFromRequest || options.pgSettings
120
+ ? {
121
+ async context(ctx) {
122
+ const context = Object.create(null);
123
+ if (options.additionalGraphQLContextFromRequest) {
124
+ const addl = await options.additionalGraphQLContextFromRequest(ctx.httpRequest, ctx.httpRequest?.res);
125
+ Object.assign(context, addl);
126
+ }
127
+ if (options.pgSettings) {
128
+ const pgSettings = typeof options.pgSettings === "function"
129
+ ? await options.pgSettings(ctx.httpRequest)
130
+ : options.pgSettings;
131
+ Object.assign(context, { pgSettings });
132
+ }
133
+ return context;
134
+ },
135
+ }
136
+ : null),
137
+ },
138
+ };
139
+ };
140
+ exports.makeV4Preset = makeV4Preset;
141
+ exports.default = (0, exports.makeV4Preset)();
142
+ //# sourceMappingURL=v4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v4.js","sourceRoot":"","sources":["../../src/presets/v4.ts"],"names":[],"mappings":";;;AAAA,2BAAyB;AAEzB,yDAAiD;AAGjD,4EAAsE;AACtE,gFAA0E;AAC1E,8EAA8E;AAC9E,8EAAwE;A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,CAAC,mCAAmC,CAC5D,GAAG,CAAC,WAAkB,EACrB,GAAG,CAAC,WAAmB,EAAE,GAAG,CAC9B,CAAC;4BACF,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;yBAC9B;wBAED,IAAI,OAAO,CAAC,UAAU,EAAE;4BACtB,MAAM,UAAU,GACd,OAAO,OAAO,CAAC,UAAU,KAAK,UAAU;gCACtC,CAAC,CAAC,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,WAAkB,CAAC;gCAClD,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;4BACzB,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;yBACxC;wBAED,OAAO,OAAO,CAAC;oBACjB,CAAC;iBACF;gBACH,CAAC,CAAC,IAAI,CAAC;SACV;KACF,CAAC;AACJ,CAAC,CAAC;AArEW,QAAA,YAAY,gBAqEvB;AAEF,kBAAe,IAAA,oBAAY,GAAE,CAAC"}
@@ -0,0 +1,34 @@
1
+ import "@dataplan/pg/adaptors/node-postgres";
2
+ import type { WithPgClient } from "@dataplan/pg";
3
+ import type { ServerParams } from "grafserv";
4
+ declare global {
5
+ namespace GraphileBuild {
6
+ interface GraphileResolverContext {
7
+ pgSettings: {
8
+ [key: string]: string;
9
+ } | null;
10
+ withPgClient: WithPgClient;
11
+ }
12
+ }
13
+ }
14
+ export declare function makePgSources(connectionString?: string, schemas?: string | string[]): ReadonlyArray<GraphileConfig.PgDatabaseConfiguration>;
15
+ /**
16
+ * Builds the GraphQL schema by resolving the preset, running inflection then
17
+ * gather and building the schema. Returns the results.
18
+ *
19
+ * @experimental
20
+ */
21
+ export declare function makeSchema(preset: GraphileConfig.Preset): Promise<ServerParams>;
22
+ /**
23
+ * Runs the "gather" phase in watch mode and calls 'callback' with the
24
+ * generated ServerParams each time a new schema is generated.
25
+ *
26
+ * It is guaranteed that `callback` will be called at least once before the
27
+ * promise resolves.
28
+ *
29
+ * Returns a function that can be called to stop watching.
30
+ *
31
+ * @experimental
32
+ */
33
+ export declare function watchSchema(preset: GraphileConfig.Preset, callback: (error: Error | null, params?: ServerParams) => void): Promise<() => void>;
34
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAYjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,aAAa,CAAC;QACtB,UAAU,uBAAuB;YAC/B,UAAU,EAAE;gBACV,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;aACvB,GAAG,IAAI,CAAC;YACT,YAAY,EAAE,YAAY,CAAC;SAC5B;KACF;CACF;AAED,wBAAgB,aAAa,CAC3B,gBAAgB,CAAC,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAC1B,aAAa,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAkBvD;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,cAAc,CAAC,MAAM,GAC5B,OAAO,CAAC,YAAY,CAAC,CAMvB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,CAAC,MAAM,EAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,YAAY,KAAK,IAAI,GAC7D,OAAO,CAAC,MAAM,IAAI,CAAC,CAgBrB"}
package/dist/schema.js ADDED
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.watchSchema = exports.makeSchema = exports.makePgSources = void 0;
4
+ const tslib_1 = require("tslib");
5
+ require("@dataplan/pg/adaptors/node-postgres");
6
+ const graphile_build_1 = require("graphile-build");
7
+ const graphile_config_1 = require("graphile-config");
8
+ const pg = tslib_1.__importStar(require("pg"));
9
+ const Pool = pg.Pool || pg.default?.Pool;
10
+ function makePgSources(connectionString, schemas) {
11
+ const pool = new Pool({
12
+ connectionString,
13
+ });
14
+ pool.on("error", (e) => {
15
+ console.log("Client error", e);
16
+ });
17
+ const source = {
18
+ name: "main",
19
+ schemas: Array.isArray(schemas) ? schemas : [schemas ?? "public"],
20
+ pgSettingsKey: "pgSettings",
21
+ withPgClientKey: "withPgClient",
22
+ adaptor: "@dataplan/pg/adaptors/node-postgres",
23
+ adaptorSettings: {
24
+ pool,
25
+ },
26
+ };
27
+ return [source];
28
+ }
29
+ exports.makePgSources = makePgSources;
30
+ /**
31
+ * Builds the GraphQL schema by resolving the preset, running inflection then
32
+ * gather and building the schema. Returns the results.
33
+ *
34
+ * @experimental
35
+ */
36
+ async function makeSchema(preset) {
37
+ const resolvedPreset = (0, graphile_config_1.resolvePresets)([preset]);
38
+ const shared = { inflection: (0, graphile_build_1.buildInflection)(resolvedPreset) };
39
+ const input = await (0, graphile_build_1.gather)(resolvedPreset, shared);
40
+ const schema = (0, graphile_build_1.buildSchema)(resolvedPreset, input, shared);
41
+ return { schema, resolvedPreset };
42
+ }
43
+ exports.makeSchema = makeSchema;
44
+ /**
45
+ * Runs the "gather" phase in watch mode and calls 'callback' with the
46
+ * generated ServerParams each time a new schema is generated.
47
+ *
48
+ * It is guaranteed that `callback` will be called at least once before the
49
+ * promise resolves.
50
+ *
51
+ * Returns a function that can be called to stop watching.
52
+ *
53
+ * @experimental
54
+ */
55
+ async function watchSchema(preset, callback) {
56
+ const resolvedPreset = (0, graphile_config_1.resolvePresets)([preset]);
57
+ const shared = { inflection: (0, graphile_build_1.buildInflection)(resolvedPreset) };
58
+ const stopWatching = await (0, graphile_build_1.watchGather)(resolvedPreset, shared, (input, error) => {
59
+ if (error) {
60
+ callback(error);
61
+ }
62
+ else {
63
+ const schema = (0, graphile_build_1.buildSchema)(resolvedPreset, input, shared);
64
+ callback(null, { schema, resolvedPreset });
65
+ }
66
+ });
67
+ return stopWatching;
68
+ }
69
+ exports.watchSchema = watchSchema;
70
+ /*
71
+ import { exportSchema } from "graphile-export";
72
+
73
+ const exportFileLocation = `${__dirname}/../../temp.mjs`;
74
+ await exportSchema(schema, exportFileLocation, {
75
+ mode: "typeDefs",
76
+ modules: {
77
+ jsonwebtoken: jsonwebtoken,
78
+ },
79
+ });
80
+ const { schema: schema2 } = await import(exportFileLocation.toString());
81
+ */
82
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":";;;;AAAA,+CAA6C;AAG7C,mDAKwB;AACxB,qDAAiD;AACjD,+CAAyB;AAEzB,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,IAAK,EAAU,CAAC,OAAO,EAAE,IAAI,CAAC;AAelD,SAAgB,aAAa,CAC3B,gBAAyB,EACzB,OAA2B;IAE3B,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC;QACpB,gBAAgB;KACjB,CAAC,CAAC;IACH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QACrB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,GAA2C;QACrD,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC;QACjE,aAAa,EAAE,YAAY;QAC3B,eAAe,EAAE,cAAc;QAC/B,OAAO,EAAE,qCAAqC;QAC9C,eAAe,EAAE;YACf,IAAI;SACL;KACF,CAAC;IACF,OAAO,CAAC,MAAM,CAAC,CAAC;AA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- "description": "A GraphQL schema created by reflection over a PostgreSQL schema 🐘 (previously known as PostGraphQL)",
5
- "author": "Benjie Gillam <benjie@graphile.org> (https://twitter.com/benjie)",
6
- "license": "MIT",
7
- "homepage": "https://www.graphile.org/postgraphile/",
3
+ "version": "5.0.0-0.10",
4
+ "description": "Automatic, high performance, and highly customizable GraphQL API for PostgreSQL",
5
+ "type": "commonjs",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "node": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./cli": {
15
+ "types": "./dist/cli.d.ts",
16
+ "node": "./dist/cli.js"
17
+ },
18
+ "./presets/amber": {
19
+ "types": "./dist/presets/amber.d.ts",
20
+ "node": "./dist/presets/amber.js",
21
+ "default": "./dist/presets/amber.js"
22
+ },
23
+ "./presets/v4": {
24
+ "types": "./dist/presets/v4.d.ts",
25
+ "node": "./dist/presets/v4.js",
26
+ "default": "./dist/presets/v4.js"
27
+ }
28
+ },
29
+ "bin": "./dist/cli-run.js",
30
+ "scripts": {
31
+ "test": "jest -i __tests__/queries && jest -i __tests__/mutations && jest -i __tests__/schema",
32
+ "prepack": "tsc -b"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/graphile/heart.git"
37
+ },
8
38
  "keywords": [
39
+ "graphile",
9
40
  "graphql",
10
41
  "engine",
42
+ "postgraphile",
11
43
  "pg",
12
44
  "postgres",
13
45
  "postgresql",
14
- "postgraphql",
15
- "schema",
16
- "reflection",
17
- "introspection",
18
- "server",
19
- "relay",
20
- "connection",
21
- "graphile",
22
- "graphile engine",
23
- "graphql engine",
24
- "graphile-build"
46
+ "graphqljs",
47
+ "plugin",
48
+ "engine",
49
+ "extension",
50
+ "graphite"
25
51
  ],
52
+ "author": "Benjie Gillam <code@benjiegillam.com>",
53
+ "license": "MIT",
26
54
  "bugs": {
27
- "url": "https://github.com/graphile/postgraphile/issues"
28
- },
29
- "repository": "github:graphile/postgraphile",
30
- "main": "index.js",
31
- "types": "build/index.d.ts",
32
- "bin": {
33
- "postgraphile": "cli.js"
34
- },
35
- "scripts": {
36
- "build": "./scripts/build",
37
- "dev": "./scripts/dev",
38
- "lint": "yarn eslint .",
39
- "lint:fix": "yarn prettier:fix && yarn run eslint --fix .",
40
- "make-assets": "./scripts/make-assets",
41
- "test": "./scripts/test",
42
- "prepack": "./scripts/build",
43
- "changelog": "(cat scripts/CHANGELOG_HEADER.md; npx conventional-changelog -p angular --release-count 0) > CHANGELOG.md && yarn prettier --write CHANGELOG.md",
44
- "version": "yarn run changelog && git add CHANGELOG.md",
45
- "-----": "-----",
46
- "eslint": "eslint --ext .js,.jsx,.ts,.tsx",
47
- "prettier": "prettier --ignore-path ./.eslintignore",
48
- "prettier:all": "yarn prettier '**/*.{json,md,html,js,jsx,ts,tsx}'",
49
- "prettier:fix": "yarn prettier:all --write",
50
- "prettier:check": "yarn prettier:all --list-different"
55
+ "url": "https://github.com/graphile/heart/issues"
51
56
  },
57
+ "homepage": "https://graphile.org/graphile-engine/",
52
58
  "dependencies": {
53
- "@graphile/lru": "4.11.0",
54
- "@types/json5": "^0.0.30",
55
- "@types/jsonwebtoken": "^9.0.1",
56
- "@types/pg": ">=6 <9",
57
- "@types/ws": "^7.4.0",
58
- "body-parser": "^1.15.2",
59
- "chalk": "^2.4.2",
60
- "commander": "^2.19.0",
61
- "debug": "^4.1.1",
62
- "finalhandler": "^1.0.6",
63
- "graphile-build": "4.13.0",
64
- "graphile-build-pg": "4.13.0",
65
- "graphile-utils": "^4.13.0",
66
- "graphql": "^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.2 || ^15.0.0",
67
- "graphql-ws": "^5.6.2",
68
- "http-errors": "^1.5.1",
69
- "iterall": "^1.0.2",
70
- "json5": "^2.1.1",
71
- "jsonwebtoken": "^9.0.0",
72
- "parseurl": "^1.3.2",
73
- "pg": ">=6.1.0 <9",
74
- "pg-connection-string": "^2.0.0",
75
- "pg-sql2": "4.13.0",
76
- "postgraphile-core": "4.13.0",
77
- "subscriptions-transport-ws": "^0.9.18",
78
- "tslib": "^2.1.0",
79
- "ws": "^7.4.2"
80
- },
81
- "devDependencies": {
82
- "@babel/core": "7.12.10",
83
- "@babel/plugin-proposal-class-properties": "7.12.1",
84
- "@babel/plugin-transform-runtime": "7.12.10",
85
- "@babel/preset-env": "7.12.11",
86
- "@babel/preset-react": "7.12.10",
87
- "@babel/runtime": "7.12.5",
88
- "@types/chalk": "^2.2.0",
89
- "@types/commander": "^2.12.2",
90
- "@types/compression": "^1.7.0",
91
- "@types/debug": "^4.1.4",
92
- "@types/finalhandler": "^1.1.0",
93
- "@types/http-errors": "^1.6.1",
94
- "@types/jest": "^25.0.0",
95
- "@types/koa-bodyparser": "^4.3.0",
96
- "@types/koa-compress": "^4.0.1",
97
- "@types/lru-cache": "^5.1.0",
98
- "@types/morgan": "^1.9.2",
99
- "@types/node": "^12.0.0",
100
- "@types/parseurl": "^1.3.1",
101
- "@types/restify": "^8.4.2",
102
- "@typescript-eslint/eslint-plugin": "^4.14.0",
103
- "@typescript-eslint/parser": "^4.14.0",
104
- "babel-loader": "8.2.2",
105
- "compression": "^1.7.4",
106
- "connect": "^3.5.0",
107
- "conventional-changelog-cli": "^2.1.1",
108
- "css-loader": "5.0.1",
109
- "eslint": "^7.18.0",
110
- "eslint-config-prettier": "^7.2.0",
111
- "eslint-plugin-jest": "^24.1.3",
112
- "eslint-plugin-prettier": "^3.3.1",
113
- "express": "^4.14.0",
114
- "fastify": "^3.10.1",
115
- "fastify-compress": "^3.4.1",
116
- "fastify-cookie": "^5.1.0",
117
- "fastify-formbody": "^5.0.0",
118
- "fastify-v2": "npm:fastify@^2.2.0",
119
- "helmet": "^4.4.1",
120
- "html-webpack-inline-source-plugin": "^1.0.0-beta.2",
121
- "html-webpack-plugin": "^4.5.1",
122
- "http-proxy": "^1.18.1",
123
- "jest": "^25.0.0",
124
- "koa": "^2.13.1",
125
- "koa-bodyparser": "^4.3.0",
126
- "koa-compress": "^5.0.1",
127
- "koa-mount": "^4.0.0",
128
- "morgan": "^1.10.0",
129
- "nodemon": "^2.0.7",
130
- "pg-minify": "~1.6.2",
131
- "prettier": "^2.2.1",
132
- "restify": "^8.5.1",
133
- "source-map-support": "^0.5.12",
134
- "style-loader": "^2.0.0",
135
- "superagent": "^4.1.0",
136
- "ts-node": "^9.1.1",
137
- "typescript": "^4.1.3",
138
- "webpack": "^4.17.2"
59
+ "@dataplan/pg": "0.0.1-0.7",
60
+ "@graphile/lru": "^5.0.0-0.1",
61
+ "@types/node": "^16.11.15",
62
+ "@types/pg": "^8.6.2",
63
+ "debug": "^4.3.3",
64
+ "grafast": "^0.0.1-0.5",
65
+ "grafserv": "^0.0.1-0.6",
66
+ "graphile-build": "5.0.0-0.6",
67
+ "graphile-build-pg": "5.0.0-0.8",
68
+ "graphile-config": "^0.0.1-0.1",
69
+ "graphile-export": "^0.0.2-0.4",
70
+ "graphql": "16.1.0-experimental-stream-defer.6",
71
+ "iterall": "^1.3.0",
72
+ "jsonwebtoken": "^8.5.1",
73
+ "pg": "^8.7.1",
74
+ "pg-introspection": "^0.0.1-0.0",
75
+ "ruru": "^2.0.0-0.4",
76
+ "tslib": "^2.4.0"
139
77
  },
140
- "jest": {
141
- "transform": {
142
- ".*": "<rootDir>/resources/jest-preprocessor.js"
143
- },
144
- "moduleFileExtensions": [
145
- "ts",
146
- "js",
147
- "json"
148
- ],
149
- "setupFiles": [
150
- "<rootDir>/resources/jest-setup.js"
151
- ],
152
- "testEnvironment": "node",
153
- "roots": [
154
- "<rootDir>/src"
155
- ],
156
- "testRegex": "/__tests__/[^.]+-test.(t|j)s$"
78
+ "engines": {
79
+ "node": ">=16"
157
80
  },
158
81
  "files": [
159
- "sponsors.json",
160
- "build",
161
- "build-turbo",
162
- "isTurbo.js",
163
- "index.js",
164
- "cli.js",
165
- "plugins.js",
166
- "plugins.d.ts"
82
+ "dist",
83
+ "index.js"
167
84
  ],
168
- "engines": {
169
- "node": ">=8.6"
85
+ "devDependencies": {
86
+ "@types/debug": "^4.1.7",
87
+ "@types/express": "^4",
88
+ "@types/jest": "^27.5.1",
89
+ "@types/jsonwebtoken": "^8",
90
+ "@types/nodemon": "1.19.1",
91
+ "jest": "^28.1.0",
92
+ "nodemon": "^2.0.15",
93
+ "ts-node": "^10.9.1",
94
+ "typescript": "^4.8.1-rc"
170
95
  }
171
- }
96
+ }
@@ -1,3 +0,0 @@
1
- /// <reference types="node" />
2
- declare const _default: Buffer | null;
3
- export default _default;