Class: Activecube::Graphql::ResponseBuilder::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/activecube/graphql/response_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(row) ⇒ Response

Returns a new instance of Response.



8
9
10
# File 'lib/activecube/graphql/response_builder.rb', line 8

def initialize row
  @row = row
end

Instance Method Details

#__typenameObject

Raises:

  • (Activecube::InputArgumentError)


21
22
23
# File 'lib/activecube/graphql/response_builder.rb', line 21

def __typename
  raise Activecube::InputArgumentError, "Add __typename to the element for UNION or INTERFACE entity to resolve the type"
end

#convert_type(node_type, value) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/activecube/graphql/response_builder.rb', line 12

def convert_type node_type, value
  case node_type
      when 'Boolean' then
        value==1
      else
        value
  end
end