Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ internal val builtinsDefinitionsStr = """
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT

directive @deprecated(
reason: String = "No longer supported"
reason: String! = "No longer supported"
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE

directive @defer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,11 @@ private class GQLDocumentBuilder(private val introspectionSchema: IntrospectionS
}

/**
* This assumes the case where `deprecationReason == null && isDeprecated` is not valid
* which is unclear from reading the spec as the below seems allowed:
* This assumes the case where `deprecationReason == null && isDeprecated` is not valid.
*
* ```
* type Query {
* foo: Int @deprecated(reason: null)
* }
* ```
* See https://github.com/graphql/graphql-spec/pull/1040
*
* If there are legit use cases for `@deprecated(reason: null)` we should update this function
* If a legacy schema contains `@deprecated(reason: null)`, the field appears as non-deprecated.
*/
fun makeDirectives(deprecationReason: String?): List<GQLDirective> {
if (deprecationReason == null) {
Expand Down
Loading