Can someone help me with this query?
I am calling a page that has a hero slice with a content relationship link called cta that has a field of action button text.
const page = await client.getAllByType("coming_soon", {
graphQuery: `
{
page {
slices {
... on hero_slice {
variation {
... on details {
primary {
cta {
... on cta_email {
slices {
... on call_to_action_slice {
variation {
... on default {
primary {
action_button_text
}
}
}
}
}
}
}
}
}
}
}
}
}
}
`,
});
{
"id": "hero",
"type": "SharedSlice",
"name": "Hero",
"description": "Hero",
"variations": [
{
"id": "default",
"name": "Default",
"docURL": "...",
"version": "initial",
"description": "Default",
"imageUrl": "",
"primary": {
"hero_title": {
"type": "Text",
"config": {
"label": "Hero Title",
"placeholder": ""
}
},
"hero_description": {
"type": "Text",
"config": {
"label": "Hero Description",
"placeholder": ""
}
}
},
"items": {}
},
{
"id": "heroWithSocialMediaHandles",
"name": "HeroWithSocialMediaHandles",
"docURL": "...",
"version": "initial",
"description": "Default",
"imageUrl": "",
"primary": {
"hero_title": {
"type": "Text",
"config": {
"label": "Hero Title",
"placeholder": ""
}
},
"hero_description": {
"type": "Text",
"config": {
"label": "Hero Description",
"placeholder": ""
}
}
},
"items": {
"social_media_handle": {
"type": "Link",
"config": {
"label": "Social Media Handle",
"select": "document"
}
}
}
},
{
"id": "handlesCta",
"name": "Handles & CTA",
"docURL": "...",
"version": "initial",
"description": "Default",
"imageUrl": "",
"primary": {
"hero_title": {
"type": "Text",
"config": {
"label": "Hero Title",
"placeholder": ""
}
},
"hero_description": {
"type": "Text",
"config": {
"label": "Hero Description",
"placeholder": ""
}
},
"cta": {
"type": "Link",
"config": {
"label": "CTA",
"select": "document"
}
}
},
"items": {
"social_media_handle": {
"type": "Link",
"config": {
"label": "Social Media Handle",
"select": "document"
}
}
}
}
]
}
{
"id": "cta_email",
"label": "CTA",
"format": "custom",
"repeatable": true,
"status": true,
"json": {
"Main": {
"uid": {
"config": {
"label": "UID"
},
"type": "UID"
},
"paragraph": {
"type": "Text",
"config": {
"label": "Paragraph",
"placeholder": ""
}
},
"button_label": {
"type": "Text",
"config": {
"label": "Button Label",
"placeholder": ""
}
},
"form_placeholder": {
"type": "Text",
"config": {
"label": "Form Placeholder",
"placeholder": ""
}
},
"slices": {
"type": "Slices",
"fieldset": "Slice Zone",
"config": {
"choices": {
"call_to_action": {
"type": "SharedSlice"
}
}
}
}
}
}
}
{
"id": "call_to_action",
"type": "SharedSlice",
"name": "CallToAction",
"description": "CallToAction",
"variations": [
{
"id": "default",
"name": "Default",
"docURL": "...",
"version": "initial",
"description": "Default",
"imageUrl": "",
"primary": {
"call_description": {
"type": "Text",
"config": {
"label": "Call Description",
"placeholder": ""
}
},
"action_button_text": {
"type": "Text",
"config": {
"label": "Action Button Text",
"placeholder": ""
}
},
"form_placeholder_text": {
"type": "Text",
"config": {
"label": "Form Placeholder Text",
"placeholder": ""
}
}
},
"items": {}
}
]
}