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
GraphQLclient 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.
- In Cloud Manager, navigate to the environment variables for your AEM environment.
- Verify that the environment variable used for the
GraphQLendpoint, such asCOMMERCE_ENDPOINT, is set with the correct CommerceGraphQLendpoint URL. - Confirm that the variable is applied to the Publish tier and not only to Author or other tiers.
- Compare the configuration with a working environment, such as Stage, to check for consistency.
- If you find discrepancies, update the environment variable for the Publish tier with the correct value.
- Redeploy or restart the Publish environment to apply the updated configuration.
- After deployment, access the affected PLP and PDP pages in the Publish environment and confirm that products display as expected.
- Check the logs and confirm that the
GraphQLclient initializes without errors.