question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Persisted GraphQL Queries

See original GitHub issue

In order to support persisted queries we want to introduce a new abstraction IQueryStorage that represents the query storage.

Queries that are pulled from the query storage should already be validated so that a server does not need to do that when the query is processed.

In order to load the query into the query context we need another middleware that comes first in the pipeline and uses the storage to fetch the query.

https://github.com/apollographql/persistgraphql https://blog.apollographql.com/persisted-graphql-queries-with-apollo-client-119fd7e6bba5 https://facebook.github.io/relay/docs/en/persisted-queries.html

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelstaibcommented, Aug 5, 2019

This one is implemented!

1reaction
willwolfram18commented, Jun 19, 2019

As I’ve been thinking about this more, it feels like implementing persisted queries might benefit from a CQRS design pattern. Specifically breaking the IQueryStorage into two interfaces like IReadStoredQueries and IWriteStoredQueries (for the dynamic query scenario). I say that because in the static query scenarios, we are really only ever concerned with reading the query from the source and then (likely) maintaining it in memory to rerun on subsequent requests. What are your thoughts on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatic persisted queries - Apollo GraphQL Docs
A persisted query is a query string that's cached on the server side, along with its unique identifier (always its SHA-256 hash). Clients...
Read more >
Persisted GraphQL queries | Adobe Experience Manager
Persisted queries are GraphQL queries that are created and stored on the Adobe Experience Manager (AEM) as a Cloud Service server.
Read more >
Persistent Queries - GraphQL
When a client uses persistent queries, the client only sends the hash of a query to the server. The server has a list...
Read more >
Understanding persisted queries - Documentation
The persisted query protocol, as described by Apollo, defines the interactions between client and server when passing query hashes. Simply put, the GraphQL...
Read more >
Automatic Persisted Queries (APQ) | GraphQL Kotlin
A persisted query is a parsed and validated query document that is cached on a GraphQL Server, along with a unique identifier (SHA-256...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found