@graphql-codegen/typescript-urql 3.2.1-alpha-476627f73.0 → 3.3.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.
Files changed (3) hide show
  1. package/index.js +2 -1
  2. package/index.mjs +3 -2
  3. 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'));
@@ -115,7 +116,7 @@ const plugin = (schema, documents, config) => {
115
116
  ...(config.externalFragments || []),
116
117
  ];
117
118
  const visitor = new UrqlVisitor(schema, allFragments, config);
118
- const visitorResult = graphql.visit(allAst, { leave: visitor });
119
+ const visitorResult = pluginHelpers.oldVisit(allAst, { leave: visitor });
119
120
  return {
120
121
  prepend: visitor.getImports(),
121
122
  content: [visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
package/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
- import { Kind, concatAST, visit } from 'graphql';
1
+ import { oldVisit } from '@graphql-codegen/plugin-helpers';
2
+ import { Kind, concatAST } from 'graphql';
2
3
  import { ClientSideBaseVisitor, getConfigValue, DocumentMode, OMIT_TYPE } from '@graphql-codegen/visitor-plugin-common';
3
4
  import autoBind from 'auto-bind';
4
5
  import { pascalCase } from 'change-case-all';
@@ -109,7 +110,7 @@ const plugin = (schema, documents, config) => {
109
110
  ...(config.externalFragments || []),
110
111
  ];
111
112
  const visitor = new UrqlVisitor(schema, allFragments, config);
112
- const visitorResult = visit(allAst, { leave: visitor });
113
+ const visitorResult = oldVisit(allAst, { leave: visitor });
113
114
  return {
114
115
  prepend: visitor.getImports(),
115
116
  content: [visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-urql",
3
- "version": "3.2.1-alpha-476627f73.0",
3
+ "version": "3.3.0",
4
4
  "description": "GraphQL Code Generator plugin for generating an introspection file for Urql's Schema Awareness",
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",
7
7
  "graphql-tag": "^2.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-codegen/plugin-helpers": "^2.1.1",
11
- "@graphql-codegen/visitor-plugin-common": "2.3.0-alpha-476627f73.0",
10
+ "@graphql-codegen/plugin-helpers": "^2.3.0",
11
+ "@graphql-codegen/visitor-plugin-common": "2.5.0",
12
12
  "auto-bind": "~4.0.0",
13
13
  "change-case-all": "1.0.14",
14
14
  "tslib": "~2.3.0"