Skip to content

Type safety #1156

Answered by kitten
arcanis asked this question in Q&A
Nov 15, 2020 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

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 specialised urql type generation that creates wrapped hooks: https://graphql-code-generator.com/docs/plugins/typed-document-node

And yes, lastly there are different options, the most primitive being to pass types yourself.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@arcanis
Comment options

@kitten
Comment options

@dotansimha
Comment options

@arcanis
Comment options

Answer selected by arcanis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants