Sha256: 773ff99da5cb0ff735ec5f5c2887f57d931ca4dac3b19b61a2ed2942e66c14e8

Contents?: true

Size: 1.05 KB

Versions: 8

Compression:

Stored size: 1.05 KB

Contents

module Ecoportal
  module API
    class GraphQL
      module Query
        class LocationStructure < Ecoportal::API::GraphQL::Logic::Query
          accepted_params :id
          field_name :structure

          class_resolver :item_class, Ecoportal::API::GraphQL::Model::LocationStructure

          private

          def basic_block(&block)
            final_block = block || default_query_block
            Proc.new {
              query(id: :id!) {
                currentOrganization {
                  locations {
                    structure(id: :id, &final_block)
                  }
                }
              }
            }
          end

          def default_query_block
            Proc.new {
              id
              name
              archived
              weight
              visitorManagementEnabled
              nodes(includeArchived: true) {
                ___Ecoportal__API__GraphQL__Fragment__LocationNode
              }
            }
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.3.7 lib/ecoportal/api/graphql/query/location_structure.rb
ecoportal-api-graphql-0.3.6 lib/ecoportal/api/graphql/query/location_structure.rb
ecoportal-api-graphql-0.3.5 lib/ecoportal/api/graphql/query/location_structure.rb
ecoportal-api-graphql-0.3.3 lib/ecoportal/api/graphql/query/location_structure.rb
ecoportal-api-graphql-0.3.1 lib/ecoportal/api/graphql/query/location_structure.rb
ecoportal-api-graphql-0.2.3 lib/ecoportal/api/graphql/query/location_structure.rb
ecoportal-api-graphql-0.2.2 lib/ecoportal/api/graphql/query/location_structure.rb
ecoportal-api-graphql-0.2.1 lib/ecoportal/api/graphql/query/location_structure.rb