Sha256: 837c82d735ca7b87a45c0a68309fc14072990b22cd0cfaf278d53232b7fb9a9a

Contents?: true

Size: 517 Bytes

Versions: 7

Compression:

Stored size: 517 Bytes

Contents

module Ecoportal
  module API
    class GraphQL
      module Model
        class LocationNode < Ecoportal::API::GraphQL::Base::LocationNode
          embeds_one :parent, klass: Model::LocationNode, nullable: true
          embeds_many :ancestors, klass: Model::LocationNode

          def parentId
            parent&.id
          end
          alias_method :parent_id, :parentId

          def parent_id_upcase
            parent_id&.upcase
          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/model/location_node.rb
ecoportal-api-graphql-0.4.2 lib/ecoportal/api/graphql/model/location_node.rb
ecoportal-api-graphql-0.4.1 lib/ecoportal/api/graphql/model/location_node.rb
ecoportal-api-graphql-0.4.0 lib/ecoportal/api/graphql/model/location_node.rb
ecoportal-api-graphql-0.3.16 lib/ecoportal/api/graphql/model/location_node.rb
ecoportal-api-graphql-0.3.15 lib/ecoportal/api/graphql/model/location_node.rb
ecoportal-api-graphql-0.3.14 lib/ecoportal/api/graphql/model/location_node.rb