@@ -52,29 +52,17 @@ pub(crate) async fn resolve_container(
52
52
fn collect_typename_field < ' a > (
53
53
fields : & mut Vec < BoxFieldFuture < ' a > > ,
54
54
object : & ' a Object ,
55
- ctx : & ContextSelectionSet < ' a > ,
56
55
field : & ' a Positioned < Field > ,
57
56
) {
58
- if matches ! (
59
- ctx. schema_env. registry. introspection_mode,
60
- IntrospectionMode :: Enabled | IntrospectionMode :: IntrospectionOnly
61
- ) && matches ! (
62
- ctx. query_env. introspection_mode,
63
- IntrospectionMode :: Enabled | IntrospectionMode :: IntrospectionOnly ,
64
- ) {
65
- fields. push (
66
- async move {
67
- Ok ( (
68
- field. node . response_key ( ) . node . clone ( ) ,
69
- Value :: from ( object. name . as_str ( ) ) ,
70
- ) )
71
- }
72
- . boxed ( ) ,
73
- )
74
- } else {
75
- fields
76
- . push ( async move { Ok ( ( field. node . response_key ( ) . node . clone ( ) , Value :: Null ) ) } . boxed ( ) )
77
- }
57
+ fields. push (
58
+ async move {
59
+ Ok ( (
60
+ field. node . response_key ( ) . node . clone ( ) ,
61
+ Value :: from ( object. name . as_str ( ) ) ,
62
+ ) )
63
+ }
64
+ . boxed ( ) ,
65
+ )
78
66
}
79
67
80
68
fn collect_schema_field < ' a > (
@@ -308,7 +296,7 @@ fn collect_fields<'a>(
308
296
match & selection. node {
309
297
Selection :: Field ( field) => {
310
298
if field. node . name . node == "__typename" {
311
- collect_typename_field ( fields, object, ctx , field) ;
299
+ collect_typename_field ( fields, object, field) ;
312
300
continue ;
313
301
}
314
302
0 commit comments