lib/ecoportal/api/graphql/model/organization.rb in ecoportal-api-graphql-0.1.8 vs lib/ecoportal/api/graphql/model/organization.rb in ecoportal-api-graphql-0.1.9

- old
+ new

@@ -4,64 +4,27 @@ module Model class Organization < Ecoportal::API::GraphQL::Base::Organization DEFAULT_PATH = ["currentOrganization"] class << self + extend Ecoportal::API::Common::GraphQL::QueryIntegration + def path(*add) DEFAULT_PATH.dup.push(*add) end - #userGroup, userGroups - - # @return [Collection::TagTree, Query::TagTrees] - def tagTrees(**kargs, &block) - if kargs.empty? && !block_given? - tagTreesQuery - else - tagTreesQuery.query(**kargs, &block) - end - end - - #tagTree - - #register, registers - #personMembers, attachablePersonMembers + query :tagTree, query_klass: "Ecoportal::API::GraphQL::Query::TagTree" + query :tagTrees, query_klass: "Ecoportal::API::GraphQL::Query::TagTrees" + query :contractorEntities, query_klass: "Ecoportal::API::GraphQL::Query::ContractorEntities" #contractorEntity, - - # @return [Connection::ContractorEntity, Query::ContractorEntities] - def contractorEntities(**kargs, &block) - if kargs.empty? && !block_given? - contractorEntitiesQuery - else - contractorEntitiesQuery.query(**kargs, &block) - end - end - - # @return [Connection::Action, Query::Actions] - def actions(**kargs, &block) - if kargs.empty? && !block_given? - actionsQuery - else - actionsQuery.query(**kargs, &block) - end - end - + query :actions, query_klass: "Ecoportal::API::GraphQL::Query::Actions" #action, actionsByPage, actionsCounter #actionCategories - private + #userGroup, userGroups - def tagTreesQuery - Ecoportal::API::GraphQL::Query::TagTrees.new(client, base_path: path) - end - - def contractorEntitiesQuery - Ecoportal::API::GraphQL::Query::ContractorEntities.new(client, base_path: path) - end - - def actionsQuery - Ecoportal::API::GraphQL::Query::Actions.new(client, base_path: path) - end + #register, registers + #personMembers, attachablePersonMembers end end end end end