Skip to content

typesafe wrappers for ApolloClient query, watchQuery, mutate #4580

Answered by zenflow
twmillett asked this question in General
Discussion options

You must be logged in to vote

@twmillett I believe TypedDocumentNode solves the problem you're trying to solve (needing to import FooQuery and FooQueryVariables and use them as generics for query/mutate/watchQuery calls).

Only downside of that solution is that for now you need to install a beta version of Apollo Client.. 3.2.0-beta.2

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@zenflow
Comment options

@twmillett
Comment options

@dotansimha
Comment options

@twmillett
Comment options

@dotansimha
Comment options

Answer selected by dotansimha
Comment options

You must be logged in to vote
1 reply
@ThePatriczek
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants