"Persisted queries" / "stored operations"
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- api, backend-api-design
Research direction
Start by reviewing the issue text and its linked persisted-query and stored-operation references to understand the competing implementations and terminology. Done would require a settled specification direction for how stored operations should be represented and documented.
Written by the indexing model from the issue text.
Description
The terms "persisted queries" and "stored operations" are typically used interchangably. The traditional name is "persisted queries", but the term "stored operations" acknowledges that this approach can be used with mutation and subscription operations in addition to queries.
There's lots of different implementations of this feature, often with different aims. Sometimes it's used to block all but a small allow-list of operations. Sometimes it's used to reduce network bandwidth for GraphQL requests. Sometimes it's used to improve HTTP cacheability (GET requests with short URLs).
Relevant links:
- https://relay.dev/docs/guides/persisted-queries/
- https://www.apollographql.com/docs/apollo-server/performance/apq/
- https://github.com/graphile/persisted-operations
- https://chillicream.com/docs/hotchocolate/v13/performance/persisted-queries/
- https://chillicream.com/docs/hotchocolate/v13/performance/automatic-persisted-queries
- https://github.com/restorando/graphql-query-whitelist
Some implementations require queries to be persisted to the server in advance of receiving queries (e.g. at build time); others negotiate the storage of the query with the server for bandwidth optimisation (e.g. automatic persisted queries).
Typically persisted queries replace the query in {query, variables, operationName} with another field (typically id) that indicates an identifier for the operation - perhaps a number or hash.
Typically stored operations remove the query in {query, variables, operationName} and instead indicate the operation via a hash or similar identifier in the extensions property.
One of the optimisations that stored operations enable is that the parse and validate steps of GraphQL execution can be performed once per stored operation and cached; future requests for the same stored operation can jump straight to the execute step.
- Dominant language
- JavaScript
- Stars
- 428
- Forks
- 70
- Avg merge
- 11m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from graphql/graphql-over-http
-
Difficulty 3/5 Half a day Newbie friendliness 25/100
graphql/graphql-over-http#446 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
graphql/graphql-over-http#415 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
graphql/graphql-over-http#392 · 4 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
graphql/graphql-over-http#242 · 8 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
graphql/graphql-over-http#216 · 15 comments · 1 reaction ·
All issues in graphql/graphql-over-http
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
feature request
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
openlayers/openlayers#17736 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
521xueweihan/HelloGitHub#4326 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Mintplex-Labs/anything-llm#7133 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day