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

This provides @deprecated on input fields and arguments #2186

Merged
merged 4 commits into from
Mar 19, 2021

Conversation

bbakerman
Copy link
Member

@bbakerman bbakerman commented Feb 5, 2021

See #1770

See also https://github.com/smitt04/graphql/blob/ac15638ac02ac88013d838785d907c24bbaeff6b/spec/Section%204%20--%20Introspection.md

This now allows @deprecated to be on input fields and arguments.

type Query {
    someField(someArg : Int @deprecated) : String
}

input InputType {
    someInputField : String @deprecated
}    

} else if (environment.getSource() instanceof GraphQLInputObjectField) {
GraphQLInputObjectField inputField = environment.getSource();
} else if (type instanceof GraphQLInputObjectField) {
GraphQLInputObjectField inputField = (GraphQLInputObjectField) type;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just tweaked it a little bit

filtered.remove(valueDefinition);
}
}
return filtered;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tweaked the code to use .stream()

.type(newNonNullType(newTypeName().name("String").build()).build())
.build())
.build();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed repeated definition and re-used the other ones

@dfa1
Copy link
Contributor

dfa1 commented Feb 6, 2021

in my team we really need this! As soon as is merged I could provide testing and feedback

@bbakerman bbakerman added this to the 17.0 milestone Feb 26, 2021
@vojtapol
Copy link

vojtapol commented Mar 3, 2021

Love this addition!

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.

None yet

3 participants