Open KieranTH opened 6 days ago
I encountered the same issue. When codegen generates types, it ignores the type declarations of specific entities.
I resolved the problem by downgrading the "@graphql-codegen/client-preset" package to version "4.3.3".
I encountered the same issue.
When codegen generates types, it ignores the type declarations of specific entities.
I resolved the problem by downgrading the "@graphql-codegen/client-preset" package to version "4.3.3".
Oh so this is a regression?!
Thank you for that solution - I'll try that and see if it helps
Yeah looks like it's the new default behaviour in 4.4.0 version. It seems like that's connected to how the client-preset is configuring the typescript plugin and only enabling enum and operation types 🤔
@KieranTH looks like there is already an open issue about this. Have a look -> the open issue
Which packages are impacted by your issue?
@graphql-codegen/cli, @graphql-codegen/typescript
Describe the bug
When using the typescript plugin to attempt to generate types from a GraphQL Schema - it seems although the plugin ignores
type
declarations inside the schema.Only the
Input
type would be generated in this example.Here is the result:
Your Example Website or App
https://codesandbox.io/p/sandbox/nlpsfz
Steps to Reproduce the Bug or Issue
npm i && npm run compile:codegen
./src/__gen__
folder and see that only theTestCreate
type is generated and notTest
Expected behavior
Seeing as the plugin is described as generating types for a SCHEMA - the Schema also included type declarations. These should be generated too.
Screenshots or Videos
No response
Platform
graphql
version:N/A@graphql-codegen/*
version(s): 5.0.3@graphl-codegen/typescript
version: 4.1.0Codegen Config File
Additional context
No response