Generated (detailed) query types #8037
-
I'm using the E.g. the following query document:
results in the following types:
Now on my page I want to use the data inside a Tanstack React Table. So my Next.js page has something like:
All good so far, but I basically need something now like:
so I could dome something like:
I think the generated GraphQL Codegen types inside the generated query interface types cannot be used independently, right? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use fragments to have those types. GraphQL Code Generator will generate a type for each fragment definition. fragment SomeTyreManufacturer on TyreManufacturer {
id: ID
name: String
country: Country
} |
Beta Was this translation helpful? Give feedback.
You can use fragments to have those types. GraphQL Code Generator will generate a type for each fragment definition.
Something like the following;