LastDragon-ru / lara-asp

Awesome Set of Packages for Laravel
MIT License
11 stars 1 forks source link

`SchemaPrinter` must not load all existing types/directives through `Schema`/`DirectiveLocator`. #50

Closed LastDragon-ru closed 1 year ago

LastDragon-ru commented 1 year ago

It doesn't work for custom schemas. There is no way to fix it until Lighthouse get rids of singletons :( The problem is

https://github.com/LastDragon-ru/lara-asp/blob/ccd51afaee19d16119b968a435570416457f9639/packages/graphql/src/SchemaPrinter/PrintedSchemaImpl.php#L46

so the getTypeMap() is (lazily) executed after printing and singletons reset, thus will refer to default (= application) schema.

Related to: #43, https://github.com/nuwave/lighthouse/issues/273

LastDragon-ru commented 1 year ago

Printer moved into separate package (see #56) and support of unused types/directives was removed.