@@ -174,7 +174,7 @@ def perform(locations_input)
174174 select_root_field_locations ( schema )
175175 expand_abstract_resolvers ( schema , schemas )
176176 apply_supergraph_directives ( schema , @resolver_map , @field_map )
177- apply_authorization_directives ( schema , @authorizations_by_type_and_field )
177+ apply_authorization_directives ( schema )
178178
179179 if ( visibility_def = schema . directives [ GraphQL ::Stitching . visibility_directive ] )
180180 visibility_def . get_argument ( "profiles" ) . default_value ( @visibility_profiles . to_a . sort )
@@ -536,6 +536,7 @@ def merge_descriptions(type_name, members_by_location, field_name: nil, argument
536536 @formatter . merge_descriptions ( strings_by_location , Formatter ::Info . new (
537537 type_name : type_name ,
538538 field_name : field_name ,
539+ field_scopes : field_name ? @authorizations_by_type_and_field . dig ( type_name , field_name ) : nil ,
539540 argument_name : argument_name ,
540541 enum_value : enum_value ,
541542 ) )
@@ -761,11 +762,11 @@ def apply_supergraph_directives(schema, resolvers_by_type_name, locations_by_typ
761762 schema_directives . each_value { |directive_class | schema . directive ( directive_class ) }
762763 end
763764
764- def apply_authorization_directives ( schema , authorizations_by_type_and_field )
765- return if authorizations_by_type_and_field . empty?
765+ def apply_authorization_directives ( schema )
766+ return if @ authorizations_by_type_and_field. empty?
766767
767768 schema . types . each_value do |type |
768- authorizations_by_field = authorizations_by_type_and_field [ type . graphql_name ]
769+ authorizations_by_field = @ authorizations_by_type_and_field[ type . graphql_name ]
769770 next if authorizations_by_field . nil? || !type . kind . fields?
770771
771772 type . fields . each_value do |field |
0 commit comments