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

Failing main tests / webonyx compatibility #1112

Closed
Vincz opened this issue Mar 19, 2023 · 1 comment
Closed

Failing main tests / webonyx compatibility #1112

Vincz opened this issue Mar 19, 2023 · 1 comment

Comments

@Vincz
Copy link
Collaborator

Vincz commented Mar 19, 2023

Q A
Bug report? yes

Our tests fail with the latest version of webonyx/graphql because of the schema dumping test.
Here: https://github.com/webonyx/graphql-php/blob/4ceb094b7850a586f04d487cc33702dd65ef9117/src/Utils/SchemaPrinter.php#L213

They are calling getType() for Query, Mutation and Query. The problem is that our type resolver raises an exception when a requested type is requested (here:

throw new UnresolvableException(
).
I think that webonyx/graphql expect us to return null in this case (as shown here: https://github.com/webonyx/graphql-php/blob/4ceb094b7850a586f04d487cc33702dd65ef9117/src/Type/Schema.php#L305).

I'm not sure how to resolve this. Should we comply with webonyx requirement? If so, we should check everywhere we are using getType and assuming an raised exception.

I don't have much time to look further, just wanted to write down my conclusion for further fix.

@mcg-web Let me know what you think about this.

@Vincz
Copy link
Collaborator Author

Vincz commented May 27, 2023

Fix in #1122

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

1 participant