Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ozahorulia opened this issue Aug 27, 2024 · 2 comments

Comments

@ozahorulia
Copy link

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
Copy link
Author

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!

@andrew-demb
Copy link
Collaborator

This issue was fixed in graphqlite thecodingmachine/graphqlite#721

@andrew-demb andrew-demb closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants