Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

AEM Persisted Queries, AEM Headless integration

Avatar

Level 2

Hi,

 

Do I need to implement any  Authentication system to fetch persisted graphql queries using server side implementation?

I believe persisted queries are available to public through publisher instance, just like

publisher-xyz.adobeaemcloud.com/graphql/execute.json/configuration-name/persisted-query-name

 

3 Replies

Avatar

Community Advisor

@rohanjuneja 

 

The query results depend on the ACLs of the User (Service credentials in case of App-to-App).

  • You can create the service credentials via CM.
  • Once user syncs, add to a groups with required permissions.
  • Access endpoint via these service credentials [0]
  • If your requirements can be dealt with single user, then dispatcher cache can be used as it is. ELse, you might want to implement permission sensitive caching [1]. In [1], I have added details for using GraphQL with CUG, you can skip Step-1, but remaining steps should still be valid.

 

[0]: https://techrevel.blog/2023/09/06/access-restricted-resources-on-aemaacs-with-java-and-service-accou...

[1]: https://techrevel.blog/2023/06/07/securing-content-for-graphql-queries/


Aanchal Sikka

Avatar

Level 2

Hi Aanchal,

 

So, if I am implementing AEMaaCS within a React app, and implementing AEM through APIGEE.  How would the authentication mechanism work?

publisher-xyz.adobeaemcloud.com/graphql/execute.json/configuration-name/persisted-query-name

Since, all content is available publically through AEM publisher instance. I just need access to content for frontend, no assets or any other thing from AEM.

 

Avatar

Administrator

@rohanjuneja Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni