Overview - Persisted queries
What is it?
Persisted queries are a way to save GraphQL queries on the server so clients can send a short identifier instead of the full query text. This reduces the amount of data sent over the network and improves performance. Instead of sending the entire query every time, the client sends a key that the server uses to look up the saved query and execute it.
Why it matters
Without persisted queries, clients must send the full GraphQL query text with every request, which can be large and slow down communication. Persisted queries reduce bandwidth, speed up requests, and improve security by limiting which queries can be run. This makes apps faster and more reliable, especially on slow or limited networks.
Where it fits
Before learning persisted queries, you should understand basic GraphQL queries and how clients communicate with servers. After this, you can explore advanced GraphQL optimizations like query batching, caching, and security practices.