Class: GraphQL::Stitching::Boundary

Inherits:
Struct
  • Object
show all
Defined in:
lib/graphql/stitching/boundary.rb

Overview

Defines a boundary 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/boundary.rb', line 6

def arg
  @arg
end

#federationObject

Returns the value of attribute federation

Returns:

  • (Object)

    the current value of federation



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

def federation
  @federation
end

#fieldObject

Returns the value of attribute field

Returns:

  • (Object)

    the current value of field



6
7
8
# File 'lib/graphql/stitching/boundary.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/boundary.rb', line 6

def key
  @key
end

#listObject

Returns the value of attribute list

Returns:

  • (Object)

    the current value of list



6
7
8
# File 'lib/graphql/stitching/boundary.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/boundary.rb', line 6

def location
  @location
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/boundary.rb', line 6

def type_name
  @type_name
end

Instance Method Details

#as_jsonObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/graphql/stitching/boundary.rb', line 16

def as_json
  {
    location: location,
    type_name: type_name,
    key: key,
    field: field,
    arg: arg,
    list: list,
    federation: federation,
  }.tap(&:compact!)
end