Class: GraphQL::StaticValidation::FieldsWillMerge::Field
- Inherits:
-
Object
- Object
- GraphQL::StaticValidation::FieldsWillMerge::Field
- Defined in:
- lib/graphql/static_validation/rules/fields_will_merge.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#owner_type ⇒ Object
readonly
Returns the value of attribute owner_type.
-
#parents ⇒ Object
readonly
Returns the value of attribute parents.
Instance Method Summary collapse
-
#initialize(node, definition, owner_type, parents) ⇒ Field
constructor
A new instance of Field.
-
#return_type ⇒ Object
-
#unwrapped_return_type ⇒ Object
Constructor Details
#initialize(node, definition, owner_type, parents) ⇒ Field
Returns a new instance of Field.
22 23 24 25 26 27 |
# File 'lib/graphql/static_validation/rules/fields_will_merge.rb', line 22 def initialize(node, definition, owner_type, parents) @node = node @definition = definition @owner_type = owner_type @parents = parents end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
20 21 22 |
# File 'lib/graphql/static_validation/rules/fields_will_merge.rb', line 20 def definition @definition end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
20 21 22 |
# File 'lib/graphql/static_validation/rules/fields_will_merge.rb', line 20 def node @node end |
#owner_type ⇒ Object (readonly)
Returns the value of attribute owner_type.
20 21 22 |
# File 'lib/graphql/static_validation/rules/fields_will_merge.rb', line 20 def owner_type @owner_type end |
#parents ⇒ Object (readonly)
Returns the value of attribute parents.
20 21 22 |
# File 'lib/graphql/static_validation/rules/fields_will_merge.rb', line 20 def parents @parents end |
Instance Method Details
#return_type ⇒ Object
29 30 31 |
# File 'lib/graphql/static_validation/rules/fields_will_merge.rb', line 29 def return_type @return_type ||= @definition&.type end |
#unwrapped_return_type ⇒ Object
33 34 35 |
# File 'lib/graphql/static_validation/rules/fields_will_merge.rb', line 33 def unwrapped_return_type @unwrapped_return_type ||= return_type&.unwrap end |