@depup/graphql-codegen__typescript-operations 6.1.7-depup.0 → 6.1.9-depup.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/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/graphql-codegen__typescript-operations
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [@graphql-codegen/typescript-operations](https://www.npmjs.com/package/@graphql-codegen/typescript-operations) @ 6.1.7 |
17
- | Processed | 2026-09-20 |
16
+ | Original | [@graphql-codegen/typescript-operations](https://www.npmjs.com/package/@graphql-codegen/typescript-operations) @ 6.1.9 |
17
+ | Processed | 2026-09-29 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 2 |
20
20
 
package/changes.json CHANGED
@@ -9,6 +9,6 @@
9
9
  "to": "^2.8.1"
10
10
  }
11
11
  },
12
- "timestamp": "2026-09-20T08:10:55.815Z",
12
+ "timestamp": "2026-09-29T16:10:23.680Z",
13
13
  "totalUpdated": 2
14
14
  }
package/cjs/index.js CHANGED
@@ -74,6 +74,7 @@ const plugin = async (inputSchema, rawDocuments, config, { outputFile }) => {
74
74
  const operationsResult = (0, plugin_helpers_1.oldVisit)(documentsToVisitAST, {
75
75
  leave: visitor,
76
76
  });
77
+ // FIXME(strict=true) this is the existing logic, casting to avoid runtime differences
77
78
  const operationsDefinitions = operationsResult.definitions;
78
79
  if (config.addOperationExport) {
79
80
  for (const d of allDocumentsAST.definitions) {
@@ -150,5 +151,5 @@ const semanticToStrict = async (schema) => {
150
151
  // This helper function filters in nodes that have been turned into strings, i.e. they have been transformed
151
152
  // This way, we do not have to explicitly declare a method for every node type to convert them to null
152
153
  const findTransformedDefinitions = (visitedResult) => {
153
- return visitedResult.definitions.filter(def => typeof def === 'string');
154
+ return visitedResult.definitions.filter((def) => typeof def === 'string');
154
155
  };
package/cjs/visitor.js CHANGED
@@ -183,7 +183,10 @@ class TypeScriptDocumentsVisitor extends visitor_plugin_common_1.BaseDocumentsVi
183
183
  if ((0, visitor_plugin_common_1.isOneOfInputObjectType)(this._schema.getType(inputTypeName))) {
184
184
  return new visitor_plugin_common_1.DeclarationBlock(this._declarationBlockConfig)
185
185
  .export()
186
- .asKind(this.config.declarationKind.input)
186
+ .asKind((0, visitor_plugin_common_1.getOneOfInputDeclarationKind)({
187
+ fieldCount: (node.fields || []).length,
188
+ inputDeclarationKind: this.config.declarationKind.input,
189
+ }))
187
190
  .withName(this.convertName(node))
188
191
  .withComment(node.description?.value)
189
192
  .withContent(`\n` + (node.fields || []).join('\n |')).string;
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { concatAST, parse, printIntrospectionSchema, } from 'graphql';
2
- import { oldVisit } from '@graphql-codegen/plugin-helpers';
2
+ import { oldVisit, } from '@graphql-codegen/plugin-helpers';
3
3
  import { transformSchemaAST } from '@graphql-codegen/schema-ast';
4
4
  import { optimizeOperations } from '@graphql-codegen/visitor-plugin-common';
5
5
  import { TypeScriptDocumentsVisitor } from './visitor.js';
@@ -37,6 +37,7 @@ export const plugin = async (inputSchema, rawDocuments, config, { outputFile })
37
37
  const operationsResult = oldVisit(documentsToVisitAST, {
38
38
  leave: visitor,
39
39
  });
40
+ // FIXME(strict=true) this is the existing logic, casting to avoid runtime differences
40
41
  const operationsDefinitions = operationsResult.definitions;
41
42
  if (config.addOperationExport) {
42
43
  for (const d of allDocumentsAST.definitions) {
@@ -113,5 +114,5 @@ const semanticToStrict = async (schema) => {
113
114
  // This helper function filters in nodes that have been turned into strings, i.e. they have been transformed
114
115
  // This way, we do not have to explicitly declare a method for every node type to convert them to null
115
116
  const findTransformedDefinitions = (visitedResult) => {
116
- return visitedResult.definitions.filter(def => typeof def === 'string');
117
+ return visitedResult.definitions.filter((def) => typeof def === 'string');
117
118
  };
package/esm/visitor.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import autoBind from 'auto-bind';
2
2
  import { getNamedType, GraphQLEnumType, GraphQLInputObjectType, GraphQLScalarType, isEnumType, isIntrospectionType, Kind, TypeInfo, visit, visitWithTypeInfo, } from 'graphql';
3
3
  import { normalizeImportExtension } from '@graphql-codegen/plugin-helpers';
4
- import { BaseDocumentsVisitor, buildTypeImport, convertSchemaEnumToDeclarationBlockString, DeclarationBlock, DEFAULT_INPUT_SCALARS, generateFragmentImportStatement, generateImportStatement, getConfigValue, getEnumsImports, getNodeComment, indent, isNativeNamedType, isOneOfInputObjectType, parseEnumValues, PreResolveTypesProcessor, printTypeScriptMaybeType, SelectionSetToObject, wrapTypeWithModifiers, } from '@graphql-codegen/visitor-plugin-common';
4
+ import { BaseDocumentsVisitor, buildTypeImport, convertSchemaEnumToDeclarationBlockString, DeclarationBlock, DEFAULT_INPUT_SCALARS, generateFragmentImportStatement, generateImportStatement, getConfigValue, getEnumsImports, getNodeComment, getOneOfInputDeclarationKind, indent, isNativeNamedType, isOneOfInputObjectType, parseEnumValues, PreResolveTypesProcessor, printTypeScriptMaybeType, SelectionSetToObject, wrapTypeWithModifiers, } from '@graphql-codegen/visitor-plugin-common';
5
5
  import { TypeScriptOperationVariablesToObject } from './ts-operation-variables-to-object.js';
6
6
  export class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
7
7
  _usedSchemaTypes = {};
@@ -179,7 +179,10 @@ export class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
179
179
  if (isOneOfInputObjectType(this._schema.getType(inputTypeName))) {
180
180
  return new DeclarationBlock(this._declarationBlockConfig)
181
181
  .export()
182
- .asKind(this.config.declarationKind.input)
182
+ .asKind(getOneOfInputDeclarationKind({
183
+ fieldCount: (node.fields || []).length,
184
+ inputDeclarationKind: this.config.declarationKind.input,
185
+ }))
183
186
  .withName(this.convertName(node))
184
187
  .withComment(node.description?.value)
185
188
  .withContent(`\n` + (node.fields || []).join('\n |')).string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/graphql-codegen__typescript-operations",
3
- "version": "6.1.7-depup.0",
3
+ "version": "6.1.9-depup.0",
4
4
  "description": "GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments (with updated dependencies)",
5
5
  "peerDependenciesMeta": {
6
6
  "graphql-sock": {
@@ -12,9 +12,9 @@
12
12
  "graphql-sock": "^1.0.0"
13
13
  },
14
14
  "dependencies": {
15
- "@graphql-codegen/plugin-helpers": "^7.3.0",
15
+ "@graphql-codegen/plugin-helpers": "^7.4.0",
16
16
  "@graphql-codegen/schema-ast": "^6.1.0",
17
- "@graphql-codegen/visitor-plugin-common": "^7.2.5",
17
+ "@graphql-codegen/visitor-plugin-common": "^7.2.7",
18
18
  "auto-bind": "^5.0.1",
19
19
  "tslib": "^2.8.1"
20
20
  },
@@ -72,8 +72,8 @@
72
72
  },
73
73
  "depsUpdated": 2,
74
74
  "originalPackage": "@graphql-codegen/typescript-operations",
75
- "originalVersion": "6.1.7",
76
- "processedAt": "2026-09-20T08:11:01.935Z",
75
+ "originalVersion": "6.1.9",
76
+ "processedAt": "2026-09-29T16:10:29.606Z",
77
77
  "smokeTest": "passed"
78
78
  }
79
79
  }
@@ -1,4 +1,4 @@
1
- import { PluginFunction, Types } from '@graphql-codegen/plugin-helpers';
1
+ import { type PluginFunction, type Types } from '@graphql-codegen/plugin-helpers';
2
2
  import { TypeScriptDocumentsPluginConfig } from './config.cjs';
3
3
  import { TypeScriptDocumentsVisitor } from './visitor.cjs';
4
4
  export declare const plugin: PluginFunction<TypeScriptDocumentsPluginConfig, Types.ComplexPluginOutput>;
@@ -1,4 +1,4 @@
1
- import { PluginFunction, Types } from '@graphql-codegen/plugin-helpers';
1
+ import { type PluginFunction, type Types } from '@graphql-codegen/plugin-helpers';
2
2
  import { TypeScriptDocumentsPluginConfig } from './config.js';
3
3
  import { TypeScriptDocumentsVisitor } from './visitor.js';
4
4
  export declare const plugin: PluginFunction<TypeScriptDocumentsPluginConfig, Types.ComplexPluginOutput>;