@graphql-codegen/kotlin 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.
Files changed (3) hide show
  1. package/index.js +2 -2
  2. package/index.mjs +3 -3
  3. package/package.json +5 -5
package/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const graphql = require('graphql');
6
5
  const pluginHelpers = require('@graphql-codegen/plugin-helpers');
7
6
  const visitorPluginCommon = require('@graphql-codegen/visitor-plugin-common');
7
+ const graphql = require('graphql');
8
8
  const javaCommon = require('@graphql-codegen/java-common');
9
9
  const path = require('path');
10
10
 
@@ -230,7 +230,7 @@ const plugin = async (schema, documents, config, { outputFile }) => {
230
230
  const defaultPackageName = javaCommon.buildPackageNameFromPath(relevantPath);
231
231
  const visitor = new KotlinResolversVisitor(config, schema, defaultPackageName);
232
232
  const astNode = pluginHelpers.getCachedDocumentNodeFromSchema(schema);
233
- const visitorResult = graphql.visit(astNode, { leave: visitor });
233
+ const visitorResult = pluginHelpers.oldVisit(astNode, { leave: visitor });
234
234
  const packageName = visitor.getPackageName();
235
235
  const blockContent = visitorResult.definitions.filter(d => typeof d === 'string').join('\n\n');
236
236
  return [packageName, blockContent].join('\n');
package/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { Kind, isScalarType, isInputObjectType, isEnumType, isObjectType, visit } from 'graphql';
2
- import { getCachedDocumentNodeFromSchema } from '@graphql-codegen/plugin-helpers';
1
+ import { getCachedDocumentNodeFromSchema, oldVisit } from '@graphql-codegen/plugin-helpers';
3
2
  import { BaseVisitor, buildScalarsFromConfig, indent, transformComment, indentMultiline, getBaseTypeNode } from '@graphql-codegen/visitor-plugin-common';
3
+ import { Kind, isScalarType, isInputObjectType, isEnumType, isObjectType } from 'graphql';
4
4
  import { wrapTypeWithModifiers, buildPackageNameFromPath } from '@graphql-codegen/java-common';
5
5
  import { dirname, normalize } from 'path';
6
6
 
@@ -226,7 +226,7 @@ const plugin = async (schema, documents, config, { outputFile }) => {
226
226
  const defaultPackageName = buildPackageNameFromPath(relevantPath);
227
227
  const visitor = new KotlinResolversVisitor(config, schema, defaultPackageName);
228
228
  const astNode = getCachedDocumentNodeFromSchema(schema);
229
- const visitorResult = visit(astNode, { leave: visitor });
229
+ const visitorResult = oldVisit(astNode, { leave: visitor });
230
230
  const packageName = visitor.getPackageName();
231
231
  const blockContent = visitorResult.definitions.filter(d => typeof d === 'string').join('\n\n');
232
232
  return [packageName, blockContent].join('\n');
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-codegen/kotlin",
3
- "version": "2.1.6",
3
+ "version": "2.2.1-alpha-3b5c0246d.0",
4
4
  "description": "GraphQL Code Generator plugin for generating Kotlin code based on a GraphQL schema",
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/java-common": "^2.1.6",
10
- "@graphql-codegen/plugin-helpers": "^2.2.0",
11
- "@graphql-codegen/visitor-plugin-common": "2.4.0",
9
+ "@graphql-codegen/java-common": "2.1.8-alpha-3b5c0246d.0",
10
+ "@graphql-codegen/plugin-helpers": "^2.3.0",
11
+ "@graphql-codegen/visitor-plugin-common": "2.5.1-alpha-3b5c0246d.0",
12
12
  "tslib": "~2.3.0"
13
13
  },
14
14
  "repository": {