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

Smallrye GraphQL native: SPI ErrorExtensionProvider implementations not included #27414

Closed
schulzp opened this issue Aug 22, 2022 · 2 comments · Fixed by #27424
Closed

Smallrye GraphQL native: SPI ErrorExtensionProvider implementations not included #27414

schulzp opened this issue Aug 22, 2022 · 2 comments · Fixed by #27424
Assignees
Labels
Milestone

Comments

@schulzp
Copy link
Contributor

schulzp commented Aug 22, 2022

Describe the bug

I use quarkus-smallrye-graphql on top op quarkus 2.11.2.Final. Since I upgraded from 2.9.2.Final my integration tests started to fail: I do have ITs that make the application throw an exception, for example, when validation fails, or writing to the database fails. Those tests now fail due to a timeout on the GQL client end. On the server side I see the following exception:

ServiceConfigurationError: failed to load io.smallrye.graphql.api.ErrorExtensionProvider, class io.smallrye.graphql.execution.error.ErrorCodeExtensionProvider does not exist

Expected behavior

Application should fail with expected (gracefully handled) exception.

Actual behavior

Application does not close response which leads to timeout on client side.

How to Reproduce?

  1. Create Quarkus Application with SmallRye GraphQL extension
  2. Annotate at least one method with @Mutation that throws an exception
  3. Execute that mutation (via HTTP client or generated GQL client)

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.11.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)

Additional information

smallrye-graphql-1.6.0.jar comes with META-INF/services/io.smallrye.graphql.api.ErrorExtensionProvider, the classes referenced (io.smallrye.graphql.execution.error.ErrorCodeExtensionProvider and io.smallrye.graphql.execution.error.ExceptionNameErrorExtensionProvider) do not end up in the native binary, however.

If I manually add the following entries to my reflect-config.json, everything works as expected again:

{
  "name":"io.smallrye.graphql.execution.error.ErrorCodeExtensionProvider",
  "methods":[{"name":"<init>","parameterTypes":[] }]
},
{
  "name":"io.smallrye.graphql.execution.error.ExceptionNameErrorExtensionProvider",
  "methods":[{"name":"<init>","parameterTypes":[] }]
}
@schulzp schulzp added the kind/bug Something isn't working label Aug 22, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 22, 2022

@phillip-kruger
Copy link
Member

Thanks, I'll fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants