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

Fixing some bugs regarding transformation of annotation 'java.lang.Deprecated' to graphQL's 'Deprecated'. directive. #1897

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

mskacelik
Copy link
Contributor

@mskacelik mskacelik commented Aug 31, 2023

fixes:#1896
/cc @jmartisk

Changes:

Changes:

  • Refactored the code to ensure that the transformation methods return the Optional<DirectiveInstance> type instead of the raw type. This change eliminates situations where the method could return null or a list, as was the case with DeprecatedDirectivesHelper. Since the java.lang.Deprecated is non repeatable annotation.
  • Resolved a bug causing a NullPointerException when using java.lang.Deprecated during schema generation via the smallrye-graphql-maven-plugin goal: generating-schema. The issue stemmed from the fact that GenerateSchemaMojo did not scan the smallrye-graphql-api, where the GraphQL Deprecated annotation was defined.
  • Implemented a feature enabling the transformation of java.lang.Deprecated from operations (high-level fields), enum values, and field definitions of an output type. This addition complements the existing implementation for attribute definitions and input type field definitions.

tests: quarkusio/quarkus@204c115

@mskacelik mskacelik force-pushed the deprecatedhelper-small-fix branch from 2439d11 to 538d05f Compare August 31, 2023 12:24
…tions (high level fields), enum values, output type fields. Also fixed that while using generate-schema goal, there is no NPE. + minor refactoring of the code.
@mskacelik mskacelik force-pushed the deprecatedhelper-small-fix branch from 538d05f to 18eadc1 Compare September 1, 2023 08:10
@jmartisk jmartisk merged commit 77ea567 into smallrye:main Sep 1, 2023
@jmartisk
Copy link
Member

jmartisk commented Sep 1, 2023

Thanks!

@mskacelik mskacelik deleted the deprecatedhelper-small-fix branch September 1, 2023 11:21
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

Successfully merging this pull request may close these issues.

2 participants