File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ graphql_object!(<'a> SchemaType<'a>: SchemaType<'a> as "__Schema" |&self| {
44
44
self . mutation_type( )
45
45
}
46
46
47
+ // Included for compatibility with the introspection query in GraphQL.js
48
+ field subscription_type( ) -> Option <TypeType > {
49
+ None
50
+ }
51
+
47
52
field directives( ) -> Vec <& DirectiveType > {
48
53
self . directive_list( )
49
54
}
@@ -239,6 +244,26 @@ graphql_object!(<'a> DirectiveType<'a>: SchemaType<'a> as "__Directive" |&self|
239
244
field args( ) -> & Vec <Argument > {
240
245
& self . arguments
241
246
}
247
+
248
+ // Included for compatibility with the introspection query in GraphQL.js
249
+ field deprecated "Use the locations array instead"
250
+ on_operation( ) -> bool {
251
+ self . locations. contains( & DirectiveLocation :: Query )
252
+ }
253
+
254
+ // Included for compatibility with the introspection query in GraphQL.js
255
+ field deprecated "Use the locations array instead"
256
+ on_fragment( ) -> bool {
257
+ self . locations. contains( & DirectiveLocation :: FragmentDefinition ) ||
258
+ self . locations. contains( & DirectiveLocation :: InlineFragment ) ||
259
+ self . locations. contains( & DirectiveLocation :: FragmentSpread )
260
+ }
261
+
262
+ // Included for compatibility with the introspection query in GraphQL.js
263
+ field deprecated "Use the locations array instead"
264
+ on_field( ) -> bool {
265
+ self . locations. contains( & DirectiveLocation :: Field )
266
+ }
242
267
} ) ;
243
268
244
269
graphql_enum ! ( DirectiveLocation as "__DirectiveLocation" {
You can’t perform that action at this time.
0 commit comments