44import graphql .schema .GraphQLDirective ;
55
66import static graphql .Scalars .GraphQLBoolean ;
7- import static graphql .Scalars .GraphQLString ;
87import static graphql .introspection .Introspection .DirectiveLocation .FIELD ;
9- import static graphql .introspection .Introspection .DirectiveLocation .FIELD_DEFINITION ;
108import static graphql .introspection .Introspection .DirectiveLocation .FRAGMENT_SPREAD ;
119import static graphql .introspection .Introspection .DirectiveLocation .INLINE_FRAGMENT ;
1210import static graphql .schema .GraphQLArgument .newArgument ;
1311import static graphql .schema .GraphQLNonNull .nonNull ;
1412
1513/**
16- * The query directives that are under stood by graphql-java
14+ * The directives that are understood by graphql-java
1715 */
1816public class Directives {
1917
@@ -38,19 +36,9 @@ public class Directives {
3836 .build ();
3937
4038 /**
41- * @deprecated - this is no longer needed and will be removed in a future version
39+ * The @defer directive can be used to defer sending data for a field till later in the query. This is an opt in
40+ * directive that is not available unless it is explicitly put into the schema.
4241 */
43- @ Deprecated
44- public static final GraphQLDirective FetchDirective = GraphQLDirective .newDirective ()
45- .name ("fetch" )
46- .description ("Directs the SDL type generation to create a data fetcher that uses this `from` argument as the property name" )
47- .argument (newArgument ()
48- .name ("from" )
49- .type (nonNull (GraphQLString ))
50- .description ("The `name` used to fetch values from the underlying object" ))
51- .validLocations (FIELD_DEFINITION )
52- .build ();
53-
5442 public static final GraphQLDirective DeferDirective = GraphQLDirective .newDirective ()
5543 .name ("defer" )
5644 .description ("This directive allows results to be deferred during execution" )
0 commit comments