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
This issue proposes adding Automatic persisted queries (APQs) feature to Atlas/Orion to improve network performance by sending smaller requests
Problem it addresses
In practice we've seen GraphQL query sizes ranging well above 10 KB just for the query text. This is significant overhead when compared with a simple URL of 50-100 characters.
Clients send queries to Apollo Server as HTTP requests that include the GraphQL string of the query to execute. Depending on your graph's schema, the size of a valid query string might be arbitrarily large. As query strings become larger, increased latency and network usage can noticeably degrade client performance.
For example GetChannelPaymentEvents query which is being used in the My Payments page is over 4KB in length, so by using APQs we could just reduce the request size to constant few hundred bytes.
How it works
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 can send this identifier instead of the corresponding query string, thus reducing request sizes
To persist a query string, Apollo Server must first receive it from a requesting client. Consequently, each unique query string must be sent to Apollo Server at least once
Changes required
Orion
No changes are required in Orion's graphql server, as Apollo Server supports APQ without any additional configuration.
The text was updated successfully, but these errors were encountered:
zeeshanakram3
changed the title
Adding Automatic persisted queries feature to Graphql Server
Adding Automatic persisted queries feature to Atlas/Orion
Dec 15, 2023
This issue proposes adding
Automatic persisted queries
(APQs) feature to Atlas/Orion to improve network performance by sending smaller requestsProblem it addresses
For example GetChannelPaymentEvents query which is being used in the
My Payments
page is over 4KB in length, so by using APQs we could just reduce the request size to constant few hundred bytes.How it works
Changes required
Orion
No changes are required in Orion's graphql server, as Apollo Server supports APQ without any additional configuration.
Atlas
Reference
https://www.apollographql.com/docs/apollo-server/performance/apq/
The text was updated successfully, but these errors were encountered: