Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to publish persisted GraphQL queries on on-prem AEM?

Avatar

Level 3

We have an on-prem AEM instance and a GraphQL endpoint setup that works on both author and publish instances. We've added a persisted query by HTTP request, and it works well on author. However, we're having trouble publishing it.

We followed the steps outlined in this article [link], including adding the /conf/{site_name}/settings folder in the filter of our existing package, building it, and replicating the package. Despite these efforts, when we try to access the persisted query endpoint on the publish instance, we receive a PersistenceError (Could not find persisted query) error.

We've searched for solutions but have not found any that work. And we can't use GraphiQL explorer on on-prem AEM. Does anyone have any suggestions or experience with successfully publishing persisted GraphQL queries on an on-prem AEM? Thank you in advance for your help.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Thank you. I think I probably know the reason to this problem now. The content.xml used to create the CFM didn't contain replicated info, so after import the CFM didn't get replicated to the publish instance. After we republish the CFM and build + replicate the query package again, it started working properly. Maybe that's the reason. 

View solution in original post

2 Replies

Avatar

Community Advisor

@wei_lyu just couple of things to double check:
1. Do you have GraphQL packages installed on the publisher instance as well?

2. Did you also publish Content fragments before replicating the package? 

 

Avatar

Correct answer by
Level 3

Thank you. I think I probably know the reason to this problem now. The content.xml used to create the CFM didn't contain replicated info, so after import the CFM didn't get replicated to the publish instance. After we republish the CFM and build + replicate the query package again, it started working properly. Maybe that's the reason.