GraphQL Response Caching
Don’t overlook the way that full page caching for GraphQL requests can enhance performance for headless Adobe Commerce! There are considerations for your back-end customizations, your front-end application, and your system configuration!
You’re not going to get any benefit out of GraphQL response caching if you haven’t built the logic supporting it into your queries (unlike typical page caching, which is automatic unless you specifically disable it). Nor if your PWA front-end is sending your GQL queries as POST requests instead of GETs with a querystring.
For the maximum caching benefit - supporting even requests with authenticated user tokens via the X-Magento-Cache-Id header - you also need to make sure your Varnish instance has up-to-date VCL configuration. Support for this new header has only been around since Magento 2.4.4, and it’s easy to overlook the need for updating this VCL config!
You can learn all about it in our new course.