-
How do you typically handle type safety for your queries with urql? Most approaches seem to have some tradeoffs:
Are there other interesting approaches you'd recommend? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There's several options. If you use GraphQL Code Generator you're actually not limited to a single We also now have support for its And yes, lastly there are different options, the most primitive being to pass types yourself. |
Beta Was this translation helpful? Give feedback.
There's several options. If you use GraphQL Code Generator you're actually not limited to a single
*.graphql
file. Instead you can still create separate ones.We also now have support for its
TypedDocumentNode
so you wouldn't even have to use the specialisedurql
type generation that creates wrapped hooks: https://graphql-code-generator.com/docs/plugins/typed-document-nodeAnd yes, lastly there are different options, the most primitive being to pass types yourself.