lib/ecoportal/api/graphql/query/location_structures.rb in ecoportal-api-graphql-0.3.13 vs lib/ecoportal/api/graphql/query/location_structures.rb in ecoportal-api-graphql-0.3.14

- old
+ new

@@ -3,20 +3,20 @@ class GraphQL module Query class LocationStructures < Ecoportal::API::GraphQL::Logic::QueryArray accepted_params :includeArchived, :includeUnpublished, default: false accepted_params :includeArchivedNodes, default: true - + field_name :structures class_resolver :item_class, Ecoportal::API::GraphQL::Model::LocationStructure private def basic_block(&block) final_block = block || default_query_block - Proc.new { + proc { query(includeArchived: :boolean, includeUnpublished: :boolean, includeArchivedNodes: :boolean ) { currentOrganization { @@ -34,10 +34,10 @@ # At the moment it always retrieves archived nodes!! # @note this is on purpose, as via API # there isn't much sense in not including archived nodes. def default_query_block - Proc.new { + proc { id name archived weight visitorManagementEnabled