I have an issue when I fetch data from my cms. I get certain data but when I am trying to get nested data I donât know how to correctly write my query. my CMS looks like this:
I am trying to fetch the data that is underneath widgets. When I expand widgets it looks like this:
I am trying to fetch the Widget ID and the Heading. my query looks like this foe now:
export const QUERY = (): string => {
return `query Overview {
overview {
customer
introText
title
totalScore {
widgetId
heading
description
}
totalScoreComparison {
heading
description
widgets #Here is my issue, how do I write this to get the widget id and the heading?
}
dimensionWeight {
heading
description
widgets
}
introOverlay {
heading
description
image {
url
}
}
}
}`;
};
The data. that I get out is this:
My widgets are empty. I canât get the widget Id - feels like I have tried everything, how do I write the correct query to get my widget id and my heading?