wp-graphql-block-editor icon indicating copy to clipboard operation
wp-graphql-block-editor copied to clipboard

How to get all the blocks of a page/posts without limit?

Open insaurabh opened this issue 3 years ago • 0 comments
trafficstars

I am trying to get all the blocks of a page or posts without limit of innerblocks.

Currenlty we need to do something like this

  id
    blocks {
      name
      innerBlocks {
        name
        innerBlocks {
          name
          innerBlocks {
            name
            innerBlocks {
              name
              innerBlocks {
                name
              }
            }
          }
        }
      }
    }

I found there is blocksJSON but not able to retrieve any blocks it gave null.

In plugin it's mentioned like this

image

My query

image

insaurabh avatar Aug 22 '22 08:08 insaurabh