lib/ecoportal/api/graphql/query/location_structures.rb in ecoportal-api-graphql-0.3.8 vs lib/ecoportal/api/graphql/query/location_structures.rb in ecoportal-api-graphql-0.3.9

- old
+ new

@@ -1,21 +1,26 @@ module Ecoportal module API class GraphQL module Query class LocationStructures < Ecoportal::API::GraphQL::Logic::QueryArray - accepted_params :includeArchived, :includeUnpublished + 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 { - query(includeArchived: :boolean, includeUnpublished: :boolean) { + query(includeArchived: :boolean, + includeUnpublished: :boolean, + includeArchivedNodes: :boolean + ) { currentOrganization { locations { structures( includeArchived: :includeArchived, includeUnpublished: :includeUnpublished, @@ -35,10 +40,10 @@ id name archived weight visitorManagementEnabled - nodes(includeArchived: true) { + nodes(includeArchived: :includeArchivedNodes) { ___Ecoportal__API__GraphQL__Fragment__LocationNode } } end end