File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/graphql/schema/validation Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
package graphql .schema .validation ;
2
2
3
+ import graphql .Directives ;
3
4
import graphql .Internal ;
4
5
import graphql .schema .GraphQLAppliedDirective ;
5
6
import graphql .schema .GraphQLArgument ;
@@ -26,7 +27,7 @@ public class DeprecatedInputObjectAndArgumentsAreValid extends GraphQLTypeVisito
26
27
@ Override
27
28
public TraversalControl visitGraphQLInputObjectField (GraphQLInputObjectField inputObjectField , TraverserContext <GraphQLSchemaElement > context ) {
28
29
// There can only be at most one @deprecated, because it is not a repeatable directive
29
- GraphQLAppliedDirective deprecatedDirective = inputObjectField .getAppliedDirective ("deprecated" );
30
+ GraphQLAppliedDirective deprecatedDirective = inputObjectField .getAppliedDirective (Directives . DEPRECATED_DIRECTIVE_DEFINITION . getName () );
30
31
31
32
if (deprecatedDirective != null && GraphQLTypeUtil .isNonNull (inputObjectField .getType ()) && !inputObjectField .hasSetDefaultValue ()) {
32
33
GraphQLInputObjectType inputObjectType = (GraphQLInputObjectType ) context .getParentNode ();
@@ -42,7 +43,7 @@ public TraversalControl visitGraphQLInputObjectField(GraphQLInputObjectField inp
42
43
@ Override
43
44
public TraversalControl visitGraphQLArgument (GraphQLArgument argument , TraverserContext <GraphQLSchemaElement > context ) {
44
45
// There can only be at most one @deprecated, because it is not a repeatable directive
45
- GraphQLAppliedDirective deprecatedDirective = argument .getAppliedDirective ("deprecated" );
46
+ GraphQLAppliedDirective deprecatedDirective = argument .getAppliedDirective (Directives . DEPRECATED_DIRECTIVE_DEFINITION . getName () );
46
47
47
48
if (deprecatedDirective != null && GraphQLTypeUtil .isNonNull (argument .getType ()) && !argument .hasSetDefaultValue ()) {
48
49
if (context .getParentNode () instanceof GraphQLFieldDefinition ) {
You can’t perform that action at this time.
0 commit comments