Expose active
parameter to the Projects GQL API
Expose the active
parameter added in #525631 (closed) to the Projects GQL API
Implementation Guide
After #525631 (closed) has been completed.
- In
app/graphql/resolvers/projects_resolver.rb
, addactive
as a new supported boolean argument.
argument :active, GraphQL::Types::Boolean,
required: false,
description: "Filters by projects that are not archived. For Premium or Ultimate, projects that are marked for deletion are also filtered."
- Ensure that the
active
argument gets passed to the ProjectFinder in updating finder_params
def finder_params(args)
{
**project_finder_params(args),
with_issues_enabled: args[:with_issues_enabled],
with_merge_requests_enabled: args[:with_merge_requests_enabled],
full_paths: args[:full_paths],
archived: args[:archived],
min_access_level: args[:min_access_level],
language_name: args[:programming_language_name],
trending: args[:trending],
not_aimed_for_deletion: args[:not_aimed_for_deletion],
+ active: args[:active],
current_organization: ::Current.organization
}
end
- Run
bundle exec rake gitlab:graphql:compile_docs
to update the documentation. - Add the appropriate specs.
Edited by Shane Maglangit