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
I seem to be running into an issue when trying to implement the experimental_persistedDocuments option in useHive. When enabling this together with using the APQ functionality (sending the query hash in an extensions field) I get errors in the requestPipeline of Apollo that my sha does not match the query (found here).
I think this is caused by the logic around persistedDocuments overwriting the context.request.query field when no document was found (here). This subsequently messes up the requestPipeline of Apollo as it expects that field to be undefined when doing the GET request part of the APQ loop. Instead it now finds a query body {__typename} with which it generates an invalid hash.
Is this somehow intended behaviour? Or am I missing some bit of the APQ loop? It feels like the plugins should not be replacing the query content?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hey @demeyerthom can you share why you are using both APQ and persisted documents together? Usually you want to either use one, or do you mean that the apollo APQ logic kicks in without you explicitly doing something here?
Would it be possible for you to create a minimal reproduction to share with us here?
Hi all.
I seem to be running into an issue when trying to implement the experimental_persistedDocuments option in
useHive
. When enabling this together with using the APQ functionality (sending the query hash in anextensions
field) I get errors in the requestPipeline of Apollo that my sha does not match the query (found here).I think this is caused by the logic around persistedDocuments overwriting the
context.request.query
field when no document was found (here). This subsequently messes up the requestPipeline of Apollo as it expects that field to be undefined when doing the GET request part of the APQ loop. Instead it now finds a query body{__typename}
with which it generates an invalid hash.Is this somehow intended behaviour? Or am I missing some bit of the APQ loop? It feels like the plugins should not be replacing the query content?
Thanks in advance!
The text was updated successfully, but these errors were encountered: