Skip to content

Commit 4b4935f

Browse files
committed
Make deprecated reason non-null
1 parent add6dc5 commit 4b4935f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/graphql/Directives.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class Directives {
6363
newInputValueDefinition()
6464
.name("reason")
6565
.description(createDescription("The reason for the deprecation"))
66-
.type(newTypeName().name(STRING).build())
66+
.type(newNonNullType(newTypeName().name(STRING).build()).build())
6767
.defaultValue(StringValue.newStringValue().value(NO_LONGER_SUPPORTED).build())
6868
.build())
6969
.build();
@@ -197,7 +197,7 @@ public class Directives {
197197
.description("Marks the field, argument, input field or enum value as deprecated")
198198
.argument(newArgument()
199199
.name("reason")
200-
.type(GraphQLString)
200+
.type(nonNull(GraphQLString))
201201
.defaultValueProgrammatic(NO_LONGER_SUPPORTED)
202202
.description("The reason for the deprecation"))
203203
.validLocations(FIELD_DEFINITION, ENUM_VALUE, ARGUMENT_DEFINITION, INPUT_FIELD_DEFINITION)

0 commit comments

Comments
 (0)