@graphitation/apollo-react-relay-duct-tape-compiler 1.3.0 → 1.3.1
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 +10 -2
- package/lib/formatModule.js +8 -4
- package/lib/formatModule.js.map +2 -2
- package/lib/formatModule.mjs +8 -4
- package/lib/formatModule.mjs.map +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @graphitation/apollo-react-relay-duct-tape-compiler
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed, 27 Sep 2023
|
|
3
|
+
This log was last generated on Wed, 27 Sep 2023 14:33:43 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.3.1
|
|
8
|
+
|
|
9
|
+
Wed, 27 Sep 2023 14:33:43 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Fix transforms to actually do both v3 and v2 (mnovikov@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 1.3.0
|
|
8
16
|
|
|
9
|
-
Wed, 27 Sep 2023 08:50:
|
|
17
|
+
Wed, 27 Sep 2023 08:50:33 GMT
|
|
10
18
|
|
|
11
19
|
### Minor changes
|
|
12
20
|
|
package/lib/formatModule.js
CHANGED
|
@@ -157,14 +157,18 @@ export default documents;`;
|
|
|
157
157
|
function addTypesToRequestDocument(schema, document, supermassiveDocumentNodeOutputType, addMinimalViableSchemaToRequestDocument, addSupermassiveLegacyTypesToRequestDocument) {
|
|
158
158
|
let finalDocument = document;
|
|
159
159
|
if (supermassiveDocumentNodeOutputType === "V3" || supermassiveDocumentNodeOutputType === "BOTH") {
|
|
160
|
-
finalDocument = addMinimalViableSchemaToRequestDocument(
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
finalDocument = addMinimalViableSchemaToRequestDocument(
|
|
161
|
+
schema,
|
|
162
|
+
finalDocument,
|
|
163
|
+
{
|
|
164
|
+
addTo: "PROPERTY"
|
|
165
|
+
}
|
|
166
|
+
);
|
|
163
167
|
}
|
|
164
168
|
if (supermassiveDocumentNodeOutputType === "V2" || supermassiveDocumentNodeOutputType === "BOTH" || !supermassiveDocumentNodeOutputType) {
|
|
165
169
|
finalDocument = addSupermassiveLegacyTypesToRequestDocument(
|
|
166
170
|
schema,
|
|
167
|
-
|
|
171
|
+
finalDocument
|
|
168
172
|
);
|
|
169
173
|
}
|
|
170
174
|
return finalDocument;
|
package/lib/formatModule.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/formatModule.ts"],
|
|
4
|
-
"sourcesContent": ["import { parse, print } from \"graphql\";\nimport { optimizeDocumentNode } from \"@graphql-tools/optimize\";\nimport { reduceNodeWatchQueryTransform } from \"./formatModuleTransforms/reduceNodeWatchQueryTransform\";\nimport invariant from \"invariant\";\nimport { stripFragmentReferenceFieldSelectionTransform } from \"./formatModuleTransforms/stripFragmentReferenceFieldSelectionTransform\";\nimport { extractMetadataTransform } from \"./formatModuleTransforms/extractMetadataTransform\";\nimport { buildSchema, Source } from \"graphql\";\nimport { readFileSync } from \"fs\";\nimport dedupeJSONStringify from \"relay-compiler/lib/util/dedupeJSONStringify\";\n\nimport type { DocumentNode, GraphQLSchema } from \"graphql\";\nimport type { FormatModule } from \"relay-compiler/lib/language/RelayLanguagePluginInterface\";\nimport type { CompiledArtefactModule } from \"./types\";\nimport { Fragment } from \"relay-compiler\";\n\nexport type SupermassiveOutputType = \"V3\" | \"V2\" | \"BOTH\";\n\nexport interface FormatModuleOptions {\n emitDocuments: boolean;\n emitNarrowObservables: boolean;\n emitQueryDebugComments: boolean;\n emitSupermassiveDocuments: boolean;\n supermassiveDocumentNodeOutputType: SupermassiveOutputType;\n schema: string;\n}\n\nfunction printDocumentComment(document: DocumentNode) {\n return `/*\\n${print(document).trim()}\\n*/`;\n}\n\nexport async function formatModuleFactory(\n options: FormatModuleOptions,\n): Promise<FormatModule> {\n const schema =\n options.emitNarrowObservables || options.emitSupermassiveDocuments\n ? buildSchema(\n new Source(readFileSync(options.schema, \"utf-8\"), options.schema),\n )\n : null;\n\n let addSupermassiveLegacyTypesToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addSupermassiveLegacyTypesToRequestDocument;\n let addMinimalViableSchemaToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addMinimalViableSchemaToRequestDocument;\n if (options.emitSupermassiveDocuments) {\n ({\n addSupermassiveLegacyTypesToRequestDocument,\n addMinimalViableSchemaToRequestDocument,\n } = await import(\"@graphitation/supermassive\"));\n }\n\n function generateExports(\n moduleName: string,\n docText: string,\n emitNarrowObservables: boolean,\n ) {\n const exports: CompiledArtefactModule = {};\n const originalDocument = parse(docText, { noLocation: true });\n const optimizedDocument = optimizeDocumentNode(originalDocument);\n\n if (!emitNarrowObservables) {\n exports.executionQueryDocument = optimizedDocument;\n } else {\n if (!moduleName.endsWith(\"WatchNodeQuery.graphql\")) {\n exports.executionQueryDocument =\n stripFragmentReferenceFieldSelectionTransform(optimizedDocument);\n }\n\n invariant(schema, \"Expected a schema instance\");\n exports.watchQueryDocument = reduceNodeWatchQueryTransform(\n schema,\n optimizedDocument,\n );\n\n exports.metadata = extractMetadataTransform(exports.watchQueryDocument);\n }\n\n if (options.emitSupermassiveDocuments && exports.executionQueryDocument) {\n invariant(schema, \"Expected a schema instance\");\n exports.executionQueryDocument = addTypesToRequestDocument(\n schema,\n exports.executionQueryDocument,\n options.supermassiveDocumentNodeOutputType,\n addMinimalViableSchemaToRequestDocument,\n addSupermassiveLegacyTypesToRequestDocument,\n ) as DocumentNode;\n }\n\n return exports;\n }\n\n return ({ docText, hash, moduleName, typeText, definition }) => {\n const exports = options.emitDocuments\n ? docText &&\n generateExports(\n moduleName,\n docText,\n options.emitNarrowObservables &&\n definition.kind === \"Request\" &&\n definition.root.operation === \"query\",\n )\n : null;\n const reExportWatchNodeQuery =\n options.emitDocuments && definition.kind === \"Fragment\";\n\n const components = [\n typeText,\n exports &&\n options.emitQueryDebugComments &&\n exports.executionQueryDocument &&\n printDocumentComment(exports.executionQueryDocument),\n exports &&\n options.emitQueryDebugComments &&\n exports.watchQueryDocument &&\n printDocumentComment(exports.watchQueryDocument),\n exports && printExports(exports),\n reExportWatchNodeQuery && printWatchNodeQueryReExport(definition),\n ].filter(Boolean) as string[];\n\n return `/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n${hash ? `/* ${hash} */\\n` : \"\"}\n${components.join(\"\\n\\n\")}`;\n };\n}\n\n// TODO: hould simply not emit a WatchNodeQuery refetchable directive when there already is a @refetchable directive\nfunction printWatchNodeQueryReExport(definition: Fragment) {\n const refetchable =\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Source\",\n ) ||\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Generated\",\n );\n if (!refetchable) {\n return undefined;\n }\n const queryNameArg = refetchable.args[0];\n invariant(\n queryNameArg.name === \"queryName\" && queryNameArg.value.kind === \"Literal\",\n \"Expected a @refetchable(queryName:) argument\",\n );\n\n return `import { documents } from \"./${queryNameArg.value.value}.graphql\";\\nexport default documents;`;\n}\n\nfunction printExports(exports: CompiledArtefactModule) {\n return `export const documents: import(\"@graphitation/apollo-react-relay-duct-tape-compiler\").CompiledArtefactModule = ${dedupeJSONStringify(\n exports,\n )};\\n\\nexport default documents;`;\n}\n\nfunction addTypesToRequestDocument(\n schema: GraphQLSchema,\n document: DocumentNode,\n supermassiveDocumentNodeOutputType: SupermassiveOutputType,\n addMinimalViableSchemaToRequestDocument: any,\n addSupermassiveLegacyTypesToRequestDocument: any,\n) {\n let finalDocument = document;\n if (\n supermassiveDocumentNodeOutputType === \"V3\" ||\n supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addMinimalViableSchemaToRequest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,IACvH;AAAA,EACF;AAAA;AAAA;AACF;AAEA,SAAS,0BACP,QACA,UACA,oCACA,yCACA,6CACA;AACA,MAAI,gBAAgB;AACpB,MACE,uCAAuC,QACvC,uCAAuC,QACvC;AACA,oBAAgB,
|
|
4
|
+
"sourcesContent": ["import { parse, print } from \"graphql\";\nimport { optimizeDocumentNode } from \"@graphql-tools/optimize\";\nimport { reduceNodeWatchQueryTransform } from \"./formatModuleTransforms/reduceNodeWatchQueryTransform\";\nimport invariant from \"invariant\";\nimport { stripFragmentReferenceFieldSelectionTransform } from \"./formatModuleTransforms/stripFragmentReferenceFieldSelectionTransform\";\nimport { extractMetadataTransform } from \"./formatModuleTransforms/extractMetadataTransform\";\nimport { buildSchema, Source } from \"graphql\";\nimport { readFileSync } from \"fs\";\nimport dedupeJSONStringify from \"relay-compiler/lib/util/dedupeJSONStringify\";\n\nimport type { DocumentNode, GraphQLSchema } from \"graphql\";\nimport type { FormatModule } from \"relay-compiler/lib/language/RelayLanguagePluginInterface\";\nimport type { CompiledArtefactModule } from \"./types\";\nimport { Fragment } from \"relay-compiler\";\n\nexport type SupermassiveOutputType = \"V3\" | \"V2\" | \"BOTH\";\n\nexport interface FormatModuleOptions {\n emitDocuments: boolean;\n emitNarrowObservables: boolean;\n emitQueryDebugComments: boolean;\n emitSupermassiveDocuments: boolean;\n supermassiveDocumentNodeOutputType: SupermassiveOutputType;\n schema: string;\n}\n\nfunction printDocumentComment(document: DocumentNode) {\n return `/*\\n${print(document).trim()}\\n*/`;\n}\n\nexport async function formatModuleFactory(\n options: FormatModuleOptions,\n): Promise<FormatModule> {\n const schema =\n options.emitNarrowObservables || options.emitSupermassiveDocuments\n ? buildSchema(\n new Source(readFileSync(options.schema, \"utf-8\"), options.schema),\n )\n : null;\n\n let addSupermassiveLegacyTypesToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addSupermassiveLegacyTypesToRequestDocument;\n let addMinimalViableSchemaToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addMinimalViableSchemaToRequestDocument;\n if (options.emitSupermassiveDocuments) {\n ({\n addSupermassiveLegacyTypesToRequestDocument,\n addMinimalViableSchemaToRequestDocument,\n } = await import(\"@graphitation/supermassive\"));\n }\n\n function generateExports(\n moduleName: string,\n docText: string,\n emitNarrowObservables: boolean,\n ) {\n const exports: CompiledArtefactModule = {};\n const originalDocument = parse(docText, { noLocation: true });\n const optimizedDocument = optimizeDocumentNode(originalDocument);\n\n if (!emitNarrowObservables) {\n exports.executionQueryDocument = optimizedDocument;\n } else {\n if (!moduleName.endsWith(\"WatchNodeQuery.graphql\")) {\n exports.executionQueryDocument =\n stripFragmentReferenceFieldSelectionTransform(optimizedDocument);\n }\n\n invariant(schema, \"Expected a schema instance\");\n exports.watchQueryDocument = reduceNodeWatchQueryTransform(\n schema,\n optimizedDocument,\n );\n\n exports.metadata = extractMetadataTransform(exports.watchQueryDocument);\n }\n\n if (options.emitSupermassiveDocuments && exports.executionQueryDocument) {\n invariant(schema, \"Expected a schema instance\");\n exports.executionQueryDocument = addTypesToRequestDocument(\n schema,\n exports.executionQueryDocument,\n options.supermassiveDocumentNodeOutputType,\n addMinimalViableSchemaToRequestDocument,\n addSupermassiveLegacyTypesToRequestDocument,\n ) as DocumentNode;\n }\n\n return exports;\n }\n\n return ({ docText, hash, moduleName, typeText, definition }) => {\n const exports = options.emitDocuments\n ? docText &&\n generateExports(\n moduleName,\n docText,\n options.emitNarrowObservables &&\n definition.kind === \"Request\" &&\n definition.root.operation === \"query\",\n )\n : null;\n const reExportWatchNodeQuery =\n options.emitDocuments && definition.kind === \"Fragment\";\n\n const components = [\n typeText,\n exports &&\n options.emitQueryDebugComments &&\n exports.executionQueryDocument &&\n printDocumentComment(exports.executionQueryDocument),\n exports &&\n options.emitQueryDebugComments &&\n exports.watchQueryDocument &&\n printDocumentComment(exports.watchQueryDocument),\n exports && printExports(exports),\n reExportWatchNodeQuery && printWatchNodeQueryReExport(definition),\n ].filter(Boolean) as string[];\n\n return `/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n${hash ? `/* ${hash} */\\n` : \"\"}\n${components.join(\"\\n\\n\")}`;\n };\n}\n\n// TODO: hould simply not emit a WatchNodeQuery refetchable directive when there already is a @refetchable directive\nfunction printWatchNodeQueryReExport(definition: Fragment) {\n const refetchable =\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Source\",\n ) ||\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Generated\",\n );\n if (!refetchable) {\n return undefined;\n }\n const queryNameArg = refetchable.args[0];\n invariant(\n queryNameArg.name === \"queryName\" && queryNameArg.value.kind === \"Literal\",\n \"Expected a @refetchable(queryName:) argument\",\n );\n\n return `import { documents } from \"./${queryNameArg.value.value}.graphql\";\\nexport default documents;`;\n}\n\nfunction printExports(exports: CompiledArtefactModule) {\n return `export const documents: import(\"@graphitation/apollo-react-relay-duct-tape-compiler\").CompiledArtefactModule = ${dedupeJSONStringify(\n exports,\n )};\\n\\nexport default documents;`;\n}\n\nfunction addTypesToRequestDocument(\n schema: GraphQLSchema,\n document: DocumentNode,\n supermassiveDocumentNodeOutputType: SupermassiveOutputType,\n addMinimalViableSchemaToRequestDocument: any,\n addSupermassiveLegacyTypesToRequestDocument: any,\n) {\n let finalDocument = document;\n if (\n supermassiveDocumentNodeOutputType === \"V3\" ||\n supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addMinimalViableSchemaToRequestDocument(\n schema,\n finalDocument,\n {\n addTo: \"PROPERTY\",\n },\n );\n }\n\n if (\n supermassiveDocumentNodeOutputType === \"V2\" ||\n supermassiveDocumentNodeOutputType === \"BOTH\" ||\n !supermassiveDocumentNodeOutputType\n ) {\n finalDocument = addSupermassiveLegacyTypesToRequestDocument(\n schema,\n finalDocument,\n ) as unknown as DocumentNode;\n }\n return finalDocument;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,6CACA;AACA,MAAI,gBAAgB;AACpB,MACE,uCAAuC,QACvC,uCAAuC,QACvC;AACA,oBAAgB;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,QACE,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,MACE,uCAAuC,QACvC,uCAAuC,UACvC,CAAC,oCACD;AACA,oBAAgB;AAAA,MACd;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
6
|
"names": ["import_graphql", "invariant", "dedupeJSONStringify"]
|
|
7
7
|
}
|
package/lib/formatModule.mjs
CHANGED
|
@@ -126,14 +126,18 @@ export default documents;`;
|
|
|
126
126
|
function addTypesToRequestDocument(schema, document, supermassiveDocumentNodeOutputType, addMinimalViableSchemaToRequestDocument, addSupermassiveLegacyTypesToRequestDocument) {
|
|
127
127
|
let finalDocument = document;
|
|
128
128
|
if (supermassiveDocumentNodeOutputType === "V3" || supermassiveDocumentNodeOutputType === "BOTH") {
|
|
129
|
-
finalDocument = addMinimalViableSchemaToRequestDocument(
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
finalDocument = addMinimalViableSchemaToRequestDocument(
|
|
130
|
+
schema,
|
|
131
|
+
finalDocument,
|
|
132
|
+
{
|
|
133
|
+
addTo: "PROPERTY"
|
|
134
|
+
}
|
|
135
|
+
);
|
|
132
136
|
}
|
|
133
137
|
if (supermassiveDocumentNodeOutputType === "V2" || supermassiveDocumentNodeOutputType === "BOTH" || !supermassiveDocumentNodeOutputType) {
|
|
134
138
|
finalDocument = addSupermassiveLegacyTypesToRequestDocument(
|
|
135
139
|
schema,
|
|
136
|
-
|
|
140
|
+
finalDocument
|
|
137
141
|
);
|
|
138
142
|
}
|
|
139
143
|
return finalDocument;
|
package/lib/formatModule.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/formatModule.ts"],
|
|
4
|
-
"sourcesContent": ["import { parse, print } from \"graphql\";\nimport { optimizeDocumentNode } from \"@graphql-tools/optimize\";\nimport { reduceNodeWatchQueryTransform } from \"./formatModuleTransforms/reduceNodeWatchQueryTransform\";\nimport invariant from \"invariant\";\nimport { stripFragmentReferenceFieldSelectionTransform } from \"./formatModuleTransforms/stripFragmentReferenceFieldSelectionTransform\";\nimport { extractMetadataTransform } from \"./formatModuleTransforms/extractMetadataTransform\";\nimport { buildSchema, Source } from \"graphql\";\nimport { readFileSync } from \"fs\";\nimport dedupeJSONStringify from \"relay-compiler/lib/util/dedupeJSONStringify\";\n\nimport type { DocumentNode, GraphQLSchema } from \"graphql\";\nimport type { FormatModule } from \"relay-compiler/lib/language/RelayLanguagePluginInterface\";\nimport type { CompiledArtefactModule } from \"./types\";\nimport { Fragment } from \"relay-compiler\";\n\nexport type SupermassiveOutputType = \"V3\" | \"V2\" | \"BOTH\";\n\nexport interface FormatModuleOptions {\n emitDocuments: boolean;\n emitNarrowObservables: boolean;\n emitQueryDebugComments: boolean;\n emitSupermassiveDocuments: boolean;\n supermassiveDocumentNodeOutputType: SupermassiveOutputType;\n schema: string;\n}\n\nfunction printDocumentComment(document: DocumentNode) {\n return `/*\\n${print(document).trim()}\\n*/`;\n}\n\nexport async function formatModuleFactory(\n options: FormatModuleOptions,\n): Promise<FormatModule> {\n const schema =\n options.emitNarrowObservables || options.emitSupermassiveDocuments\n ? buildSchema(\n new Source(readFileSync(options.schema, \"utf-8\"), options.schema),\n )\n : null;\n\n let addSupermassiveLegacyTypesToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addSupermassiveLegacyTypesToRequestDocument;\n let addMinimalViableSchemaToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addMinimalViableSchemaToRequestDocument;\n if (options.emitSupermassiveDocuments) {\n ({\n addSupermassiveLegacyTypesToRequestDocument,\n addMinimalViableSchemaToRequestDocument,\n } = await import(\"@graphitation/supermassive\"));\n }\n\n function generateExports(\n moduleName: string,\n docText: string,\n emitNarrowObservables: boolean,\n ) {\n const exports: CompiledArtefactModule = {};\n const originalDocument = parse(docText, { noLocation: true });\n const optimizedDocument = optimizeDocumentNode(originalDocument);\n\n if (!emitNarrowObservables) {\n exports.executionQueryDocument = optimizedDocument;\n } else {\n if (!moduleName.endsWith(\"WatchNodeQuery.graphql\")) {\n exports.executionQueryDocument =\n stripFragmentReferenceFieldSelectionTransform(optimizedDocument);\n }\n\n invariant(schema, \"Expected a schema instance\");\n exports.watchQueryDocument = reduceNodeWatchQueryTransform(\n schema,\n optimizedDocument,\n );\n\n exports.metadata = extractMetadataTransform(exports.watchQueryDocument);\n }\n\n if (options.emitSupermassiveDocuments && exports.executionQueryDocument) {\n invariant(schema, \"Expected a schema instance\");\n exports.executionQueryDocument = addTypesToRequestDocument(\n schema,\n exports.executionQueryDocument,\n options.supermassiveDocumentNodeOutputType,\n addMinimalViableSchemaToRequestDocument,\n addSupermassiveLegacyTypesToRequestDocument,\n ) as DocumentNode;\n }\n\n return exports;\n }\n\n return ({ docText, hash, moduleName, typeText, definition }) => {\n const exports = options.emitDocuments\n ? docText &&\n generateExports(\n moduleName,\n docText,\n options.emitNarrowObservables &&\n definition.kind === \"Request\" &&\n definition.root.operation === \"query\",\n )\n : null;\n const reExportWatchNodeQuery =\n options.emitDocuments && definition.kind === \"Fragment\";\n\n const components = [\n typeText,\n exports &&\n options.emitQueryDebugComments &&\n exports.executionQueryDocument &&\n printDocumentComment(exports.executionQueryDocument),\n exports &&\n options.emitQueryDebugComments &&\n exports.watchQueryDocument &&\n printDocumentComment(exports.watchQueryDocument),\n exports && printExports(exports),\n reExportWatchNodeQuery && printWatchNodeQueryReExport(definition),\n ].filter(Boolean) as string[];\n\n return `/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n${hash ? `/* ${hash} */\\n` : \"\"}\n${components.join(\"\\n\\n\")}`;\n };\n}\n\n// TODO: hould simply not emit a WatchNodeQuery refetchable directive when there already is a @refetchable directive\nfunction printWatchNodeQueryReExport(definition: Fragment) {\n const refetchable =\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Source\",\n ) ||\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Generated\",\n );\n if (!refetchable) {\n return undefined;\n }\n const queryNameArg = refetchable.args[0];\n invariant(\n queryNameArg.name === \"queryName\" && queryNameArg.value.kind === \"Literal\",\n \"Expected a @refetchable(queryName:) argument\",\n );\n\n return `import { documents } from \"./${queryNameArg.value.value}.graphql\";\\nexport default documents;`;\n}\n\nfunction printExports(exports: CompiledArtefactModule) {\n return `export const documents: import(\"@graphitation/apollo-react-relay-duct-tape-compiler\").CompiledArtefactModule = ${dedupeJSONStringify(\n exports,\n )};\\n\\nexport default documents;`;\n}\n\nfunction addTypesToRequestDocument(\n schema: GraphQLSchema,\n document: DocumentNode,\n supermassiveDocumentNodeOutputType: SupermassiveOutputType,\n addMinimalViableSchemaToRequestDocument: any,\n addSupermassiveLegacyTypesToRequestDocument: any,\n) {\n let finalDocument = document;\n if (\n supermassiveDocumentNodeOutputType === \"V3\" ||\n supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addMinimalViableSchemaToRequestDocument(schema
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,OAAO,aAAa;AAC7B,SAAS,4BAA4B;AACrC,SAAS,qCAAqC;AAC9C,OAAO,eAAe;AACtB,SAAS,qDAAqD;AAC9D,SAAS,gCAAgC;AACzC,SAAS,aAAa,cAAc;AACpC,SAAS,oBAAoB;AAC7B,OAAO,yBAAyB;AAkBhC,SAAS,qBAAqB,UAAwB;AACpD,SAAO;AAAA,EAAO,MAAM,QAAQ,EAAE,KAAK;AAAA;AACrC;AAEA,SAAsB,oBACpB,SACuB;AAAA;AACvB,UAAM,SACJ,QAAQ,yBAAyB,QAAQ,4BACrC;AAAA,MACE,IAAI,OAAO,aAAa,QAAQ,QAAQ,OAAO,GAAG,QAAQ,MAAM;AAAA,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AA,QACjD,WAAW,aAAa,OAAO;AAAA,QAC/B,0BAA0B,4BAA4B,UAAU;AAAA,MAClE,EAAE,OAAO,OAAO;AAEhB,aAAO;AAAA;AAAA;AAAA,EAGT,OAAO,MAAM;AAAA,IAAc;AAAA,EAC3B,WAAW,KAAK,MAAM;AAAA,IACtB;AAAA,EACF;AAAA;AAGA,SAAS,4BAA4B,YAAsB;AACzD,QAAM,cACJ,WAAW,WAAW;AAAA,IACpB,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,IAAI,SAAS;AAAA,EACpD,KACA,WAAW,WAAW;AAAA,IACpB,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,IAAI,SAAS;AAAA,EACpD;AACF,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AACA,QAAM,eAAe,YAAY,KAAK,CAAC;AACvC;AAAA,IACE,aAAa,SAAS,eAAe,aAAa,MAAM,SAAS;AAAA,IACjE;AAAA,EACF;AAEA,SAAO,gCAAgC,aAAa,MAAM;AAAA;AAC5D;AAEA,SAAS,aAAa,SAAiC;AACrD,SAAO,kHAAkH;AAAA,IACvH;AAAA,EACF;AAAA;AAAA;AACF;AAEA,SAAS,0BACP,QACA,UACA,oCACA,yCACA,6CACA;AACA,MAAI,gBAAgB;AACpB,MACE,uCAAuC,QACvC,uCAAuC,QACvC;AACA,oBAAgB,
|
|
4
|
+
"sourcesContent": ["import { parse, print } from \"graphql\";\nimport { optimizeDocumentNode } from \"@graphql-tools/optimize\";\nimport { reduceNodeWatchQueryTransform } from \"./formatModuleTransforms/reduceNodeWatchQueryTransform\";\nimport invariant from \"invariant\";\nimport { stripFragmentReferenceFieldSelectionTransform } from \"./formatModuleTransforms/stripFragmentReferenceFieldSelectionTransform\";\nimport { extractMetadataTransform } from \"./formatModuleTransforms/extractMetadataTransform\";\nimport { buildSchema, Source } from \"graphql\";\nimport { readFileSync } from \"fs\";\nimport dedupeJSONStringify from \"relay-compiler/lib/util/dedupeJSONStringify\";\n\nimport type { DocumentNode, GraphQLSchema } from \"graphql\";\nimport type { FormatModule } from \"relay-compiler/lib/language/RelayLanguagePluginInterface\";\nimport type { CompiledArtefactModule } from \"./types\";\nimport { Fragment } from \"relay-compiler\";\n\nexport type SupermassiveOutputType = \"V3\" | \"V2\" | \"BOTH\";\n\nexport interface FormatModuleOptions {\n emitDocuments: boolean;\n emitNarrowObservables: boolean;\n emitQueryDebugComments: boolean;\n emitSupermassiveDocuments: boolean;\n supermassiveDocumentNodeOutputType: SupermassiveOutputType;\n schema: string;\n}\n\nfunction printDocumentComment(document: DocumentNode) {\n return `/*\\n${print(document).trim()}\\n*/`;\n}\n\nexport async function formatModuleFactory(\n options: FormatModuleOptions,\n): Promise<FormatModule> {\n const schema =\n options.emitNarrowObservables || options.emitSupermassiveDocuments\n ? buildSchema(\n new Source(readFileSync(options.schema, \"utf-8\"), options.schema),\n )\n : null;\n\n let addSupermassiveLegacyTypesToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addSupermassiveLegacyTypesToRequestDocument;\n let addMinimalViableSchemaToRequestDocument:\n | undefined\n | typeof import(\"@graphitation/supermassive\").addMinimalViableSchemaToRequestDocument;\n if (options.emitSupermassiveDocuments) {\n ({\n addSupermassiveLegacyTypesToRequestDocument,\n addMinimalViableSchemaToRequestDocument,\n } = await import(\"@graphitation/supermassive\"));\n }\n\n function generateExports(\n moduleName: string,\n docText: string,\n emitNarrowObservables: boolean,\n ) {\n const exports: CompiledArtefactModule = {};\n const originalDocument = parse(docText, { noLocation: true });\n const optimizedDocument = optimizeDocumentNode(originalDocument);\n\n if (!emitNarrowObservables) {\n exports.executionQueryDocument = optimizedDocument;\n } else {\n if (!moduleName.endsWith(\"WatchNodeQuery.graphql\")) {\n exports.executionQueryDocument =\n stripFragmentReferenceFieldSelectionTransform(optimizedDocument);\n }\n\n invariant(schema, \"Expected a schema instance\");\n exports.watchQueryDocument = reduceNodeWatchQueryTransform(\n schema,\n optimizedDocument,\n );\n\n exports.metadata = extractMetadataTransform(exports.watchQueryDocument);\n }\n\n if (options.emitSupermassiveDocuments && exports.executionQueryDocument) {\n invariant(schema, \"Expected a schema instance\");\n exports.executionQueryDocument = addTypesToRequestDocument(\n schema,\n exports.executionQueryDocument,\n options.supermassiveDocumentNodeOutputType,\n addMinimalViableSchemaToRequestDocument,\n addSupermassiveLegacyTypesToRequestDocument,\n ) as DocumentNode;\n }\n\n return exports;\n }\n\n return ({ docText, hash, moduleName, typeText, definition }) => {\n const exports = options.emitDocuments\n ? docText &&\n generateExports(\n moduleName,\n docText,\n options.emitNarrowObservables &&\n definition.kind === \"Request\" &&\n definition.root.operation === \"query\",\n )\n : null;\n const reExportWatchNodeQuery =\n options.emitDocuments && definition.kind === \"Fragment\";\n\n const components = [\n typeText,\n exports &&\n options.emitQueryDebugComments &&\n exports.executionQueryDocument &&\n printDocumentComment(exports.executionQueryDocument),\n exports &&\n options.emitQueryDebugComments &&\n exports.watchQueryDocument &&\n printDocumentComment(exports.watchQueryDocument),\n exports && printExports(exports),\n reExportWatchNodeQuery && printWatchNodeQueryReExport(definition),\n ].filter(Boolean) as string[];\n\n return `/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n${hash ? `/* ${hash} */\\n` : \"\"}\n${components.join(\"\\n\\n\")}`;\n };\n}\n\n// TODO: hould simply not emit a WatchNodeQuery refetchable directive when there already is a @refetchable directive\nfunction printWatchNodeQueryReExport(definition: Fragment) {\n const refetchable =\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Source\",\n ) ||\n definition.directives.find(\n (d) => d.name === \"refetchable\" && d.loc.kind === \"Generated\",\n );\n if (!refetchable) {\n return undefined;\n }\n const queryNameArg = refetchable.args[0];\n invariant(\n queryNameArg.name === \"queryName\" && queryNameArg.value.kind === \"Literal\",\n \"Expected a @refetchable(queryName:) argument\",\n );\n\n return `import { documents } from \"./${queryNameArg.value.value}.graphql\";\\nexport default documents;`;\n}\n\nfunction printExports(exports: CompiledArtefactModule) {\n return `export const documents: import(\"@graphitation/apollo-react-relay-duct-tape-compiler\").CompiledArtefactModule = ${dedupeJSONStringify(\n exports,\n )};\\n\\nexport default documents;`;\n}\n\nfunction addTypesToRequestDocument(\n schema: GraphQLSchema,\n document: DocumentNode,\n supermassiveDocumentNodeOutputType: SupermassiveOutputType,\n addMinimalViableSchemaToRequestDocument: any,\n addSupermassiveLegacyTypesToRequestDocument: any,\n) {\n let finalDocument = document;\n if (\n supermassiveDocumentNodeOutputType === \"V3\" ||\n supermassiveDocumentNodeOutputType === \"BOTH\"\n ) {\n finalDocument = addMinimalViableSchemaToRequestDocument(\n schema,\n finalDocument,\n {\n addTo: \"PROPERTY\",\n },\n );\n }\n\n if (\n supermassiveDocumentNodeOutputType === \"V2\" ||\n supermassiveDocumentNodeOutputType === \"BOTH\" ||\n !supermassiveDocumentNodeOutputType\n ) {\n finalDocument = addSupermassiveLegacyTypesToRequestDocument(\n schema,\n finalDocument,\n ) as unknown as DocumentNode;\n }\n return finalDocument;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,OAAO,aAAa;AAC7B,SAAS,4BAA4B;AACrC,SAAS,qCAAqC;AAC9C,OAAO,eAAe;AACtB,SAAS,qDAAqD;AAC9D,SAAS,gCAAgC;AACzC,SAAS,aAAa,cAAc;AACpC,SAAS,oBAAoB;AAC7B,OAAO,yBAAyB;AAkBhC,SAAS,qBAAqB,UAAwB;AACpD,SAAO;AAAA,EAAO,MAAM,QAAQ,EAAE,KAAK;AAAA;AACrC;AAEA,SAAsB,oBACpB,SACuB;AAAA;AACvB,UAAM,SACJ,QAAQ,yBAAyB,QAAQ,4BACrC;AAAA,MACE,IAAI,OAAO,aAAa,QAAQ,QAAQ,OAAO,GAAG,QAAQ,MAAM;AAAA,IAClE,IACA;AAEN,QAAI;AAGJ,QAAI;AAGJ,QAAI,QAAQ,2BAA2B;AACrC,OAAC;AAAA,QACC;AAAA,QACA;AAAA,MACF,IAAI,MA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;AAAA,EAGT,OAAO,MAAM;AAAA,IAAc;AAAA,EAC3B,WAAW,KAAK,MAAM;AAAA,IACtB;AAAA,EACF;AAAA;AAGA,SAAS,4BAA4B,YAAsB;AACzD,QAAM,cACJ,WAAW,WAAW;AAAA,IACpB,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,IAAI,SAAS;AAAA,EACpD,KACA,WAAW,WAAW;AAAA,IACpB,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,IAAI,SAAS;AAAA,EACpD;AACF,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AACA,QAAM,eAAe,YAAY,KAAK,CAAC;AACvC;AAAA,IACE,aAAa,SAAS,eAAe,aAAa,MAAM,SAAS;AAAA,IACjE;AAAA,EACF;AAEA,SAAO,gCAAgC,aAAa,MAAM;AAAA;AAC5D;AAEA,SAAS,aAAa,SAAiC;AACrD,SAAO,kHAAkH;AAAA,IACvH;AAAA,EACF;AAAA;AAAA;AACF;AAEA,SAAS,0BACP,QACA,UACA,oCACA,yCACA,6CACA;AACA,MAAI,gBAAgB;AACpB,MACE,uCAAuC,QACvC,uCAAuC,QACvC;AACA,oBAAgB;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,QACE,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,MACE,uCAAuC,QACvC,uCAAuC,UACvC,CAAC,oCACD;AACA,oBAAgB;AAAA,MACd;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphitation/apollo-react-relay-duct-tape-compiler",
|
|
3
3
|
"description": "The build tools to cater to @graphitation/apollo-react-relay-duct-tape's needs.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.3.
|
|
5
|
+
"version": "1.3.1",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"duct-tape-compiler": "./lib/cli.js"
|