AEM-GraphQL -@include and @skip | Community
Skip to main content
May 19, 2022
Solved

AEM-GraphQL -@include and @skip

  • May 19, 2022
  • 1 reply
  • 1251 views

Hi Team,

 

In a headless approach, We are using Graph QL API to send Offer data (stored in Content fragment) to other channels like Mobile APP etc.

 

So, we have used 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html

 

Requirement:

Is there any way, we can manipulate GrapghQL response so that we could remove all empty/null values from response.

1) Using any directive ? like @17377928 , @6676

2) Is there any way to override something through Code?

 

Thanks in advance.

 

Regards,

Ch

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arunpatidar
Community Advisor
Community Advisor
May 19, 2022

As far as I understand, you are not sure what each value will return null : it may or it may not be null. In this case it is impossible to adjust your schema to only contain non-null values. You would have to deal with it in the frontend and completely exclude null values there.

 

I think its better to replace it from front end(consumer) side response

Arun Patidar
arvind-1Author
May 19, 2022

@arunpatidar  Thank you very much Arun for your reply.

 

 

Since we get GrapghQL connector installed in AEM for Content fragment -Headless approach.

 

What I wanted to ask is :

 

Is there any way we can override any Model/Servlet that are being used in Graph QL connector and then accordingly could manipulate API response.

 

Thanks in advance.

 

 

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
May 20, 2022