graphqlite-bundle icon indicating copy to clipboard operation
graphqlite-bundle copied to clipboard

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

Open ozahorulia opened this issue 1 year ago • 1 comments

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 avatar Aug 27 '24 14:08 ozahorulia

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!

ozahorulia avatar Aug 27 '24 18:08 ozahorulia

This issue was fixed in graphqlite https://github.com/thecodingmachine/graphqlite/pull/721

andrew-demb avatar Dec 18 '24 11:12 andrew-demb