Class: GraphQL::Stitching::Resolver
- Inherits:
-
Struct
- Object
- Struct
- GraphQL::Stitching::Resolver
- Defined in:
- lib/graphql/stitching/resolver.rb
Overview
Defines a root resolver query that provides direct access to an entity type.
Instance Attribute Summary collapse
-
#arg ⇒ Object
Returns the value of attribute arg.
-
#arg_type_name ⇒ Object
Returns the value of attribute arg_type_name.
-
#field ⇒ Object
Returns the value of attribute field.
-
#key ⇒ Object
Returns the value of attribute key.
-
#list ⇒ Object
(also: #list?)
Returns the value of attribute list.
-
#location ⇒ Object
Returns the value of attribute location.
-
#representations ⇒ Object
(also: #representations?)
Returns the value of attribute representations.
-
#type_name ⇒ Object
Returns the value of attribute type_name.
Instance Method Summary collapse
Instance Attribute Details
#arg ⇒ Object
Returns the value of attribute arg
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def arg @arg end |
#arg_type_name ⇒ Object
Returns the value of attribute arg_type_name
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def arg_type_name @arg_type_name end |
#field ⇒ Object
Returns the value of attribute field
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def field @field end |
#key ⇒ Object
Returns the value of attribute key
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def key @key end |
#list ⇒ Object Also known as: list?
Returns the value of attribute list
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def list @list end |
#location ⇒ Object
Returns the value of attribute location
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def location @location end |
#representations ⇒ Object Also known as: representations?
Returns the value of attribute representations
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def representations @representations end |
#type_name ⇒ Object
Returns the value of attribute type_name
6 7 8 |
# File 'lib/graphql/stitching/resolver.rb', line 6 def type_name @type_name end |
Instance Method Details
#as_json ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/graphql/stitching/resolver.rb', line 35 def as_json { location: location, type_name: type_name, key: key, field: field, list: list, arg: arg, arg_type_name: arg_type_name, representations: representations, }.tap(&:compact!) end |