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

Error for non-bean classes annotated with @GraphQLApi #357

Open
datho7561 opened this issue Feb 9, 2023 · 0 comments
Open

Error for non-bean classes annotated with @GraphQLApi #357

datho7561 opened this issue Feb 9, 2023 · 0 comments
Assignees
Labels

Comments

@datho7561
Copy link
Contributor

According to the spec, only CDI beans can be annotated with @GraphQLApi. However, the rules on the @GraphQLApi annotation are not fine-grained enough to specify this, so the java compiler and language server don't report this as an error.

Trying this out with smallrye-graphql with a Quarkus project, if you try to put the annotation on a non-bean class, the application won't start up. Only non-abstract classes (i.e. not interface, not enums) actually support the annotation.

It would be nice to add an error if the user puts the @GraphQLApi on a type that doesn't support it.

@datho7561 datho7561 added enhancement New feature or request validation graphql labels Feb 9, 2023
@datho7561 datho7561 moved this to 📋 Sprint Backlog in IDE Cloudaptors Feb 14, 2023
@datho7561 datho7561 self-assigned this Mar 6, 2023
@datho7561 datho7561 moved this from 📋 Sprint Backlog to 🏗 In progress in IDE Cloudaptors Mar 6, 2023
@datho7561 datho7561 moved this from 🏗 In progress to 📋 Sprint Backlog in IDE Cloudaptors Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant