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

Support @deprecated on arguments and input fields #696

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ class SchemaParser internal constructor(
.definition(inputDefinition)
.description(getDocumentation(inputDefinition, options))
.apply { inputDefinition.defaultValue?.let { v -> defaultValueLiteral(v) } }
.apply { getDeprecated(inputDefinition.directives)?.let { deprecate(it) } }
ajkerr marked this conversation as resolved.
Show resolved Hide resolved
.type(determineInputType(inputDefinition.type, inputObjects, referencingInputObjects))
.withAppliedDirectives(*buildAppliedDirectives(inputDefinition.directives))
builder.field(fieldBuilder.build())
Expand Down Expand Up @@ -279,6 +280,7 @@ class SchemaParser internal constructor(
.definition(argumentDefinition)
.description(getDocumentation(argumentDefinition, options))
.type(determineInputType(argumentDefinition.type, inputObjects, setOf()))
.apply { getDeprecated(argumentDefinition.directives)?.let { deprecate(it) } }
.apply { argumentDefinition.defaultValue?.let { defaultValueLiteral(it) } }
.withAppliedDirectives(*buildAppliedDirectives(argumentDefinition.directives))

Expand All @@ -305,6 +307,7 @@ class SchemaParser internal constructor(
.definition(arg)
.description(getDocumentation(arg, options))
.type(determineInputType(arg.type, inputObjects, setOf()))
.apply { getDeprecated(arg.directives)?.let { deprecate(it) } }
.apply { arg.defaultValue?.let { defaultValueLiteral(it) } }
.withAppliedDirectives(*buildAppliedDirectives(arg.directives))
.build())
Expand Down
Loading