thecodingmachine / graphqlite

Use PHP Attributes/Annotations to declare your GraphQL API
https://graphqlite.thecodingmachine.io
MIT License
555 stars 95 forks source link

Cannot create schema: no namespace for types found #541

Closed smilesrg closed 1 year ago

smilesrg commented 1 year ago

I've got an issue with Symfony 5.4 and thecodingmachine/graphqlite:"5.0.2"

In SchemaFactory.php line 395:

  Cannot create schema: no namespace for types found (You must call the SchemaFactory::addTypeNamespace() at least once). 
pvlg commented 1 year ago

I also encountered such a problem. The reason turned out to be the latest version of symfony/dependency-injection. Downgraded to a previous version

oojacoboo commented 1 year ago

Are you using the Symfony GraphQLite bundle? I suspect the issue is related to that and not GraphQLite.

smilesrg commented 1 year ago

Yes, I'm using "thecodingmachine/graphqlite-bundle": "^5.4" with all updated depencencies.

oojacoboo commented 1 year ago

You'll want to direct any issues with the bundle and how it's handling autoloading to that repo, specifically.