Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Automatic Persisted Queries #376

Closed
ashiemke opened this issue Sep 25, 2018 · 5 comments
Closed

Add support for Automatic Persisted Queries #376

ashiemke opened this issue Sep 25, 2018 · 5 comments
Labels
enhancement Issues outlining new things we want to do or things that will make our lives as devs easier
Milestone

Comments

@ashiemke
Copy link
Contributor

Add support for APQ: https://www.apollographql.com/docs/guides/performance.html#automatic-persisted-queries

Automate hashing of the query (sha256, see above link), and GET request construction.
Retry with current logic if the query is not found in the cache (above GET returns an error with message == PersistedQueryNotFound)
Add a configuration option to the client that allows this to be enabled (default off).

Can anyone point at a reference implementation so I don't have to reverse-engineer from the above doc?

@ghost ghost added the feature New addition or enhancement to existing solutions label Sep 25, 2018
@ashiemke
Copy link
Contributor Author

Started work on this, but not sure how to test since it's in a single layer (transport), and the star wars server doesn't seem to support it.

Anyone know of a simple server that I can get running to test against?

@mtbohm
Copy link

mtbohm commented Oct 5, 2018

Support for APQ would be great! It would really make things more scale-able and efficient.

@kcatigbe
Copy link

kcatigbe commented Apr 10, 2019

Is there any movement on adding this as a Feature to Apollo? Would like to see this as we want to optimize our calls as much as possible.

Also would like to add that the link above is broken now 😞

@Codebear98
Copy link

Codebear98 commented Jul 2, 2019

Just made a PR for this #608
which support GET for CDN too, retry with QueryDoc if APQs not cache, and use POST for retry to avoid 2k length limitation of query string.

@designatednerd designatednerd added enhancement Issues outlining new things we want to do or things that will make our lives as devs easier and removed feature New addition or enhancement to existing solutions labels Jul 15, 2019
@designatednerd designatednerd added this to the 0.17.0 milestone Oct 22, 2019
@designatednerd
Copy link
Contributor

This has shipped with 0.17.0! If you run into any problems with it, please file a new issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues outlining new things we want to do or things that will make our lives as devs easier
Projects
None yet
Development

No branches or pull requests

5 participants