Skip to content

typescript-operations does not support declarationKind #8669

@benasher44

Description

@benasher44

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

  1. Setup a project that uses typescript and typescript-operations
  2. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions