Class: GraphQL::Stitching::TypeResolver::Key
- Inherits:
-
KeyFieldSet
- Object
- Array
- KeyFieldSet
- GraphQL::Stitching::TypeResolver::Key
- Defined in:
- lib/graphql/stitching/type_resolver/keys.rb
Instance Attribute Summary collapse
-
#locations ⇒ Object
readonly
Returns the value of attribute locations.
Instance Method Summary collapse
- #export_nodes ⇒ Object
-
#initialize(fields, locations: GraphQL::Stitching::EMPTY_ARRAY) ⇒ Key
constructor
A new instance of Key.
Methods inherited from KeyFieldSet
#==, #primitive_name, #to_definition
Constructor Details
#initialize(fields, locations: GraphQL::Stitching::EMPTY_ARRAY) ⇒ Key
Returns a new instance of Key.
68 69 70 71 72 73 74 |
# File 'lib/graphql/stitching/type_resolver/keys.rb', line 68 def initialize(fields, locations: GraphQL::Stitching::EMPTY_ARRAY) super(fields) @locations = locations to_definition export_nodes freeze end |
Instance Attribute Details
#locations ⇒ Object (readonly)
Returns the value of attribute locations.
66 67 68 |
# File 'lib/graphql/stitching/type_resolver/keys.rb', line 66 def locations @locations end |
Instance Method Details
#export_nodes ⇒ Object
76 77 78 79 80 81 82 |
# File 'lib/graphql/stitching/type_resolver/keys.rb', line 76 def export_nodes @export_nodes ||= begin nodes = map(&:export_node) nodes << TYPENAME_EXPORT_NODE nodes end end |