Commit 0447c882 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Rename non_archived to include_archived

This makes the argument easier to understand
parent f5da5e70
......@@ -9,10 +9,10 @@ module GroupIssuableResolver
default_value: false,
description: "Include #{issuable_collection_name} belonging to subgroups"
argument :non_archived, GraphQL::Types::Boolean,
argument :include_archived, GraphQL::Types::Boolean,
required: false,
default_value: true,
description: "Return #{issuable_collection_name} from non archived projects"
default_value: false,
description: "Return #{issuable_collection_name} from archived projects"
end
def resolve(**args)
......
......@@ -11473,6 +11473,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
| <a id="groupissuesepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. |
| <a id="groupissuesiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
| <a id="groupissuesiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
| <a id="groupissuesincludearchived"></a>`includeArchived` | [`Boolean`](#boolean) | Return issues from archived projects. |
| <a id="groupissuesincludesubepics"></a>`includeSubepics` | [`Boolean`](#boolean) | Whether to include subepics when filtering issues by epicId. |
| <a id="groupissuesincludesubgroups"></a>`includeSubgroups` | [`Boolean`](#boolean) | Include issues belonging to subgroups. |
| <a id="groupissuesiterationid"></a>`iterationId` | [`[ID]`](#id) | List of iteration Global IDs applied to the issue. |
......@@ -11481,7 +11482,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
| <a id="groupissuesmilestonetitle"></a>`milestoneTitle` | [`[String]`](#string) | Milestone applied to this issue. |
| <a id="groupissuesmilestonewildcardid"></a>`milestoneWildcardId` | [`MilestoneWildcardId`](#milestonewildcardid) | Filter issues by milestone ID wildcard. |
| <a id="groupissuesmyreactionemoji"></a>`myReactionEmoji` | [`String`](#string) | Filter by reaction emoji applied by the current user. Wildcard values "NONE" and "ANY" are supported. |
| <a id="groupissuesnonarchived"></a>`nonArchived` | [`Boolean`](#boolean) | Return issues from non archived projects. |
| <a id="groupissuesnot"></a>`not` | [`NegatedIssueFilterInput`](#negatedissuefilterinput) | Negated arguments. |
| <a id="groupissuessearch"></a>`search` | [`String`](#string) | Search query for title or description. |
| <a id="groupissuessort"></a>`sort` | [`IssueSort`](#issuesort) | Sort issues by this criteria. |
......@@ -11607,12 +11607,12 @@ four standard [pagination arguments](#connection-pagination-arguments):
| <a id="groupmergerequestscreatedbefore"></a>`createdBefore` | [`Time`](#time) | Merge requests created before this timestamp. |
| <a id="groupmergerequestsdraft"></a>`draft` | [`Boolean`](#boolean) | Limit result to draft merge requests. |
| <a id="groupmergerequestsiids"></a>`iids` | [`[String!]`](#string) | Array of IIDs of merge requests, for example `[1, 2]`. |
| <a id="groupmergerequestsincludearchived"></a>`includeArchived` | [`Boolean`](#boolean) | Return merge requests from archived projects. |
| <a id="groupmergerequestsincludesubgroups"></a>`includeSubgroups` | [`Boolean`](#boolean) | Include merge requests belonging to subgroups. |
| <a id="groupmergerequestslabels"></a>`labels` | [`[String!]`](#string) | Array of label names. All resolved merge requests will have all of these labels. |
| <a id="groupmergerequestsmergedafter"></a>`mergedAfter` | [`Time`](#time) | Merge requests merged after this date. |
| <a id="groupmergerequestsmergedbefore"></a>`mergedBefore` | [`Time`](#time) | Merge requests merged before this date. |
| <a id="groupmergerequestsmilestonetitle"></a>`milestoneTitle` | [`String`](#string) | Title of the milestone. |
| <a id="groupmergerequestsnonarchived"></a>`nonArchived` | [`Boolean`](#boolean) | Return merge requests from non archived projects. |
| <a id="groupmergerequestsnot"></a>`not` | [`MergeRequestsResolverNegatedParams`](#mergerequestsresolvernegatedparams) | List of negated arguments. Warning: this argument is experimental and a subject to change in future. |
| <a id="groupmergerequestssort"></a>`sort` | [`MergeRequestSort`](#mergerequestsort) | Sort merge requests by this criteria. |
| <a id="groupmergerequestssourcebranches"></a>`sourceBranches` | [`[String!]`](#string) | Array of source branch names. All resolved merge requests will have one of these branches as their source. |
......@@ -58,8 +58,8 @@ RSpec.describe 'getting an issue list for a group' do
expect(issues_ids).to contain_exactly(issue1_gid, issue2_gid)
end
context 'when non_archived is false' do
let(:issue_filter_params) { { non_archived: false } }
context 'when include_archived is true' do
let(:issue_filter_params) { { include_archived: true } }
it 'includes issues from archived projects' do
post_graphql(query, current_user: current_user)
......
......@@ -123,12 +123,12 @@ RSpec.describe 'Query.group.mergeRequests' do
end
end
describe 'passing non_archived: false' do
describe 'passing include_archived: true' do
let(:query) do
<<~GQL
query($path: ID!) {
group(fullPath: $path) {
mergeRequests(nonArchived: false) { nodes { id } }
mergeRequests(includeArchived: true) { nodes { id } }
}
}
GQL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment