Headless AEM || Grapgh QL | Community
Skip to main content
Level 5
February 14, 2022
Solved

Headless AEM || Grapgh QL

  • February 14, 2022
  • 2 replies
  • 861 views

Hello Team,

AEM Version: 6.5.11

We need to provide some JSON Data to Mobile app from AEM side. We are thinking to use GraphQL API for the same. I wanted to have some suggestions on the same:

 

1) To do the above, what is the ideal approach to send data---From Author instance only or from Publish...Because somewhere I read related to it and got confused.

 

2) We should be using persistent query or general queries should be fine?

 

Regards,

Arvind

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Anish-Sinha

Hi @arvind-1 ,

Below are my suggestion:

1. It totally depends on the data you are exposing. Since you are sharing the data to App, I would assume this information for end users, and if so, I would say, only expose publish data and not author data. Author environment may expose some data which is in edit/review state.

2. It totally depends on what way you are able to achieve your requirement. Using persistent query would definitely be better for performance due to its enhanced capabilities.

 

2 replies

Anish-Sinha
Adobe Employee
Anish-SinhaAdobe EmployeeAccepted solution
Adobe Employee
February 14, 2022

Hi @arvind-1 ,

Below are my suggestion:

1. It totally depends on the data you are exposing. Since you are sharing the data to App, I would assume this information for end users, and if so, I would say, only expose publish data and not author data. Author environment may expose some data which is in edit/review state.

2. It totally depends on what way you are able to achieve your requirement. Using persistent query would definitely be better for performance due to its enhanced capabilities.

 

ibishika
Level 4
February 15, 2022

@arvind-1 Not sure I got the problem statement correct here but if you are exposing data from AEM as JSON, have you checked if Sling Model Exporter fits your requirement or not.

arvind-1Author
Level 5
February 16, 2022

Hi,

 

We need to use GraphQL for Headless in our project that is why we are not using Exporter.