Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

PersistedQueryNotSupported errors will stop all other extensions #32

Open
paulpdaniels opened this issue Dec 5, 2018 · 0 comments
Open

Comments

@paulpdaniels
Copy link

The persisted-queries link seems to be affecting sending of other extensions.

Particularly this line. If the server has responded that PQs are not supported the link is setting the includeExtensions in http context to false which means that all extensions are no longer sent. This causes an issue with the new clientInfo extension from apollo-server. The work around is to use headers to send it and write a custom extractor on the server side, but ideally AL-PQs should be a good Link citizen and not stop other extensions.

My suggestion is perhaps instead of killing extensions the API should just strip the extension from the operation before sending or possibly there could be an API change to the includeExtensions field such that it could take either a boolean or an array of strings or an object of string -> boolean key/values, where the latter type we you can simply do:

includeExtensions: {persistedQueries: false}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant