Expand my Community achievements bar.

SOLVED

Retrive attributes of a content fragment variation using graphql

Avatar

Level 1

While observing the schema generated. The variation is represented as SCALAR - String. Could you please help here on how to retrive all the values of a variation as list?

http://localhost:4502/content/cq:graphql/folderpath/endpoint.GQLschema

j0S102X5_0-1680937364894.png

 

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@j0S102X5 Please see the below example given by Adobe

 

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

 

Sample Query

{
  authorList(variation: "another") {
    items {
        _path
        _variation
        firstName
        lastName
        birthDay
    }
  }
}

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@j0S102X5 Please see the below example given by Adobe

 

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

 

Sample Query

{
  authorList(variation: "another") {
    items {
        _path
        _variation
        firstName
        lastName
        birthDay
    }
  }
}

Avatar

Level 1

Thanks for the reply. currently while quering the master we have a field "_variations" which is giving a list of Strings. I am looking for some from properties of variation as well like "_path", firstName.