@graphql-codegen/typescript-document-nodes 2.1.6 → 2.2.1-alpha-3b5c0246d.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/index.js +2 -1
- package/index.mjs +3 -2
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
6
|
|
|
7
|
+
const pluginHelpers = require('@graphql-codegen/plugin-helpers');
|
|
7
8
|
const graphql = require('graphql');
|
|
8
9
|
const autoBind = _interopDefault(require('auto-bind'));
|
|
9
10
|
const visitorPluginCommon = require('@graphql-codegen/visitor-plugin-common');
|
|
@@ -33,7 +34,7 @@ const plugin = (schema, documents, config) => {
|
|
|
33
34
|
...(config.externalFragments || []),
|
|
34
35
|
];
|
|
35
36
|
const visitor = new TypeScriptDocumentNodesVisitor(schema, allFragments, config, documents);
|
|
36
|
-
const visitorResult =
|
|
37
|
+
const visitorResult = pluginHelpers.oldVisit(allAst, { leave: visitor });
|
|
37
38
|
return {
|
|
38
39
|
prepend: visitor.getImports(),
|
|
39
40
|
content: [visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
|
package/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { oldVisit } from '@graphql-codegen/plugin-helpers';
|
|
2
|
+
import { concatAST, Kind } from 'graphql';
|
|
2
3
|
import autoBind from 'auto-bind';
|
|
3
4
|
import { ClientSideBaseVisitor, getConfigValue } from '@graphql-codegen/visitor-plugin-common';
|
|
4
5
|
|
|
@@ -27,7 +28,7 @@ const plugin = (schema, documents, config) => {
|
|
|
27
28
|
...(config.externalFragments || []),
|
|
28
29
|
];
|
|
29
30
|
const visitor = new TypeScriptDocumentNodesVisitor(schema, allFragments, config, documents);
|
|
30
|
-
const visitorResult =
|
|
31
|
+
const visitorResult = oldVisit(allAst, { leave: visitor });
|
|
31
32
|
return {
|
|
32
33
|
prepend: visitor.getImports(),
|
|
33
34
|
content: [visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-document-nodes",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.2.1-alpha-3b5c0246d.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating TypeScript modules with embedded GraphQL document nodes",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
|
|
6
|
+
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-codegen/plugin-helpers": "^2.
|
|
10
|
-
"@graphql-codegen/visitor-plugin-common": "2.
|
|
9
|
+
"@graphql-codegen/plugin-helpers": "^2.3.0",
|
|
10
|
+
"@graphql-codegen/visitor-plugin-common": "2.5.1-alpha-3b5c0246d.0",
|
|
11
11
|
"auto-bind": "~4.0.0",
|
|
12
12
|
"tslib": "~2.3.0"
|
|
13
13
|
},
|