verbb / vizy

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

Upgrading to 2.0.11 breaks GraphQL #196

Closed tom-bywild closed 1 year ago

tom-bywild commented 1 year ago

Describe the bug

After updating verbb/vizy to version 2.0.11 from previous 2.0.10, I encountered a broken GraphQL integration. The issues:

After reverting to 2.0.10 (which also was a pain, as 2.0.11 introduces the initialRows field, which breaks a downgrade and effectively required me to delete all vizy-fields first), the GraphQL explorer can be loaded again.

Image Description
screenshot_2023-02-23_at_20 27 44 Screenshot of GraphiQL w/ broken explorer and broken query that worked before
Screenshot 2023-02-23 at 20 31 45 Error after downgrading for the first time

Steps to reproduce

  1. Update to version 2.0.11
  2. See issue

Craft CMS version

Craft Pro 4.3.10

Plugin version

2.0.11

Multi-site?

No

Additional context

No response

engram-design commented 1 year ago

Are you able to give the latest craft-4 changes a go? There were some issues fixed with GraphQL. To get this early, run composer require verbb/vizy:"dev-craft-4 as 2.0.11"

tom-bywild commented 1 year ago

Hi @engram-design 👋 thanks for the quick response, this version fixes all issues 🤙

tom-bywild commented 1 year ago

As another thought, do you think it would make sense to add an automated integration test to this repo? I would imagine a Github Action using a Craft Docker Image. We run a migration or data dump first, then query for the entities. I think this could catch such an issue early.

I'd be open to contriute.

engram-design commented 1 year ago

That's certainly a possibility, although I worry about the maintainability of such a thing (the database dump specifically). But yeah, anything to help with automated testing is something worth considering.

engram-design commented 1 year ago

Fixed in 2.0.12