class GraphQL::StaticValidation::FieldsWillMerge::Field
Attributes
Public Class Methods
# File lib/graphql/static_validation/rules/fields_will_merge.rb, line 29 def initialize(node, definition, owner_type, parents) @node = node @definition = definition @owner_type = owner_type @parents = parents end
parents is only for the legacy check, see legacy_mutually_exclusive?
Public Instance Methods
Source
# File lib/graphql/static_validation/rules/fields_will_merge.rb, line 49 def comparison_key @comparison_key ||= [@node, scope] end
Source
# File lib/graphql/static_validation/rules/fields_will_merge.rb, line 41 def return_type @return_type ||= @definition&.type end
Source
# File lib/graphql/static_validation/rules/fields_will_merge.rb, line 37 def scope @parents || @owner_type end
The types which decide if this field is mutually exclusive with other fields
Source
# File lib/graphql/static_validation/rules/fields_will_merge.rb, line 45 def unwrapped_return_type @unwrapped_return_type ||= return_type&.unwrap end