graphql-code-generator with dynamic typescript typeDefs #6028
-
My condegen.yml looks like that:
I have a file containing some schemas :
This use case work well. That generate the typing correctly. Now if I have some dynamic stuff like that:
graphql-code-generator is failling with this error :
Any idea how to make it works? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is currently not supported. GraphQL language is mainly static and it has tons of benefits. Making it dynamic makes it much more complex to detect and load. |
Beta Was this translation helpful? Give feedback.
This is currently not supported. GraphQL language is mainly static and it has tons of benefits. Making it dynamic makes it much more complex to detect and load.
If you wish to use that anyway, use custom schema loader: https://www.graphql-code-generator.com/docs/getting-started/schema-field#custom-schema-loader