Dispatcher - Endpoint configuration with AEM Headless

The Dispatcher is a caching and security layer in front of Adobe Experience Manager Publish environments. Several configurations are included by default to open GraphQL endpoints to headless applications.

NOTE
For detailed documentation about the Dispatcher, see the Dispatcher Guide.

As part of an AEM Project a Dispatcher module is included that contains configurations for the Dispatcher. Newly generated projects from the AEM Project Archetype automatically include filters that enable GraphQL endpoints.

GraphQL Endpoints

As part of the default filters, GraphQL endpoints are opened with the following rule:

/0060 { /type "allow" /method '(POST|OPTIONS)' /url "/content/_cq_graphql/*/endpoint.json" }

The * wildcard opens multiple endpoints on the AEM instance. Querying using a GraphQL endpoint is made using POST and the response is not cached.

GraphQL Persisted Queries

The request for Persisted queries is made against a different endpoint. As part of the default filter configuration, the url for Persisted queries is opened with the following rule:

/0061 { /type "allow" /method '(GET|POST|OPTIONS)' /url "/graphql/execute.json*" }

Persisted queries can be requested using GET, by caching the response at the Dispatcher and CDN level. More details about caching and cache invalidation can be found here.

recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab