Expand my Community achievements bar.

SOLVED

How to fetch the content of all variations of content fragment in single graphql query?

Avatar

Level 1

I am trying to fetch all the variations of a content fragment in single graphql query but unable to see all the variation in the response. Instead , i can see only the master variation response in a list. This is the issue in the older version of AEM.

However, in the newer version of AEM , if i try using "includeVariations:true" , i can see the desired output and its working as expected. 

Request your help to provide me the sample graphQL request to include multiple variations of a content fragment - Appreciate your support!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @GunjanDe1 

 

Not sure, the version, where it is not working.

 

I have my local running on AEM 6.5.18, and the following query works fine:

 

query {
blogList(
includeVariations:true
){
items{
_variation
_path
title
}
}
}

 

 

Add as many fields under items., I just added bare minimum

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

Hi @GunjanDe1 

 

Not sure, the version, where it is not working.

 

I have my local running on AEM 6.5.18, and the following query works fine:

 

query {
blogList(
includeVariations:true
){
items{
_variation
_path
title
}
}
}

 

 

Add as many fields under items., I just added bare minimum