AEM GraphQL configuration issues

The dispatcher needs to be configured to specifically allow persisted queries to the endpoint. Please follow the marked link (2) for more details about how to configure the dispatcher.

Description description

Environment

Adobe Experience Manager (AEM)

Issue

When developing a website that should retrieve data from its AEM (Adobe Experience Manager) instances using AEM headless solution, the tutorial in (1) was followed to set up the endpoint.

After publishing all the content fragments, models, content, references, assets, and queries as described in (2), when retrieving any content fragment from the publish instance, a 404 error is received, preventing the content from being read by the publisher.

(1) Defining Content Fragment Models in AEM Headless Tutorial

(2) ​​​​Author and Publish Architecture in AEM Headless Tutorial

Resolution resolution

After checking the dispatcher logs, the request to the user’s GraphQL endpoint - /content/cq:graphql/graphql/endpoint.json was blocked at the dispatcher level - (1).

The dispatcher needs to be configured to specifically allow persisted queries to the endpoint.
Please follow (2) for more details about how to configure the dispatcher.

(1)

aem_base_version: 6.5
    aem_envId: xxxxxxx
    aem_envType: dev
    aem_program_id: xxxxxx
    aem_release_id: xxxxx
    aem_service: cm-pxxxxxx-exxxxxxx
    aem_tenant: ns-team-aem-cm-prd-nxxxxxx
    aem_tier: publish
    backend: publishfarm/-
    cache: blocked
    cluster:
    code:-

    file_path: /var/log/aem/dispatcher.log
    host: publish-pxxxxxx-exxxxxxx.adobeaemcloud.com
    method: POST
    namespace: ns-team-aem-cm-prd-nxxxxxx
    orig_time: 25/Jul/2023:15:39:11 +0000
    path: /content/cq:graphql/graphql/endpoint.json
    pod_name:
    pod_uid:
    proto: HTTP
    proto_version: 1.1
    response_time: 0

(2)

Dispatcher - Endpoint configuration with AEM Headless

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f