GraphQL queries are usually POST
requests. POST
request aren't cached by nature. This means that we need different solutions to deliver our content efficiently.
-
Apollo Server provide a apollo-cache-control in order to configure how long a query should be cached. Cache hint inside the schema.
-
Automatic persisted queries (APQs) is a performance technique which allows a hash to be sent to the server instead of the entire GraphQL query string. It is possible to use APQs with
GET
requests here. In that way we can also benefit from CDN. How it works. In theory it's the same mechani