Sha256: 8af7039aafec8418363d34c068f156fc1f24994b2336f2d34f0a1ea7e52e400c

Contents?: true

Size: 600 Bytes

Versions: 6

Compression:

Stored size: 600 Bytes

Contents

module Ecoportal
  module API
    class GraphQL
      module Base
        class LocationStructure < Ecoportal::API::GraphQL::Base::Model
          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

6 entries across 6 versions & 1 rubygems

Version Path
ecoportal-api-graphql-0.3.13 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.12 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.11 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.10 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.9 lib/ecoportal/api/graphql/base/location_structure.rb
ecoportal-api-graphql-0.3.8 lib/ecoportal/api/graphql/base/location_structure.rb