pristas-peter / wp-graphql-gutenberg

Query gutenberg blocks with wp-graphql
https://wp-graphql-gutenberg.netlify.app
GNU General Public License v3.0
299 stars 62 forks source link

Images is empty in CoreGalleryBlock #186

Closed Okakakai closed 4 months ago

Okakakai commented 1 year ago

I am a novice engineer using WordPress with lightsail. Using WP as a Headless CMS. I would like to get the url of each image of "CoreGalleryBlock". However, I get []. Please let me know the wisdom to get the full url etc.

image

WordPress : Version 6.1.1 WP GraphQL : Version 1.13.6 WP GraphQL Gutenberg : Version 0.3.11

Greaby commented 11 months ago

@Okakakai The format of the CoreGalleryBlock has changed.

 blocks {
    ... on CoreGalleryBlock {
        innerBlocks {
            ... on CoreImageBlock  {
                attributes {
                    ... on CoreImageBlockAttributes{
                        alt
                        caption
                        url
                    }
                }
            }
        }
    }
}