Class: GraphQL::Stitching::Resolver

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#argObject

Returns the value of attribute arg

Returns:

  • (Object)

    the current value of arg



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def arg
  @arg
end

#arg_type_nameObject

Returns the value of attribute arg_type_name

Returns:

  • (Object)

    the current value of arg_type_name



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def arg_type_name
  @arg_type_name
end

#fieldObject

Returns the value of attribute field

Returns:

  • (Object)

    the current value of field



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def field
  @field
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def key
  @key
end

#listObject Also known as: list?

Returns the value of attribute list

Returns:

  • (Object)

    the current value of list



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def list
  @list
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def location
  @location
end

#representationsObject Also known as: representations?

Returns the value of attribute representations

Returns:

  • (Object)

    the current value of representations



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def representations
  @representations
end

#type_nameObject

Returns the value of attribute type_name

Returns:

  • (Object)

    the current value of type_name



6
7
8
# File 'lib/graphql/stitching/resolver.rb', line 6

def type_name
  @type_name
end

Instance Method Details

#as_jsonObject



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