Getting extensions from the api response #3355
-
Hey all, We are building our GraphQL API and we started returning some metadata about a request in the response's If not, have you already considered adding this to the hooks? I am more than happy to help out with PR's for this if you are open to potentially adding this to the tool. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
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 maybeurql-core
or whatever you choose. If your queryFn returnsPromise.resolve(5)
, the number5
will be in the cache :)