You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
Currently you can only pass string in refetchQueries when calling mutations, because the type apolloMutation in ReasonApolloMutation defines refetchQueries as optional array(string).
However, it seems like in many cases you would actually want to pass variables to those queries, apollo-client defines it like this:
Good point! I guess it would require both types to be wrapped in a variant which can then be deconstructed in ReasonApolloMutation. That would be a breaking change. Could you create a PR?
Currently you can only pass
string
inrefetchQueries
when calling mutations, because the typeapolloMutation
inReasonApolloMutation
definesrefetchQueries
as optionalarray(string)
.However, it seems like in many cases you would actually want to pass variables to those queries,
apollo-client
defines it like this:In
reason-apollo
, there is a typequeryObj
inApolloClient
:so I quickly tried making
refetchQueries
intounit => array(queryObj)=?
and it allowed me to pass variables into queries inrefetchQueries
.However I am not sure how to make it work for both for strings and proper query objects. Is it even possible to do in
reason
?The text was updated successfully, but these errors were encountered: