Which packages are impacted by your issue?
@graphql-codegen/typescript-operations
Describe the bug
Set declarationKind: 'interface', and types generated by the typescript plugin switch to using interface, but typescript-operation types still use type, despite typescript-operations documenting that declarationKind is a supported option.
Your Example Website or App
n/a
Steps to Reproduce the Bug or Issue
- Setup a project that uses typescript and typescript-operations
- Set
declarationKind to interface
Expected behavior
typescript-operation types switch to using interface
Screenshots or Videos
No response
Platform
- OS: macOS 13
- NodeJS: 18
graphql: 16
@graphql-codegen/* @graphql-codegen/typescript-operations: 2.5.7
Codegen Config File
schema: "../backend/src/graphql_server//*.graphql"
documents: "./src/graphql//*.graphql"
extensions:
codegen:
overwrite: true
config:
dedupeFragments: true
noNamespaces: true
strict: true
scalars:
Date: string
DateTime: string
useExplicitTyping: true
declarationKind: "interface"
generates:
src/generated/graphql/graphql.tsx:
plugins:
- "typescript"
- "typescript-operations"
- "fragment-matcher"
- "typed-document-node"
Additional context
No response
Which packages are impacted by your issue?
@graphql-codegen/typescript-operations
Describe the bug
Set
declarationKind: 'interface', and types generated by thetypescriptplugin switch to usinginterface, buttypescript-operationtypes still usetype, despitetypescript-operationsdocumenting thatdeclarationKindis a supported option.Your Example Website or App
n/a
Steps to Reproduce the Bug or Issue
declarationKindtointerfaceExpected behavior
typescript-operationtypes switch to usinginterfaceScreenshots or Videos
No response
Platform
graphql: 16@graphql-codegen/*@graphql-codegen/typescript-operations: 2.5.7Codegen Config File
schema: "../backend/src/graphql_server//*.graphql"
documents: "./src/graphql//*.graphql"
extensions:
codegen:
overwrite: true
config:
dedupeFragments: true
noNamespaces: true
strict: true
scalars:
Date: string
DateTime: string
useExplicitTyping: true
declarationKind: "interface"
generates:
src/generated/graphql/graphql.tsx:
plugins:
- "typescript"
- "typescript-operations"
- "fragment-matcher"
- "typed-document-node"
Additional context
No response