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

Headless AEM || Grapgh QL

Avatar

Level 6

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

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @arvind ,

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.

 

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hi @arvind ,

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.

 

Avatar

Level 6

@arvind 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.

Avatar

Level 6

Hi,

 

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