Skip to content
Discussion options

You must be logged in to vote

As always, react-query doesn't do anything in this regard. It takes the promise from the queryFn, awaits it and puts the data in the cache. What your promise contains is up to the library that you use to produce the promise. This might be graphql-request, or maybe urql-core or whatever you choose. If your queryFn returns Promise.resolve(5), the number 5 will be in the cache :)

Replies: 1 comment 1 reply

Comment options

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

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