thecodingmachine / graphqlite-bundle

A Symfony bundle for thecodingmachine/graphqlite.
35 stars 37 forks source link

Typed property GraphQL\Type\Definition\ObjectType::$description must not be accessed before initialization #221

Open ozahorulia opened 2 weeks ago

ozahorulia commented 2 weeks ago

After upgrading from 5x to 6x php bin/console graphqlite:dump-schema stopped working with error:

Typed property GraphQL\Type\Definition\ObjectType::$description must not be accessed before initialization

Looks like it's failing with all of my types. I don't see any BC changes in the changelog that might affect this. Any ideas?

Full list of upgraded packages:

Upgrading thecodingmachine/graphqlite (v5.0.3 => v6.2.3)
Upgrading thecodingmachine/graphqlite-bundle (v5.4.0 => v6.0.3)
Upgrading thecodingmachine/graphqlite-symfony-validator-bridge (v5.0.1 => v6.0.2)
Upgrading webonyx/graphql-php (v14.11.10 => v15.12.5)
Upgrading ecodev/graphql-upload (6.1.5 => 7.0.0)
ozahorulia commented 2 weeks ago

Update.

It was related to a custom type declared in my app. According to the doc I have to design a class that extends ObjectType. And this is how it was before and worked on 5.x.

We were experimenting around and problem seems to be solved once we extended our custom types not from ObjectType but from MutableObjectType. I don't know if everything works yet (need to run more tests), but at least schema dump is not throwing the error anymore.

Still don't understand why it happened and if my solution is okay. Would appreciate any help. Thank you in advance!