Sha256: 6521405991b95b07ad1ba112c656ef67cffce12de28b57f1b98150907929cfe7

Contents?: true

Size: 622 Bytes

Versions: 7

Compression:

Stored size: 622 Bytes

Contents

module Ecoportal
  module API
    class GraphQL
      module Base
        class LocationStructure < Ecoportal::API::GraphQL::Base::Model
          read_only!
          extend Ecoportal::API::GraphQL::Helpers::LocationsTree

          passkey :id
          passthrough :name, :weight
          passboolean :archived, :published, :visitorManagementEnabled
          embeds_one :updatedAt, klass: Base::DateTime
          embeds_many :nodes, klass: Base::LocationNode, order_key: :weight

          def treeify
            self.class.treeify(nodes)
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.4.3 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.4.2 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.4.1 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.4.0 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.16 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.15 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.14 lib/ecoportal/api/graphql/base/location_structure.rb