Class: Ecoportal::API::GraphQL::Builder::LocationStructure

Inherits:
Object
  • Object
show all
Defined in:
lib/ecoportal/api/graphql/builder/location_structure.rb,
lib/ecoportal/api/graphql/builder/location_structure/draft.rb

Defined Under Namespace

Classes: Draft

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ LocationStructure

Returns a new instance of LocationStructure.



8
9
10
# File 'lib/ecoportal/api/graphql/builder/location_structure.rb', line 8

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/ecoportal/api/graphql/builder/location_structure.rb', line 6

def client
  @client
end

Instance Method Details

#applyCommands(**kargs, &block) ⇒ Object



21
22
23
# File 'lib/ecoportal/api/graphql/builder/location_structure.rb', line 21

def applyCommands(**kargs, &block)
  applyCommandsMutation.query(**kargs, &block)
end

#applyCommandsInputObject



17
18
19
# File 'lib/ecoportal/api/graphql/builder/location_structure.rb', line 17

def applyCommandsInput
  Input::LocationStructure::ApplyCommands.new
end

#draftObject



25
26
27
# File 'lib/ecoportal/api/graphql/builder/location_structure.rb', line 25

def draft
  LocationStructure::Draft.new(client, parent: self)
end

#nodeClassifications(**kargs, &block) ⇒ Object



12
13
14
15
# File 'lib/ecoportal/api/graphql/builder/location_structure.rb', line 12

def nodeClassifications(**kargs, &block)
  query_model = Query::LocationClassifications.new(client)
  query_model.query(**kargs, &block)
end