wp-graphql-content-blocks icon indicating copy to clipboard operation
wp-graphql-content-blocks copied to clipboard

Support nested properties inside block.json attributes

Open mrclay opened this issue 10 months ago • 0 comments

I'd like the plugin to support object properties inside attributes like:

{
  ...
  "attributes": {
    "film": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        }
        ...
      }
    }
  }
}

Currently any "type": "object" falls into the generic BlockAttributesObject type, and it seems I can't even extend it with register_graphql_field('MyBlock', 'film', ....

mrclay avatar Mar 29 '24 16:03 mrclay