I have a template with a droplink "productarea". When I use a GraphQL to fetch this item, the value of the "productarea" is a GUID. This guid points to an item in the sitecore tree, and I need the displayName of that item. Is this possible to get using a single GraphQL, or do I need to run a second GraphQL from the client?
Here are the queries I'm using:
query getArticles($item: String = "{02E9F5E2-8CDE-4A52-B260-62B628692BF8}") {
item(path: $item) {
...articleFields
}
}
fragment articleFields on ArticlePage {
productarea{
value
}
}
query getArea($item: String = "{ADAA9D5C-4C30-477B-960A-0062B384F235}") {
item(path: $item) {
displayName
}
}
Get articles result:
{
"data": {
"item": {
"productarea": {
"value": "{ADAA9D5C-4C30-477B-960A-0062B384F235}"
}
}
}
}
GetArea result
{
"data": {
"item": {
"displayName": "Doors"
}
}
}