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

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

Closed
LastDragon-ru opened this issue Dec 27, 2022 · 1 comment · Fixed by #56
Assignees
Labels
bug Something isn't working pkg: graphql scope: feat New feature or request

Comments

@LastDragon-ru
Copy link
Owner

LastDragon-ru commented Dec 27, 2022

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

$map = $this->schema->getTypeMap();

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

Related to: #43, nuwave/lighthouse#273

@LastDragon-ru LastDragon-ru added bug Something isn't working scope: feat New feature or request pkg: graphql labels Dec 27, 2022
LastDragon-ru added a commit that referenced this issue Dec 28, 2022
…tions::printDefaultGraphQLSchema()` will use actual singletons while printing.

Related: #50
@LastDragon-ru
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg: graphql scope: feat New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant