verbb / vizy

A flexible visual editor for Craft CMS
Other
44 stars 8 forks source link

Fix Block Type Handle not being present in block queries for GQL #10

Closed engram-design closed 3 years ago

pixleight commented 3 years ago

To add more context: data returned from GQL looks like

"rawNodes": [
  {
    "type": "vizyBlock",
    "attrs": {
      "id": "vizy-block-mbIwNPo3uB",
      "enabled": true,
      "collapsed": false,
      "values": {
        "type": "type-IGv2zbLQaK",

where rawNodes.attrs.values.type is a random string, rather than the block type handle.

engram-design commented 3 years ago

Yep, working on revamped GQL querying, which is taking a little longer to implement.

engram-design commented 3 years ago

Added much better support for GQL for the next release. I would recommend switching to use nodes for this, and a few more benefits, rather than using the rawNodes, which is only going to return the data stored by Vizy in the database.

To get this early, change your verbb/vizy requirement in composer.json to:

"require": {
  "verbb/vizy": "dev-craft-3 as 1.0.2",
  "...": "..."
}

Then run composer update.

Also have a look at the updated docs

engram-design commented 3 years ago

Fixed in 1.0.3