Closed jonnymaceachern closed 2 years ago
I fixed my issue.
I hadn't enabled the setting that exposes the ACF field group that my block was using:
I've gone ahead and enabled this setting, provided it a name (acf
), and updated my query:
query Page {
page(id: "1", idType: DATABASE_ID) {
... on AcfSliderBlock {
acf {
slides {
body
heading
link {
target
title
url
}
}
}
}
}
}
If I parse the returned
blocksJSON
, I get an array of Gutenberg blocks and their associateddata
:...but that doesn't appear to be the case.
Can I adjust my query so that the returned repeater fields are nested hierarchically, as opposed to the flat, key-dependent structure pictured in the screenshot?