Company
Date Published
Author
Tim Hingston
Word count
1026
Language
English
Hacker News points
None

Summary

The introduction of Automatic Persisted Queries (APQ) in Apollo Server and Apollo Client aims to improve network performance for GraphQL by reducing bandwidth utilization. By sending a query ID or hash instead of an entire GraphQL query string, APQ can significantly speed up loading times for end-users. This solution requires zero build-time configuration and is supported by the latest version of Apollo Server. It works by using a lightweight protocol extension between Apollo Client and Apollo Server to cache and retrieve query mappings at runtime. This approach eliminates the need for static analysis and build-time configuration, making it more flexible and decoupling client and server teams. APQ is designed to address performance issues caused by growing GraphQL query sizes, which can be a blocker to switching from REST.