@graphitation/graphql-codegen-supermassive-typed-document-node-plugin 0.5.1 → 0.6.0
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/.eslintcache +1 -1
- package/CHANGELOG.md +11 -2
- package/lib/visitor.d.ts +4 -0
- package/lib/visitor.d.ts.map +1 -1
- package/lib/visitor.js +25 -5
- package/lib/visitor.js.map +2 -2
- package/lib/visitor.mjs +28 -5
- package/lib/visitor.mjs.map +2 -2
- package/package.json +2 -2
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/mnt/vss/_work/1/s/packages/graphql-codegen-supermassive-typed-document-node-plugin/src/index.ts":"1","/mnt/vss/_work/1/s/packages/graphql-codegen-supermassive-typed-document-node-plugin/src/visitor.ts":"2"},{"size":2430,"mtime":
|
|
1
|
+
[{"/mnt/vss/_work/1/s/packages/graphql-codegen-supermassive-typed-document-node-plugin/src/index.ts":"1","/mnt/vss/_work/1/s/packages/graphql-codegen-supermassive-typed-document-node-plugin/src/visitor.ts":"2"},{"size":2430,"mtime":1695804358407,"results":"3","hashOfConfig":"4"},{"size":6818,"mtime":1695804358411,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","suppressedMessages":"8","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"9ay76n",{"filePath":"9","messages":"10","suppressedMessages":"11","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/mnt/vss/_work/1/s/packages/graphql-codegen-supermassive-typed-document-node-plugin/src/index.ts",[],[],"/mnt/vss/_work/1/s/packages/graphql-codegen-supermassive-typed-document-node-plugin/src/visitor.ts",[],[]]
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @graphitation/graphql-codegen-supermassive-typed-document-node-plugin
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 27 Sep 2023 08:50:15 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.6.0
|
|
8
|
+
|
|
9
|
+
Wed, 27 Sep 2023 08:50:15 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Support supermassive v3 annotations (mnovikov@microsoft.com)
|
|
14
|
+
- Bump @graphitation/supermassive to v3.1.0
|
|
15
|
+
|
|
7
16
|
## 0.5.1
|
|
8
17
|
|
|
9
|
-
Thu, 21 Sep 2023 06:
|
|
18
|
+
Thu, 21 Sep 2023 06:28:45 GMT
|
|
10
19
|
|
|
11
20
|
### Patches
|
|
12
21
|
|
package/lib/visitor.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Types } from "@graphql-codegen/plugin-helpers";
|
|
2
2
|
import { LoadedFragment, ClientSideBaseVisitor, ClientSideBasePluginConfig, RawClientSideBasePluginConfig } from "@graphql-codegen/visitor-plugin-common";
|
|
3
3
|
import { GraphQLSchema, FragmentDefinitionNode, OperationDefinitionNode } from "graphql";
|
|
4
|
+
export type SupermassiveOutputType = "V3" | "V2" | "BOTH";
|
|
4
5
|
type RawClientSidePluginConfig = RawClientSideBasePluginConfig & {
|
|
5
6
|
supermassiveDocumentNodeConditional?: string;
|
|
7
|
+
supermassiveDocumentNodeOutputType?: SupermassiveOutputType;
|
|
6
8
|
};
|
|
7
9
|
type ClientSidePluginConfig = ClientSideBasePluginConfig & {
|
|
8
10
|
supermassiveDocumentNodeConditional?: string;
|
|
11
|
+
supermassiveDocumentNodeOutputType?: SupermassiveOutputType;
|
|
9
12
|
};
|
|
10
13
|
export declare class TypeScriptDocumentNodesVisitor extends ClientSideBaseVisitor<RawClientSidePluginConfig, ClientSidePluginConfig> {
|
|
11
14
|
constructor(schema: GraphQLSchema, fragments: LoadedFragment[], rawConfig: RawClientSidePluginConfig, documents: Types.DocumentFile[]);
|
|
@@ -13,6 +16,7 @@ export declare class TypeScriptDocumentNodesVisitor extends ClientSideBaseVisito
|
|
|
13
16
|
protected _render(node: FragmentDefinitionNode | OperationDefinitionNode, annotate?: boolean): string;
|
|
14
17
|
private _transformDocumentNodeToSupermassive;
|
|
15
18
|
protected getDocumentNodeSignature(resultType: string, variablesTypes: string, node: FragmentDefinitionNode | OperationDefinitionNode): string;
|
|
19
|
+
private addTypesToRequestDocument;
|
|
16
20
|
}
|
|
17
21
|
export {};
|
|
18
22
|
//# sourceMappingURL=visitor.d.ts.map
|
package/lib/visitor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../src/visitor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAE1B,6BAA6B,EAC9B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,aAAa,EACb,sBAAsB,EAItB,uBAAuB,EACxB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"visitor.d.ts","sourceRoot":"","sources":["../src/visitor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAE1B,6BAA6B,EAC9B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,aAAa,EACb,sBAAsB,EAItB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAQjB,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE1D,KAAK,yBAAyB,GAAG,6BAA6B,GAAG;IAC/D,mCAAmC,CAAC,EAAE,MAAM,CAAC;IAC7C,kCAAkC,CAAC,EAAE,sBAAsB,CAAC;CAC7D,CAAC;AACF,KAAK,sBAAsB,GAAG,0BAA0B,GAAG;IACzD,mCAAmC,CAAC,EAAE,MAAM,CAAC;IAC7C,kCAAkC,CAAC,EAAE,sBAAsB,CAAC;CAC7D,CAAC;AAEF,qBAAa,8BAA+B,SAAQ,qBAAqB,CACvE,yBAAyB,EACzB,sBAAsB,CACvB;gBAEG,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,cAAc,EAAE,EAC3B,SAAS,EAAE,yBAAyB,EACpC,SAAS,EAAE,KAAK,CAAC,YAAY,EAAE;IAoCjC,SAAS,CAAC,IAAI,CACZ,IAAI,EAAE,sBAAsB,GAAG,uBAAuB,GACrD,MAAM;IAST,SAAS,CAAC,OAAO,CACf,IAAI,EAAE,sBAAsB,GAAG,uBAAuB,EACtD,QAAQ,UAAQ,GACf,MAAM;IAmET,OAAO,CAAC,oCAAoC;IAY5C,SAAS,CAAC,wBAAwB,CAChC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,sBAAsB,GAAG,uBAAuB;IAaxD,OAAO,CAAC,yBAAyB;CA6BlC"}
|
package/lib/visitor.js
CHANGED
|
@@ -51,7 +51,7 @@ module.exports = __toCommonJS(visitor_exports);
|
|
|
51
51
|
var import_auto_bind = __toESM(require("auto-bind"));
|
|
52
52
|
var import_visitor_plugin_common = require("@graphql-codegen/visitor-plugin-common");
|
|
53
53
|
var import_graphql = require("graphql");
|
|
54
|
-
var
|
|
54
|
+
var import_supermassive = require("@graphitation/supermassive");
|
|
55
55
|
var import_optimize = require("@graphql-tools/optimize");
|
|
56
56
|
var import_graphql_tag = __toESM(require("graphql-tag"));
|
|
57
57
|
class TypeScriptDocumentNodesVisitor extends import_visitor_plugin_common.ClientSideBaseVisitor {
|
|
@@ -64,7 +64,8 @@ class TypeScriptDocumentNodesVisitor extends import_visitor_plugin_common.Client
|
|
|
64
64
|
documentNodeImport: "@graphql-typed-document-node/core#TypedDocumentNode"
|
|
65
65
|
}, rawConfig),
|
|
66
66
|
{
|
|
67
|
-
supermassiveDocumentNodeConditional: rawConfig.supermassiveDocumentNodeConditional
|
|
67
|
+
supermassiveDocumentNodeConditional: rawConfig.supermassiveDocumentNodeConditional,
|
|
68
|
+
supermassiveDocumentNodeOutputType: rawConfig.supermassiveDocumentNodeOutputType || "V3"
|
|
68
69
|
},
|
|
69
70
|
documents
|
|
70
71
|
);
|
|
@@ -92,7 +93,7 @@ class TypeScriptDocumentNodesVisitor extends import_visitor_plugin_common.Client
|
|
|
92
93
|
return this._render(node, true);
|
|
93
94
|
}
|
|
94
95
|
_render(node, annotate = false) {
|
|
95
|
-
const supermassiveNode =
|
|
96
|
+
const supermassiveNode = this.addTypesToRequestDocument(this._schema, {
|
|
96
97
|
kind: import_graphql.Kind.DOCUMENT,
|
|
97
98
|
definitions: [node]
|
|
98
99
|
}).definitions[0];
|
|
@@ -118,7 +119,7 @@ class TypeScriptDocumentNodesVisitor extends import_visitor_plugin_common.Client
|
|
|
118
119
|
const definitions = [
|
|
119
120
|
...gqlObj.definitions.map(
|
|
120
121
|
(t) => JSON.stringify(
|
|
121
|
-
annotate ?
|
|
122
|
+
annotate ? this.addTypesToRequestDocument(this._schema, {
|
|
122
123
|
kind: import_graphql.Kind.DOCUMENT,
|
|
123
124
|
definitions: [t]
|
|
124
125
|
}).definitions[0] : t
|
|
@@ -141,7 +142,7 @@ class TypeScriptDocumentNodesVisitor extends import_visitor_plugin_common.Client
|
|
|
141
142
|
_transformDocumentNodeToSupermassive(document) {
|
|
142
143
|
return __spreadProps(__spreadValues({}, document), {
|
|
143
144
|
definitions: document.definitions.map(
|
|
144
|
-
(t) =>
|
|
145
|
+
(t) => this.addTypesToRequestDocument(this._schema, {
|
|
145
146
|
kind: import_graphql.Kind.DOCUMENT,
|
|
146
147
|
definitions: [t]
|
|
147
148
|
}).definitions[0]
|
|
@@ -154,4 +155,23 @@ class TypeScriptDocumentNodesVisitor extends import_visitor_plugin_common.Client
|
|
|
154
155
|
}
|
|
155
156
|
return super.getDocumentNodeSignature(resultType, variablesTypes, node);
|
|
156
157
|
}
|
|
158
|
+
addTypesToRequestDocument(schema, document) {
|
|
159
|
+
let finalDocument = document;
|
|
160
|
+
if (this.config.supermassiveDocumentNodeOutputType === "V3" || this.config.supermassiveDocumentNodeOutputType === "BOTH") {
|
|
161
|
+
finalDocument = (0, import_supermassive.addMinimalViableSchemaToRequestDocument)(
|
|
162
|
+
schema,
|
|
163
|
+
document,
|
|
164
|
+
{
|
|
165
|
+
addTo: "PROPERTY"
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
if (this.config.supermassiveDocumentNodeOutputType === "V2" || this.config.supermassiveDocumentNodeOutputType === "BOTH") {
|
|
170
|
+
finalDocument = (0, import_supermassive.addSupermassiveLegacyTypesToRequestDocument)(
|
|
171
|
+
schema,
|
|
172
|
+
document
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
return finalDocument;
|
|
176
|
+
}
|
|
157
177
|
}
|
package/lib/visitor.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/visitor.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Taken from https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/packages/plugins/typescript/typed-document-node/src/visitor.ts\n * MIT license https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/LICENSE\n */\n\nimport autoBind from \"auto-bind\";\nimport { Types } from \"@graphql-codegen/plugin-helpers\";\nimport {\n LoadedFragment,\n ClientSideBaseVisitor,\n ClientSideBasePluginConfig,\n DocumentMode,\n RawClientSideBasePluginConfig,\n} from \"@graphql-codegen/visitor-plugin-common\";\nimport {\n GraphQLSchema,\n FragmentDefinitionNode,\n DocumentNode,\n print,\n Kind,\n OperationDefinitionNode,\n} from \"graphql\";\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,uBAAqB;AAErB,mCAMO;AACP,qBAOO;AACP,
|
|
4
|
+
"sourcesContent": ["/*\n * Taken from https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/packages/plugins/typescript/typed-document-node/src/visitor.ts\n * MIT license https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/LICENSE\n */\n\nimport autoBind from \"auto-bind\";\nimport { Types } from \"@graphql-codegen/plugin-helpers\";\nimport {\n LoadedFragment,\n ClientSideBaseVisitor,\n ClientSideBasePluginConfig,\n DocumentMode,\n RawClientSideBasePluginConfig,\n} from \"@graphql-codegen/visitor-plugin-common\";\nimport {\n GraphQLSchema,\n FragmentDefinitionNode,\n DocumentNode,\n print,\n Kind,\n OperationDefinitionNode,\n} from \"graphql\";\nimport {\n addSupermassiveLegacyTypesToRequestDocument,\n addMinimalViableSchemaToRequestDocument,\n} from \"@graphitation/supermassive\";\nimport { optimizeDocumentNode } from \"@graphql-tools/optimize\";\nimport gqlTag from \"graphql-tag\";\n\nexport type SupermassiveOutputType = \"V3\" | \"V2\" | \"BOTH\";\n\ntype RawClientSidePluginConfig = RawClientSideBasePluginConfig & {\n supermassiveDocumentNodeConditional?: string;\n supermassiveDocumentNodeOutputType?: SupermassiveOutputType;\n};\ntype ClientSidePluginConfig = ClientSideBasePluginConfig & {\n supermassiveDocumentNodeConditional?: string;\n supermassiveDocumentNodeOutputType?: SupermassiveOutputType;\n};\n\nexport class TypeScriptDocumentNodesVisitor extends ClientSideBaseVisitor<\n RawClientSidePluginConfig,\n ClientSidePluginConfig\n> {\n constructor(\n schema: GraphQLSchema,\n fragments: LoadedFragment[],\n rawConfig: RawClientSidePluginConfig,\n documents: Types.DocumentFile[],\n ) {\n super(\n schema,\n fragments,\n {\n documentMode: DocumentMode.documentNodeImportFragments,\n documentNodeImport:\n \"@graphql-typed-document-node/core#TypedDocumentNode\",\n ...rawConfig,\n },\n {\n supermassiveDocumentNodeConditional:\n rawConfig.supermassiveDocumentNodeConditional,\n supermassiveDocumentNodeOutputType:\n rawConfig.supermassiveDocumentNodeOutputType || \"V3\",\n },\n documents,\n );\n\n autoBind(this);\n\n // We need to make sure it's there because in this mode, the base plugin doesn't add the import\n if (this.config.documentMode === DocumentMode.graphQLTag) {\n const documentNodeImport = this._parseImport(\n this.config.documentNodeImport || \"graphql#DocumentNode\",\n );\n const tagImport = this._generateImport(\n documentNodeImport,\n \"DocumentNode\",\n true,\n ) as string;\n this._imports.add(tagImport);\n }\n }\n\n protected _gql(\n node: FragmentDefinitionNode | OperationDefinitionNode,\n ): string {\n if (this.config.supermassiveDocumentNodeConditional) {\n const supermassive = this._render(node, true);\n const standard = this._render(node, false);\n return `(${this.config.supermassiveDocumentNodeConditional}\\n? ${supermassive}\\n: ${standard})`;\n }\n return this._render(node, true);\n }\n\n protected _render(\n node: FragmentDefinitionNode | OperationDefinitionNode,\n annotate = false,\n ): string {\n const supermassiveNode = this.addTypesToRequestDocument(this._schema, {\n kind: Kind.DOCUMENT,\n definitions: [node],\n }).definitions[0] as FragmentDefinitionNode | OperationDefinitionNode;\n\n const fragments = this._transformFragments(supermassiveNode);\n\n const doc = this._prepareDocument(`\n ${\n print(supermassiveNode)\n .split(\"\\\\\")\n .join(\"\\\\\\\\\") /* Re-escape escaped values in GraphQL syntax */\n }\n ${this._includeFragments(fragments)}`);\n\n if (this.config.documentMode === DocumentMode.documentNode) {\n let gqlObj = gqlTag([doc]);\n\n if (this.config.optimizeDocumentNode) {\n gqlObj = optimizeDocumentNode(gqlObj);\n }\n if (annotate) {\n gqlObj = this._transformDocumentNodeToSupermassive(gqlObj);\n }\n\n return JSON.stringify(gqlObj);\n } else if (\n this.config.documentMode === DocumentMode.documentNodeImportFragments\n ) {\n let gqlObj = gqlTag([doc]);\n\n if (this.config.optimizeDocumentNode) {\n gqlObj = optimizeDocumentNode(gqlObj);\n }\n\n if (fragments.length > 0) {\n const definitions = [\n ...gqlObj.definitions.map((t) =>\n JSON.stringify(\n annotate\n ? this.addTypesToRequestDocument(this._schema, {\n kind: Kind.DOCUMENT,\n definitions: [t],\n }).definitions[0]\n : t,\n ),\n ),\n ...fragments.map((name) => `...${name}.definitions`),\n ].join();\n\n return `{\"kind\":\"${Kind.DOCUMENT}\",\"definitions\":[${definitions}]}`;\n }\n if (annotate) {\n gqlObj = this._transformDocumentNodeToSupermassive(gqlObj);\n }\n\n return JSON.stringify(gqlObj);\n } else if (this.config.documentMode === DocumentMode.string) {\n return \"`\" + doc + \"`\";\n }\n\n const gqlImport = this._parseImport(this.config.gqlImport || \"graphql-tag\");\n\n return (gqlImport.propName || \"gql\") + \"`\" + doc + \"`\";\n }\n\n private _transformDocumentNodeToSupermassive(document: DocumentNode) {\n return {\n ...document,\n definitions: document.definitions.map(\n (t) =>\n this.addTypesToRequestDocument(this._schema, {\n kind: Kind.DOCUMENT,\n definitions: [t],\n }).definitions[0],\n ),\n } as DocumentNode;\n }\n protected getDocumentNodeSignature(\n resultType: string,\n variablesTypes: string,\n node: FragmentDefinitionNode | OperationDefinitionNode,\n ) {\n if (\n this.config.documentMode === DocumentMode.documentNode ||\n this.config.documentMode === DocumentMode.documentNodeImportFragments ||\n this.config.documentMode === DocumentMode.graphQLTag\n ) {\n return ` as unknown as DocumentNode<${resultType}, ${variablesTypes}>`;\n }\n\n return super.getDocumentNodeSignature(resultType, variablesTypes, node);\n }\n\n private addTypesToRequestDocument(\n schema: GraphQLSchema,\n document: DocumentNode,\n ) {\n let finalDocument = document;\n if (\n this.config.supermassiveDocumentNodeOutputType === \"V3\" ||\n this.config.supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addMinimalViableSchemaToRequestDocument(\n schema,\n document,\n {\n addTo: \"PROPERTY\",\n },\n );\n }\n\n if (\n this.config.supermassiveDocumentNodeOutputType === \"V2\" ||\n this.config.supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addSupermassiveLegacyTypesToRequestDocument(\n schema,\n document,\n ) as unknown as DocumentNode;\n }\n return finalDocument;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,uBAAqB;AAErB,mCAMO;AACP,qBAOO;AACP,0BAGO;AACP,sBAAqC;AACrC,yBAAmB;AAaZ,MAAM,uCAAuC,mDAGlD;AAAA,EACA,YACE,QACA,WACA,WACA,WACA;AACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,QACE,cAAc,0CAAa;AAAA,QAC3B,oBACE;AAAA,SACC;AAAA,MAEL;AAAA,QACE,qCACE,UAAU;AAAA,QACZ,oCACE,UAAU,sCAAsC;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AAEA,yBAAAA,SAAS,IAAI;AAGb,QAAI,KAAK,OAAO,iBAAiB,0CAAa,YAAY;AACxD,YAAM,qBAAqB,KAAK;AAAA,QAC9B,KAAK,OAAO,sBAAsB;AAAA,MACpC;AACA,YAAM,YAAY,KAAK;AAAA,QACrB;AAAA,QACA;AAAA,QACA;AAAA,MACF;AACA,WAAK,SAAS,IAAI,SAAS;AAAA,IAC7B;AAAA,EACF;AAAA,EAEU,KACR,MACQ;AACR,QAAI,KAAK,OAAO,qCAAqC;AACnD,YAAM,eAAe,KAAK,QAAQ,MAAM,IAAI;AAC5C,YAAM,WAAW,KAAK,QAAQ,MAAM,KAAK;AACzC,aAAO,IAAI,KAAK,OAAO;AAAA,IAA0C;AAAA,IAAmB;AAAA,IACtF;AACA,WAAO,KAAK,QAAQ,MAAM,IAAI;AAAA,EAChC;AAAA,EAEU,QACR,MACA,WAAW,OACH;AACR,UAAM,mBAAmB,KAAK,0BAA0B,KAAK,SAAS;AAAA,MACpE,MAAM,oBAAK;AAAA,MACX,aAAa,CAAC,IAAI;AAAA,IACpB,CAAC,EAAE,YAAY,CAAC;AAEhB,UAA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,aAAa,aAAa;AAE1E,YAAQ,UAAU,YAAY,SAAS,MAAM,MAAM;AAAA,EACrD;AAAA,EAEQ,qCAAqC,UAAwB;AACnE,WAAO,iCACF,WADE;AAAA,MAEL,aAAa,SAAS,YAAY;AAAA,QAChC,CAAC,MACC,KAAK,0BAA0B,KAAK,SAAS;AAAA,UAC3C,MAAM,oBAAK;AAAA,UACX,aAAa,CAAC,CAAC;AAAA,QACjB,CAAC,EAAE,YAAY,CAAC;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AAAA,EACU,yBACR,YACA,gBACA,MACA;AACA,QACE,KAAK,OAAO,iBAAiB,0CAAa,gBAC1C,KAAK,OAAO,iBAAiB,0CAAa,+BAC1C,KAAK,OAAO,iBAAiB,0CAAa,YAC1C;AACA,aAAO,+BAA+B,eAAe;AAAA,IACvD;AAEA,WAAO,MAAM,yBAAyB,YAAY,gBAAgB,IAAI;AAAA,EACxE;AAAA,EAEQ,0BACN,QACA,UACA;AACA,QAAI,gBAAgB;AACpB,QACE,KAAK,OAAO,uCAAuC,QACnD,KAAK,OAAO,uCAAuC,QACnD;AACA,0BAAgB;AAAA,QACd;AAAA,QACA;AAAA,QACA;AAAA,UACE,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAEA,QACE,KAAK,OAAO,uCAAuC,QACnD,KAAK,OAAO,uCAAuC,QACnD;AACA,0BAAgB;AAAA,QACd;AAAA,QACA;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": ["autoBind", "gqlTag"]
|
|
7
7
|
}
|
package/lib/visitor.mjs
CHANGED
|
@@ -28,7 +28,10 @@ import {
|
|
|
28
28
|
print,
|
|
29
29
|
Kind
|
|
30
30
|
} from "graphql";
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
addSupermassiveLegacyTypesToRequestDocument,
|
|
33
|
+
addMinimalViableSchemaToRequestDocument
|
|
34
|
+
} from "@graphitation/supermassive";
|
|
32
35
|
import { optimizeDocumentNode } from "@graphql-tools/optimize";
|
|
33
36
|
import gqlTag from "graphql-tag";
|
|
34
37
|
var TypeScriptDocumentNodesVisitor = class extends ClientSideBaseVisitor {
|
|
@@ -41,7 +44,8 @@ var TypeScriptDocumentNodesVisitor = class extends ClientSideBaseVisitor {
|
|
|
41
44
|
documentNodeImport: "@graphql-typed-document-node/core#TypedDocumentNode"
|
|
42
45
|
}, rawConfig),
|
|
43
46
|
{
|
|
44
|
-
supermassiveDocumentNodeConditional: rawConfig.supermassiveDocumentNodeConditional
|
|
47
|
+
supermassiveDocumentNodeConditional: rawConfig.supermassiveDocumentNodeConditional,
|
|
48
|
+
supermassiveDocumentNodeOutputType: rawConfig.supermassiveDocumentNodeOutputType || "V3"
|
|
45
49
|
},
|
|
46
50
|
documents
|
|
47
51
|
);
|
|
@@ -69,7 +73,7 @@ var TypeScriptDocumentNodesVisitor = class extends ClientSideBaseVisitor {
|
|
|
69
73
|
return this._render(node, true);
|
|
70
74
|
}
|
|
71
75
|
_render(node, annotate = false) {
|
|
72
|
-
const supermassiveNode = addTypesToRequestDocument(this._schema, {
|
|
76
|
+
const supermassiveNode = this.addTypesToRequestDocument(this._schema, {
|
|
73
77
|
kind: Kind.DOCUMENT,
|
|
74
78
|
definitions: [node]
|
|
75
79
|
}).definitions[0];
|
|
@@ -95,7 +99,7 @@ var TypeScriptDocumentNodesVisitor = class extends ClientSideBaseVisitor {
|
|
|
95
99
|
const definitions = [
|
|
96
100
|
...gqlObj.definitions.map(
|
|
97
101
|
(t) => JSON.stringify(
|
|
98
|
-
annotate ? addTypesToRequestDocument(this._schema, {
|
|
102
|
+
annotate ? this.addTypesToRequestDocument(this._schema, {
|
|
99
103
|
kind: Kind.DOCUMENT,
|
|
100
104
|
definitions: [t]
|
|
101
105
|
}).definitions[0] : t
|
|
@@ -118,7 +122,7 @@ var TypeScriptDocumentNodesVisitor = class extends ClientSideBaseVisitor {
|
|
|
118
122
|
_transformDocumentNodeToSupermassive(document) {
|
|
119
123
|
return __spreadProps(__spreadValues({}, document), {
|
|
120
124
|
definitions: document.definitions.map(
|
|
121
|
-
(t) => addTypesToRequestDocument(this._schema, {
|
|
125
|
+
(t) => this.addTypesToRequestDocument(this._schema, {
|
|
122
126
|
kind: Kind.DOCUMENT,
|
|
123
127
|
definitions: [t]
|
|
124
128
|
}).definitions[0]
|
|
@@ -131,6 +135,25 @@ var TypeScriptDocumentNodesVisitor = class extends ClientSideBaseVisitor {
|
|
|
131
135
|
}
|
|
132
136
|
return super.getDocumentNodeSignature(resultType, variablesTypes, node);
|
|
133
137
|
}
|
|
138
|
+
addTypesToRequestDocument(schema, document) {
|
|
139
|
+
let finalDocument = document;
|
|
140
|
+
if (this.config.supermassiveDocumentNodeOutputType === "V3" || this.config.supermassiveDocumentNodeOutputType === "BOTH") {
|
|
141
|
+
finalDocument = addMinimalViableSchemaToRequestDocument(
|
|
142
|
+
schema,
|
|
143
|
+
document,
|
|
144
|
+
{
|
|
145
|
+
addTo: "PROPERTY"
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
if (this.config.supermassiveDocumentNodeOutputType === "V2" || this.config.supermassiveDocumentNodeOutputType === "BOTH") {
|
|
150
|
+
finalDocument = addSupermassiveLegacyTypesToRequestDocument(
|
|
151
|
+
schema,
|
|
152
|
+
document
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
return finalDocument;
|
|
156
|
+
}
|
|
134
157
|
};
|
|
135
158
|
export {
|
|
136
159
|
TypeScriptDocumentNodesVisitor
|
package/lib/visitor.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/visitor.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Taken from https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/packages/plugins/typescript/typed-document-node/src/visitor.ts\n * MIT license https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/LICENSE\n */\n\nimport autoBind from \"auto-bind\";\nimport { Types } from \"@graphql-codegen/plugin-helpers\";\nimport {\n LoadedFragment,\n ClientSideBaseVisitor,\n ClientSideBasePluginConfig,\n DocumentMode,\n RawClientSideBasePluginConfig,\n} from \"@graphql-codegen/visitor-plugin-common\";\nimport {\n GraphQLSchema,\n FragmentDefinitionNode,\n DocumentNode,\n print,\n Kind,\n OperationDefinitionNode,\n} from \"graphql\";\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,cAAc;AAErB;AAAA,EAEE;AAAA,EAEA;AAAA,OAEK;AACP;AAAA,EAIE;AAAA,EACA;AAAA,OAEK;AACP,
|
|
4
|
+
"sourcesContent": ["/*\n * Taken from https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/packages/plugins/typescript/typed-document-node/src/visitor.ts\n * MIT license https://github.com/dotansimha/graphql-code-generator/blob/4fee8c8c523b30163e913438b85a064c58e39087/LICENSE\n */\n\nimport autoBind from \"auto-bind\";\nimport { Types } from \"@graphql-codegen/plugin-helpers\";\nimport {\n LoadedFragment,\n ClientSideBaseVisitor,\n ClientSideBasePluginConfig,\n DocumentMode,\n RawClientSideBasePluginConfig,\n} from \"@graphql-codegen/visitor-plugin-common\";\nimport {\n GraphQLSchema,\n FragmentDefinitionNode,\n DocumentNode,\n print,\n Kind,\n OperationDefinitionNode,\n} from \"graphql\";\nimport {\n addSupermassiveLegacyTypesToRequestDocument,\n addMinimalViableSchemaToRequestDocument,\n} from \"@graphitation/supermassive\";\nimport { optimizeDocumentNode } from \"@graphql-tools/optimize\";\nimport gqlTag from \"graphql-tag\";\n\nexport type SupermassiveOutputType = \"V3\" | \"V2\" | \"BOTH\";\n\ntype RawClientSidePluginConfig = RawClientSideBasePluginConfig & {\n supermassiveDocumentNodeConditional?: string;\n supermassiveDocumentNodeOutputType?: SupermassiveOutputType;\n};\ntype ClientSidePluginConfig = ClientSideBasePluginConfig & {\n supermassiveDocumentNodeConditional?: string;\n supermassiveDocumentNodeOutputType?: SupermassiveOutputType;\n};\n\nexport class TypeScriptDocumentNodesVisitor extends ClientSideBaseVisitor<\n RawClientSidePluginConfig,\n ClientSidePluginConfig\n> {\n constructor(\n schema: GraphQLSchema,\n fragments: LoadedFragment[],\n rawConfig: RawClientSidePluginConfig,\n documents: Types.DocumentFile[],\n ) {\n super(\n schema,\n fragments,\n {\n documentMode: DocumentMode.documentNodeImportFragments,\n documentNodeImport:\n \"@graphql-typed-document-node/core#TypedDocumentNode\",\n ...rawConfig,\n },\n {\n supermassiveDocumentNodeConditional:\n rawConfig.supermassiveDocumentNodeConditional,\n supermassiveDocumentNodeOutputType:\n rawConfig.supermassiveDocumentNodeOutputType || \"V3\",\n },\n documents,\n );\n\n autoBind(this);\n\n // We need to make sure it's there because in this mode, the base plugin doesn't add the import\n if (this.config.documentMode === DocumentMode.graphQLTag) {\n const documentNodeImport = this._parseImport(\n this.config.documentNodeImport || \"graphql#DocumentNode\",\n );\n const tagImport = this._generateImport(\n documentNodeImport,\n \"DocumentNode\",\n true,\n ) as string;\n this._imports.add(tagImport);\n }\n }\n\n protected _gql(\n node: FragmentDefinitionNode | OperationDefinitionNode,\n ): string {\n if (this.config.supermassiveDocumentNodeConditional) {\n const supermassive = this._render(node, true);\n const standard = this._render(node, false);\n return `(${this.config.supermassiveDocumentNodeConditional}\\n? ${supermassive}\\n: ${standard})`;\n }\n return this._render(node, true);\n }\n\n protected _render(\n node: FragmentDefinitionNode | OperationDefinitionNode,\n annotate = false,\n ): string {\n const supermassiveNode = this.addTypesToRequestDocument(this._schema, {\n kind: Kind.DOCUMENT,\n definitions: [node],\n }).definitions[0] as FragmentDefinitionNode | OperationDefinitionNode;\n\n const fragments = this._transformFragments(supermassiveNode);\n\n const doc = this._prepareDocument(`\n ${\n print(supermassiveNode)\n .split(\"\\\\\")\n .join(\"\\\\\\\\\") /* Re-escape escaped values in GraphQL syntax */\n }\n ${this._includeFragments(fragments)}`);\n\n if (this.config.documentMode === DocumentMode.documentNode) {\n let gqlObj = gqlTag([doc]);\n\n if (this.config.optimizeDocumentNode) {\n gqlObj = optimizeDocumentNode(gqlObj);\n }\n if (annotate) {\n gqlObj = this._transformDocumentNodeToSupermassive(gqlObj);\n }\n\n return JSON.stringify(gqlObj);\n } else if (\n this.config.documentMode === DocumentMode.documentNodeImportFragments\n ) {\n let gqlObj = gqlTag([doc]);\n\n if (this.config.optimizeDocumentNode) {\n gqlObj = optimizeDocumentNode(gqlObj);\n }\n\n if (fragments.length > 0) {\n const definitions = [\n ...gqlObj.definitions.map((t) =>\n JSON.stringify(\n annotate\n ? this.addTypesToRequestDocument(this._schema, {\n kind: Kind.DOCUMENT,\n definitions: [t],\n }).definitions[0]\n : t,\n ),\n ),\n ...fragments.map((name) => `...${name}.definitions`),\n ].join();\n\n return `{\"kind\":\"${Kind.DOCUMENT}\",\"definitions\":[${definitions}]}`;\n }\n if (annotate) {\n gqlObj = this._transformDocumentNodeToSupermassive(gqlObj);\n }\n\n return JSON.stringify(gqlObj);\n } else if (this.config.documentMode === DocumentMode.string) {\n return \"`\" + doc + \"`\";\n }\n\n const gqlImport = this._parseImport(this.config.gqlImport || \"graphql-tag\");\n\n return (gqlImport.propName || \"gql\") + \"`\" + doc + \"`\";\n }\n\n private _transformDocumentNodeToSupermassive(document: DocumentNode) {\n return {\n ...document,\n definitions: document.definitions.map(\n (t) =>\n this.addTypesToRequestDocument(this._schema, {\n kind: Kind.DOCUMENT,\n definitions: [t],\n }).definitions[0],\n ),\n } as DocumentNode;\n }\n protected getDocumentNodeSignature(\n resultType: string,\n variablesTypes: string,\n node: FragmentDefinitionNode | OperationDefinitionNode,\n ) {\n if (\n this.config.documentMode === DocumentMode.documentNode ||\n this.config.documentMode === DocumentMode.documentNodeImportFragments ||\n this.config.documentMode === DocumentMode.graphQLTag\n ) {\n return ` as unknown as DocumentNode<${resultType}, ${variablesTypes}>`;\n }\n\n return super.getDocumentNodeSignature(resultType, variablesTypes, node);\n }\n\n private addTypesToRequestDocument(\n schema: GraphQLSchema,\n document: DocumentNode,\n ) {\n let finalDocument = document;\n if (\n this.config.supermassiveDocumentNodeOutputType === \"V3\" ||\n this.config.supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addMinimalViableSchemaToRequestDocument(\n schema,\n document,\n {\n addTo: \"PROPERTY\",\n },\n );\n }\n\n if (\n this.config.supermassiveDocumentNodeOutputType === \"V2\" ||\n this.config.supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addSupermassiveLegacyTypesToRequestDocument(\n schema,\n document,\n ) as unknown as DocumentNode;\n }\n return finalDocument;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,cAAc;AAErB;AAAA,EAEE;AAAA,EAEA;AAAA,OAEK;AACP;AAAA,EAIE;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AACrC,OAAO,YAAY;AAaZ,IAAM,iCAAN,cAA6C,sBAGlD;AAAA,EACA,YACE,QACA,WACA,WACA,WACA;AACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,QACE,cAAc,aAAa;AAAA,QAC3B,oBACE;AAAA,SACC;AAAA,MAEL;AAAA,QACE,qCACE,UAAU;AAAA,QACZ,oCACE,UAAU,sCAAsC;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AAEA,aAAS,IAAI;AAGb,QAAI,KAAK,OAAO,iBAAiB,aAAa,YAAY;AACxD,YAAM,qBAAqB,KAAK;AAAA,QAC9B,KAAK,OAAO,sBAAsB;AAAA,MACpC;AACA,YAAM,YAAY,KAAK;AAAA,QACrB;AAAA,QACA;AAAA,QACA;AAAA,MACF;AACA,WAAK,SAAS,IAAI,SAAS;AAAA,IAC7B;AAAA,EACF;AAAA,EAEU,KACR,MACQ;AACR,QAAI,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AA,QACd;AAAA,QACA;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphitation/graphql-codegen-supermassive-typed-document-node-plugin",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"main": "./lib/index",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@graphql-codegen/visitor-plugin-common": ">= ^1.17.0 < 2",
|
|
29
29
|
"graphql-tag": ">= 2.11.0 < 3",
|
|
30
30
|
"@graphql-tools/optimize": "^1.0.1",
|
|
31
|
-
"@graphitation/supermassive
|
|
31
|
+
"@graphitation/supermassive": "^3.1.0"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
34
|
"access": "public",
|