lib/ecoportal/api/graphql/model/location_node.rb in ecoportal-api-graphql-0.3.13 vs lib/ecoportal/api/graphql/model/location_node.rb in ecoportal-api-graphql-0.3.14
- old
+ new
@@ -3,9 +3,18 @@
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