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

Generate Deprecated Annotation For Queries #673

Open
pfaul opened this issue Apr 9, 2024 · 1 comment
Open

Generate Deprecated Annotation For Queries #673

pfaul opened this issue Apr 9, 2024 · 1 comment

Comments

@pfaul
Copy link

pfaul commented Apr 9, 2024

Hello, I am having a hard time developing my graphql schema with deprecated queries, mutations and subscriptions.

I have found the config property "addDeprecatedAnnotation", which transforms input values into correctly annotated deprecated methods. (See graphql-dgs-codegen-core/src/main/kotlin/com/netflix/graphql/dgs/codegen/generators/java/ClientApiGenerator.kt)

I need the same to work for queries, mutations and subscriptions on class level, e.g.:

schema.graphql:

"Query root" type Query { doSomething(anInput: String): Void @deprecated(reason : "Use doSomethingElse instead.")}

should translate into:

/**

  • @deprecated Use doSomethingElse instead.
    */
    @deprecated
    public class DoSomethingGraphQLQuery extends GraphQLQuery {...}

I would be grateful for any help here. Thanks in advance!

@srinivasankavitha
Copy link
Contributor

srinivasankavitha commented Apr 15, 2024

I've created a PR here for addressing this: #674
Will be available in the next release this week.

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

2 participants