@@ -174,7 +174,7 @@ def perform(locations_input)
174
174
select_root_field_locations ( schema )
175
175
expand_abstract_resolvers ( schema , schemas )
176
176
apply_supergraph_directives ( schema , @resolver_map , @field_map )
177
- apply_authorization_directives ( schema , @authorizations_by_type_and_field )
177
+ apply_authorization_directives ( schema )
178
178
179
179
if ( visibility_def = schema . directives [ GraphQL ::Stitching . visibility_directive ] )
180
180
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
536
536
@formatter . merge_descriptions ( strings_by_location , Formatter ::Info . new (
537
537
type_name : type_name ,
538
538
field_name : field_name ,
539
+ field_scopes : field_name ? @authorizations_by_type_and_field . dig ( type_name , field_name ) : nil ,
539
540
argument_name : argument_name ,
540
541
enum_value : enum_value ,
541
542
) )
@@ -761,11 +762,11 @@ def apply_supergraph_directives(schema, resolvers_by_type_name, locations_by_typ
761
762
schema_directives . each_value { |directive_class | schema . directive ( directive_class ) }
762
763
end
763
764
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?
766
767
767
768
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 ]
769
770
next if authorizations_by_field . nil? || !type . kind . fields?
770
771
771
772
type . fields . each_value do |field |
0 commit comments