@graphql-codegen/typescript-stencil-apollo 2.1.5-alpha-476627f73.0 → 2.2.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 +3 -3
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 visitorPluginCommon = require('@graphql-codegen/visitor-plugin-common');
|
|
9
10
|
const autoBind = _interopDefault(require('auto-bind'));
|
|
@@ -101,7 +102,7 @@ const plugin = (schema, documents, config) => {
|
|
|
101
102
|
...(config.externalFragments || []),
|
|
102
103
|
];
|
|
103
104
|
const visitor = new StencilApolloVisitor(schema, allFragments, config);
|
|
104
|
-
const visitorResult =
|
|
105
|
+
const visitorResult = pluginHelpers.oldVisit(allAst, { leave: visitor });
|
|
105
106
|
return {
|
|
106
107
|
prepend: visitor.getImports(),
|
|
107
108
|
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 { ClientSideBaseVisitor, getConfigValue } from '@graphql-codegen/visitor-plugin-common';
|
|
3
4
|
import autoBind from 'auto-bind';
|
|
4
5
|
import { pascalCase, paramCase } from 'change-case-all';
|
|
@@ -95,7 +96,7 @@ const plugin = (schema, documents, config) => {
|
|
|
95
96
|
...(config.externalFragments || []),
|
|
96
97
|
];
|
|
97
98
|
const visitor = new StencilApolloVisitor(schema, allFragments, config);
|
|
98
|
-
const visitorResult =
|
|
99
|
+
const visitorResult = oldVisit(allAst, { leave: visitor });
|
|
99
100
|
return {
|
|
100
101
|
prepend: visitor.getImports(),
|
|
101
102
|
content: ['', visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-stencil-apollo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating Stencil Components based on GraphQL operations",
|
|
5
5
|
"peerDependencies": {
|
|
6
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",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"stencil-apollo": "^0.1.3"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@graphql-codegen/plugin-helpers": "^2.
|
|
12
|
-
"@graphql-codegen/visitor-plugin-common": "2.
|
|
11
|
+
"@graphql-codegen/plugin-helpers": "^2.3.0",
|
|
12
|
+
"@graphql-codegen/visitor-plugin-common": "2.5.0",
|
|
13
13
|
"auto-bind": "~4.0.0",
|
|
14
14
|
"change-case-all": "1.0.14",
|
|
15
15
|
"tslib": "~2.3.0"
|