@graphql-codegen/typescript-operations 6.0.0-alpha-20251125123407-8babe46fb9b33e9f9a377cd50c9580282e7981d3 → 6.0.0-alpha-20251224115303-e89fc4c4d8e4b40f40bea6315bd68b4573109f50

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.
@@ -1,4 +1,11 @@
1
1
  import { TypeScriptOperationVariablesToObject as TSOperationVariablesToObject } from '@graphql-codegen/typescript';
2
+ export declare const SCALARS: {
3
+ ID: string;
4
+ String: string;
5
+ Int: string;
6
+ Float: string;
7
+ Boolean: string;
8
+ };
2
9
  export declare class TypeScriptOperationVariablesToObject extends TSOperationVariablesToObject {
3
10
  protected formatTypeString(fieldType: string, _isNonNullType: boolean, _hasDefaultValue: boolean): string;
4
11
  protected clearOptional(str: string): string;
@@ -1,5 +1,5 @@
1
- import { BaseDocumentsVisitor, DeclarationKind, LoadedFragment, NormalizedAvoidOptionalsConfig, ParsedDocumentsConfig } from '@graphql-codegen/visitor-plugin-common';
2
- import { GraphQLSchema } from 'graphql';
1
+ import { BaseDocumentsVisitor, type ConvertSchemaEnumToDeclarationBlockString, DeclarationKind, NormalizedAvoidOptionalsConfig, ParsedDocumentsConfig, type ParsedEnumValuesMap } from '@graphql-codegen/visitor-plugin-common';
2
+ import { type DocumentNode, EnumTypeDefinitionNode, GraphQLEnumType, GraphQLInputObjectType, GraphQLScalarType, type GraphQLSchema, InputObjectTypeDefinitionNode, InputValueDefinitionNode, type TypeDefinitionNode } from 'graphql';
3
3
  import { TypeScriptDocumentsPluginConfig } from './config.cjs';
4
4
  export interface TypeScriptDocumentsParsedConfig extends ParsedDocumentsConfig {
5
5
  arrayInputCoercion: boolean;
@@ -8,10 +8,38 @@ export interface TypeScriptDocumentsParsedConfig extends ParsedDocumentsConfig {
8
8
  noExport: boolean;
9
9
  maybeValue: string;
10
10
  allowUndefinedQueryVariables: boolean;
11
+ enumType: ConvertSchemaEnumToDeclarationBlockString['outputType'];
12
+ futureProofEnums: boolean;
13
+ enumValues: ParsedEnumValuesMap;
11
14
  }
15
+ type UsedNamedInputTypes = Record<string, {
16
+ type: 'GraphQLScalarType';
17
+ node: GraphQLScalarType;
18
+ tsType: string;
19
+ } | {
20
+ type: 'GraphQLEnumType';
21
+ node: GraphQLEnumType;
22
+ tsType: string;
23
+ } | {
24
+ type: 'GraphQLInputObjectType';
25
+ node: GraphQLInputObjectType;
26
+ tsType: string;
27
+ }>;
12
28
  export declare class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor<TypeScriptDocumentsPluginConfig, TypeScriptDocumentsParsedConfig> {
13
- constructor(schema: GraphQLSchema, config: TypeScriptDocumentsPluginConfig, allFragments: LoadedFragment[]);
29
+ protected _usedNamedInputTypes: UsedNamedInputTypes;
30
+ private _outputPath;
31
+ constructor(schema: GraphQLSchema, config: TypeScriptDocumentsPluginConfig, documentNode: DocumentNode, outputPath: string);
32
+ EnumTypeDefinition(node: EnumTypeDefinitionNode): string | null;
33
+ InputObjectTypeDefinition(node: InputObjectTypeDefinitionNode): string | null;
34
+ InputValueDefinition(node: InputValueDefinitionNode, _key?: number | string, _parent?: any, _path?: Array<string | number>, ancestors?: Array<TypeDefinitionNode>): string;
14
35
  getImports(): Array<string>;
36
+ getExternalSchemaTypeImports(): Array<string>;
15
37
  protected getPunctuation(_declarationKind: DeclarationKind): string;
16
38
  protected applyVariablesWrapper(variablesBlock: string, operationType: string): string;
39
+ private collectInnerTypesRecursively;
40
+ private collectUsedInputTypes;
41
+ getEnumsImports(): string[];
42
+ getExactUtilityType(): string | null;
43
+ getIncrementalUtilityType(): string | null;
17
44
  }
45
+ export {};
@@ -1,5 +1,5 @@
1
- import { BaseDocumentsVisitor, DeclarationKind, LoadedFragment, NormalizedAvoidOptionalsConfig, ParsedDocumentsConfig } from '@graphql-codegen/visitor-plugin-common';
2
- import { GraphQLSchema } from 'graphql';
1
+ import { BaseDocumentsVisitor, type ConvertSchemaEnumToDeclarationBlockString, DeclarationKind, NormalizedAvoidOptionalsConfig, ParsedDocumentsConfig, type ParsedEnumValuesMap } from '@graphql-codegen/visitor-plugin-common';
2
+ import { type DocumentNode, EnumTypeDefinitionNode, GraphQLEnumType, GraphQLInputObjectType, GraphQLScalarType, type GraphQLSchema, InputObjectTypeDefinitionNode, InputValueDefinitionNode, type TypeDefinitionNode } from 'graphql';
3
3
  import { TypeScriptDocumentsPluginConfig } from './config.js';
4
4
  export interface TypeScriptDocumentsParsedConfig extends ParsedDocumentsConfig {
5
5
  arrayInputCoercion: boolean;
@@ -8,10 +8,38 @@ export interface TypeScriptDocumentsParsedConfig extends ParsedDocumentsConfig {
8
8
  noExport: boolean;
9
9
  maybeValue: string;
10
10
  allowUndefinedQueryVariables: boolean;
11
+ enumType: ConvertSchemaEnumToDeclarationBlockString['outputType'];
12
+ futureProofEnums: boolean;
13
+ enumValues: ParsedEnumValuesMap;
11
14
  }
15
+ type UsedNamedInputTypes = Record<string, {
16
+ type: 'GraphQLScalarType';
17
+ node: GraphQLScalarType;
18
+ tsType: string;
19
+ } | {
20
+ type: 'GraphQLEnumType';
21
+ node: GraphQLEnumType;
22
+ tsType: string;
23
+ } | {
24
+ type: 'GraphQLInputObjectType';
25
+ node: GraphQLInputObjectType;
26
+ tsType: string;
27
+ }>;
12
28
  export declare class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor<TypeScriptDocumentsPluginConfig, TypeScriptDocumentsParsedConfig> {
13
- constructor(schema: GraphQLSchema, config: TypeScriptDocumentsPluginConfig, allFragments: LoadedFragment[]);
29
+ protected _usedNamedInputTypes: UsedNamedInputTypes;
30
+ private _outputPath;
31
+ constructor(schema: GraphQLSchema, config: TypeScriptDocumentsPluginConfig, documentNode: DocumentNode, outputPath: string);
32
+ EnumTypeDefinition(node: EnumTypeDefinitionNode): string | null;
33
+ InputObjectTypeDefinition(node: InputObjectTypeDefinitionNode): string | null;
34
+ InputValueDefinition(node: InputValueDefinitionNode, _key?: number | string, _parent?: any, _path?: Array<string | number>, ancestors?: Array<TypeDefinitionNode>): string;
14
35
  getImports(): Array<string>;
36
+ getExternalSchemaTypeImports(): Array<string>;
15
37
  protected getPunctuation(_declarationKind: DeclarationKind): string;
16
38
  protected applyVariablesWrapper(variablesBlock: string, operationType: string): string;
39
+ private collectInnerTypesRecursively;
40
+ private collectUsedInputTypes;
41
+ getEnumsImports(): string[];
42
+ getExactUtilityType(): string | null;
43
+ getIncrementalUtilityType(): string | null;
17
44
  }
45
+ export {};