@@ -909,30 +909,32 @@ fn collect_fields_inner<'a>(
909
909
) ;
910
910
911
911
// Collect complementary fields used in the `orderBy` query attribute, if present.
912
- if let Some ( arguments) = get_argument_value ( & field. arguments , "orderBy" ) {
913
- let schema_field = type_condition. field ( & field. name ) . expect ( & format ! (
914
- "the field {:?} to exist in {:?}" ,
915
- & field. name,
916
- & type_condition. name( )
917
- ) ) ;
918
- let field_name = sast:: get_field_name ( & schema_field. field_type ) ;
919
- let object_or_interface_for_field = ctx
920
- . query
921
- . schema
922
- . document ( )
923
- . object_or_interface ( & field_name)
924
- . expect ( & format ! (
925
- "The field {:?} to exist in the Document" ,
926
- field_name
912
+ if !* DISABLE_EXPERIMENTAL_FEATURE_SELECT_BY_SPECIFIC_ATTRIBUTE_NAMES {
913
+ if let Some ( arguments) = get_argument_value ( & field. arguments , "orderBy" ) {
914
+ let schema_field = type_condition. field ( & field. name ) . expect ( & format ! (
915
+ "the field {:?} to exist in {:?}" ,
916
+ & field. name,
917
+ & type_condition. name( )
927
918
) ) ;
928
- match arguments {
929
- graphql_parser:: schema:: Value :: Enum ( complementary_field_name) => {
930
- complementary_fields. insert (
931
- object_or_interface_for_field,
932
- complementary_field_name. clone ( ) ,
933
- ) ;
919
+ let field_name = sast:: get_field_name ( & schema_field. field_type ) ;
920
+ let object_or_interface_for_field = ctx
921
+ . query
922
+ . schema
923
+ . document ( )
924
+ . object_or_interface ( & field_name)
925
+ . expect ( & format ! (
926
+ "The field {:?} to exist in the Document" ,
927
+ field_name
928
+ ) ) ;
929
+ match arguments {
930
+ graphql_parser:: schema:: Value :: Enum ( complementary_field_name) => {
931
+ complementary_fields. insert (
932
+ object_or_interface_for_field,
933
+ complementary_field_name. clone ( ) ,
934
+ ) ;
935
+ }
936
+ _ => unimplemented ! ( "unsure on what to do about other variants" ) ,
934
937
}
935
- _ => unimplemented ! ( "unsure on what to do about other variants" ) ,
936
938
}
937
939
}
938
940
}
0 commit comments