@graphql-codegen/java 3.1.5 → 3.2.1-alpha-66fd7ef2f.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
 
@@ -249,7 +249,7 @@ const plugin = async (schema, documents, config, { outputFile }) => {
249
249
  const defaultPackageName = javaCommon.buildPackageNameFromPath(relevantPath);
250
250
  const visitor = new JavaResolversVisitor(config, schema, defaultPackageName);
251
251
  const astNode = pluginHelpers.getCachedDocumentNodeFromSchema(schema);
252
- const visitorResult = graphql.visit(astNode, { leave: visitor });
252
+ const visitorResult = pluginHelpers.oldVisit(astNode, { leave: visitor });
253
253
  const imports = visitor.getImports();
254
254
  const packageName = visitor.getPackageName();
255
255
  const blockContent = visitorResult.definitions.filter(d => typeof d === 'string').join('\n');
package/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { Kind, isScalarType, isInputObjectType, isEnumType, 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, indentMultiline, indent, getBaseTypeNode } from '@graphql-codegen/visitor-plugin-common';
3
+ import { Kind, isScalarType, isInputObjectType, isEnumType } from 'graphql';
4
4
  import { JAVA_SCALARS, JavaDeclarationBlock, wrapTypeWithModifiers, buildPackageNameFromPath } from '@graphql-codegen/java-common';
5
5
  import { dirname, normalize } from 'path';
6
6
 
@@ -245,7 +245,7 @@ const plugin = async (schema, documents, config, { outputFile }) => {
245
245
  const defaultPackageName = buildPackageNameFromPath(relevantPath);
246
246
  const visitor = new JavaResolversVisitor(config, schema, defaultPackageName);
247
247
  const astNode = getCachedDocumentNodeFromSchema(schema);
248
- const visitorResult = visit(astNode, { leave: visitor });
248
+ const visitorResult = oldVisit(astNode, { leave: visitor });
249
249
  const imports = visitor.getImports();
250
250
  const packageName = visitor.getPackageName();
251
251
  const blockContent = visitorResult.definitions.filter(d => typeof d === 'string').join('\n');
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-codegen/java",
3
- "version": "3.1.5",
3
+ "version": "3.2.1-alpha-66fd7ef2f.0",
4
4
  "description": "GraphQL Code Generator plugin for generating Java 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.5",
10
- "@graphql-codegen/plugin-helpers": "^2.2.0",
11
- "@graphql-codegen/visitor-plugin-common": "2.3.0",
9
+ "@graphql-codegen/java-common": "2.1.8-alpha-66fd7ef2f.0",
10
+ "@graphql-codegen/plugin-helpers": "^2.3.0",
11
+ "@graphql-codegen/visitor-plugin-common": "2.5.1-alpha-66fd7ef2f.0",
12
12
  "tslib": "~2.3.0"
13
13
  },
14
14
  "repository": {