GraphQL configurations not loading in Publish environment in AEMaaCS

In Adobe Experience Manager as a Cloud Service (AEMaaCS), Product Listing Pages (PLP) and Product Detail Pages (PDP) don’t display products in the Publish environment when GraphQL configurations fail to load correctly. Products continue to display in Author and other environments. To fix this issue, verify and correct the Commerce GraphQL endpoint environment variable configuration for the Publish tier.

Description description

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS)

Issue/Symptoms

  • Product Listing Pages and Product Detail Pages do not display products in the Publish environment.
  • Products display correctly in the Author environment and other environments (such as Stage).
  • Publish logs may show errors indicating that the GraphQL client is not available for the affected resource path.

Cause

The environment variable used to configure the GraphQL endpoint, such as COMMERCE_ENDPOINT, is missing or not correctly set for the Publish tier. As a result, the GraphQL client cannot resolve the required endpoint, and products are not displayed.

Resolution resolution

Follow the steps below to resolve the issue.

  1. In Cloud Manager, navigate to the environment variables for your AEM environment.
  2. Verify that the environment variable used for the GraphQL endpoint, such as COMMERCE_ENDPOINT, is set with the correct Commerce GraphQL endpoint URL.
  3. Confirm that the variable is applied to the Publish tier and not only to Author or other tiers.
  4. Compare the configuration with a working environment, such as Stage, to check for consistency.
  5. If you find discrepancies, update the environment variable for the Publish tier with the correct value.
  6. Redeploy or restart the Publish environment to apply the updated configuration.
  7. After deployment, access the affected PLP and PDP pages in the Publish environment and confirm that products display as expected.
  8. Check the logs and confirm that the GraphQL client initializes without errors.
recommendation-more-help
experience-cloud-kcs-help-kbarticles