Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dad47460
Commit
dad47460
authored
Jul 20, 2021
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert old graphql types to newer types
in prep for interpreter
parent
fed6566c
Changes
64
Hide whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
139 additions
and
177 deletions
+139
-177
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-39
app/graphql/resolvers/alert_management/alert_resolver.rb
app/graphql/resolvers/alert_management/alert_resolver.rb
+3
-3
app/graphql/resolvers/alert_management/alert_status_counts_resolver.rb
...esolvers/alert_management/alert_status_counts_resolver.rb
+2
-2
app/graphql/resolvers/blobs_resolver.rb
app/graphql/resolvers/blobs_resolver.rb
+2
-2
app/graphql/resolvers/ci/config_resolver.rb
app/graphql/resolvers/ci/config_resolver.rb
+4
-4
app/graphql/resolvers/ci/runner_setup_resolver.rb
app/graphql/resolvers/ci/runner_setup_resolver.rb
+2
-2
app/graphql/resolvers/ci/runners_resolver.rb
app/graphql/resolvers/ci/runners_resolver.rb
+2
-2
app/graphql/resolvers/ci/template_resolver.rb
app/graphql/resolvers/ci/template_resolver.rb
+1
-1
app/graphql/resolvers/ci/test_suite_resolver.rb
app/graphql/resolvers/ci/test_suite_resolver.rb
+1
-1
app/graphql/resolvers/concerns/group_issuable_resolver.rb
app/graphql/resolvers/concerns/group_issuable_resolver.rb
+1
-1
app/graphql/resolvers/concerns/issue_resolver_arguments.rb
app/graphql/resolvers/concerns/issue_resolver_arguments.rb
+9
-9
app/graphql/resolvers/concerns/resolves_pipelines.rb
app/graphql/resolvers/concerns/resolves_pipelines.rb
+2
-2
app/graphql/resolvers/container_repositories_resolver.rb
app/graphql/resolvers/container_repositories_resolver.rb
+1
-1
app/graphql/resolvers/design_management/design_resolver.rb
app/graphql/resolvers/design_management/design_resolver.rb
+1
-1
app/graphql/resolvers/design_management/designs_resolver.rb
app/graphql/resolvers/design_management/designs_resolver.rb
+1
-1
app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
...s/design_management/version/design_at_version_resolver.rb
+1
-1
app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
.../design_management/version/designs_at_version_resolver.rb
+1
-1
app/graphql/resolvers/design_management/version_in_collection_resolver.rb
...lvers/design_management/version_in_collection_resolver.rb
+1
-1
app/graphql/resolvers/design_management/versions_resolver.rb
app/graphql/resolvers/design_management/versions_resolver.rb
+1
-1
app/graphql/resolvers/echo_resolver.rb
app/graphql/resolvers/echo_resolver.rb
+2
-2
app/graphql/resolvers/environments_resolver.rb
app/graphql/resolvers/environments_resolver.rb
+3
-3
app/graphql/resolvers/error_tracking/sentry_errors_resolver.rb
...raphql/resolvers/error_tracking/sentry_errors_resolver.rb
+2
-2
app/graphql/resolvers/full_path_resolver.rb
app/graphql/resolvers/full_path_resolver.rb
+1
-1
app/graphql/resolvers/group_labels_resolver.rb
app/graphql/resolvers/group_labels_resolver.rb
+2
-2
app/graphql/resolvers/group_milestones_resolver.rb
app/graphql/resolvers/group_milestones_resolver.rb
+2
-2
app/graphql/resolvers/labels_resolver.rb
app/graphql/resolvers/labels_resolver.rb
+2
-2
app/graphql/resolvers/members_resolver.rb
app/graphql/resolvers/members_resolver.rb
+1
-1
app/graphql/resolvers/merge_request_resolver.rb
app/graphql/resolvers/merge_request_resolver.rb
+1
-1
app/graphql/resolvers/merge_requests_resolver.rb
app/graphql/resolvers/merge_requests_resolver.rb
+10
-10
app/graphql/resolvers/metrics/dashboard_resolver.rb
app/graphql/resolvers/metrics/dashboard_resolver.rb
+1
-1
app/graphql/resolvers/milestones_resolver.rb
app/graphql/resolvers/milestones_resolver.rb
+3
-3
app/graphql/resolvers/namespace_projects_resolver.rb
app/graphql/resolvers/namespace_projects_resolver.rb
+3
-3
app/graphql/resolvers/packages_base_resolver.rb
app/graphql/resolvers/packages_base_resolver.rb
+2
-2
app/graphql/resolvers/project_milestones_resolver.rb
app/graphql/resolvers/project_milestones_resolver.rb
+1
-1
app/graphql/resolvers/project_pipeline_resolver.rb
app/graphql/resolvers/project_pipeline_resolver.rb
+2
-2
app/graphql/resolvers/projects/jira_projects_resolver.rb
app/graphql/resolvers/projects/jira_projects_resolver.rb
+1
-1
app/graphql/resolvers/projects/services_resolver.rb
app/graphql/resolvers/projects/services_resolver.rb
+1
-1
app/graphql/resolvers/projects_resolver.rb
app/graphql/resolvers/projects_resolver.rb
+6
-6
app/graphql/resolvers/release_resolver.rb
app/graphql/resolvers/release_resolver.rb
+1
-1
app/graphql/resolvers/repository_branch_names_resolver.rb
app/graphql/resolvers/repository_branch_names_resolver.rb
+4
-4
app/graphql/resolvers/snippets/blobs_resolver.rb
app/graphql/resolvers/snippets/blobs_resolver.rb
+1
-1
app/graphql/resolvers/snippets_resolver.rb
app/graphql/resolvers/snippets_resolver.rb
+1
-1
app/graphql/resolvers/terraform/states_resolver.rb
app/graphql/resolvers/terraform/states_resolver.rb
+1
-1
app/graphql/resolvers/todo_resolver.rb
app/graphql/resolvers/todo_resolver.rb
+3
-3
app/graphql/resolvers/tree_resolver.rb
app/graphql/resolvers/tree_resolver.rb
+3
-3
app/graphql/resolvers/user_discussions_count_resolver.rb
app/graphql/resolvers/user_discussions_count_resolver.rb
+1
-1
app/graphql/resolvers/user_merge_requests_resolver_base.rb
app/graphql/resolvers/user_merge_requests_resolver_base.rb
+1
-1
app/graphql/resolvers/user_notes_count_resolver.rb
app/graphql/resolvers/user_notes_count_resolver.rb
+1
-1
app/graphql/resolvers/user_resolver.rb
app/graphql/resolvers/user_resolver.rb
+1
-1
app/graphql/resolvers/user_starred_projects_resolver.rb
app/graphql/resolvers/user_starred_projects_resolver.rb
+1
-1
app/graphql/resolvers/users/group_count_resolver.rb
app/graphql/resolvers/users/group_count_resolver.rb
+1
-1
app/graphql/resolvers/users_resolver.rb
app/graphql/resolvers/users_resolver.rb
+4
-4
ee/spec/graphql/resolvers/user_discussions_count_resolver_spec.rb
...graphql/resolvers/user_discussions_count_resolver_spec.rb
+1
-1
ee/spec/graphql/resolvers/user_notes_count_resolver_spec.rb
ee/spec/graphql/resolvers/user_notes_count_resolver_spec.rb
+1
-1
spec/graphql/resolvers/base_resolver_spec.rb
spec/graphql/resolvers/base_resolver_spec.rb
+19
-19
spec/graphql/resolvers/concerns/caching_array_resolver_spec.rb
...graphql/resolvers/concerns/caching_array_resolver_spec.rb
+2
-2
spec/graphql/resolvers/concerns/resolves_pipelines_spec.rb
spec/graphql/resolvers/concerns/resolves_pipelines_spec.rb
+1
-1
spec/graphql/resolvers/echo_resolver_spec.rb
spec/graphql/resolvers/echo_resolver_spec.rb
+1
-1
spec/graphql/resolvers/issues_resolver_spec.rb
spec/graphql/resolvers/issues_resolver_spec.rb
+1
-1
spec/graphql/resolvers/namespace_projects_resolver_spec.rb
spec/graphql/resolvers/namespace_projects_resolver_spec.rb
+1
-1
spec/graphql/resolvers/project_resolver_spec.rb
spec/graphql/resolvers/project_resolver_spec.rb
+2
-2
spec/graphql/resolvers/terraform/states_resolver_spec.rb
spec/graphql/resolvers/terraform/states_resolver_spec.rb
+2
-1
spec/graphql/resolvers/user_discussions_count_resolver_spec.rb
...graphql/resolvers/user_discussions_count_resolver_spec.rb
+1
-1
spec/graphql/resolvers/user_notes_count_resolver_spec.rb
spec/graphql/resolvers/user_notes_count_resolver_spec.rb
+1
-1
No files found.
.rubocop_manual_todo.yml
View file @
dad47460
...
@@ -90,45 +90,6 @@ Graphql/OldTypes:
...
@@ -90,45 +90,6 @@ Graphql/OldTypes:
-
'
app/graphql/mutations/snippets/create.rb'
-
'
app/graphql/mutations/snippets/create.rb'
-
'
app/graphql/mutations/snippets/update.rb'
-
'
app/graphql/mutations/snippets/update.rb'
-
'
app/graphql/mutations/user_callouts/create.rb'
-
'
app/graphql/mutations/user_callouts/create.rb'
-
'
app/graphql/resolvers/alert_management/alert_resolver.rb'
-
'
app/graphql/resolvers/alert_management/alert_status_counts_resolver.rb'
-
'
app/graphql/resolvers/blobs_resolver.rb'
-
'
app/graphql/resolvers/ci/config_resolver.rb'
-
'
app/graphql/resolvers/ci/runners_resolver.rb'
-
'
app/graphql/resolvers/ci/template_resolver.rb'
-
'
app/graphql/resolvers/concerns/group_issuable_resolver.rb'
-
'
app/graphql/resolvers/concerns/issue_resolver_arguments.rb'
-
'
app/graphql/resolvers/concerns/resolves_pipelines.rb'
-
'
app/graphql/resolvers/container_repositories_resolver.rb'
-
'
app/graphql/resolvers/design_management/design_resolver.rb'
-
'
app/graphql/resolvers/design_management/version/design_at_version_resolver.rb'
-
'
app/graphql/resolvers/design_management/version_in_collection_resolver.rb'
-
'
app/graphql/resolvers/design_management/versions_resolver.rb'
-
'
app/graphql/resolvers/environments_resolver.rb'
-
'
app/graphql/resolvers/full_path_resolver.rb'
-
'
app/graphql/resolvers/group_labels_resolver.rb'
-
'
app/graphql/resolvers/group_milestones_resolver.rb'
-
'
app/graphql/resolvers/labels_resolver.rb'
-
'
app/graphql/resolvers/members_resolver.rb'
-
'
app/graphql/resolvers/merge_request_resolver.rb'
-
'
app/graphql/resolvers/merge_requests_resolver.rb'
-
'
app/graphql/resolvers/metrics/dashboard_resolver.rb'
-
'
app/graphql/resolvers/milestones_resolver.rb'
-
'
app/graphql/resolvers/namespace_projects_resolver.rb'
-
'
app/graphql/resolvers/packages_base_resolver.rb'
-
'
app/graphql/resolvers/project_milestones_resolver.rb'
-
'
app/graphql/resolvers/project_pipeline_resolver.rb'
-
'
app/graphql/resolvers/projects/jira_projects_resolver.rb'
-
'
app/graphql/resolvers/projects/services_resolver.rb'
-
'
app/graphql/resolvers/projects_resolver.rb'
-
'
app/graphql/resolvers/release_resolver.rb'
-
'
app/graphql/resolvers/repository_branch_names_resolver.rb'
-
'
app/graphql/resolvers/snippets_resolver.rb'
-
'
app/graphql/resolvers/terraform/states_resolver.rb'
-
'
app/graphql/resolvers/tree_resolver.rb'
-
'
app/graphql/resolvers/user_resolver.rb'
-
'
app/graphql/resolvers/user_starred_projects_resolver.rb'
-
'
app/graphql/resolvers/users_resolver.rb'
-
'
app/graphql/types/access_level_type.rb'
-
'
app/graphql/types/access_level_type.rb'
-
'
app/graphql/types/admin/analytics/usage_trends/measurement_type.rb'
-
'
app/graphql/types/admin/analytics/usage_trends/measurement_type.rb'
-
'
app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb'
-
'
app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb'
...
...
app/graphql/resolvers/alert_management/alert_resolver.rb
View file @
dad47460
...
@@ -5,7 +5,7 @@ module Resolvers
...
@@ -5,7 +5,7 @@ module Resolvers
class
AlertResolver
<
BaseResolver
class
AlertResolver
<
BaseResolver
include
LooksAhead
include
LooksAhead
argument
:iid
,
GraphQL
::
STRING_TYPE
,
argument
:iid
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'IID of the alert. For example, "1".'
description:
'IID of the alert. For example, "1".'
...
@@ -23,11 +23,11 @@ module Resolvers
...
@@ -23,11 +23,11 @@ module Resolvers
required:
true
,
required:
true
,
default_value:
'operations'
default_value:
'operations'
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
description:
'Search query for title, description, service, or monitoring_tool.'
,
description:
'Search query for title, description, service, or monitoring_tool.'
,
required:
false
required:
false
argument
:assignee_username
,
GraphQL
::
STRING_TYPE
,
argument
:assignee_username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of a user assigned to the issue.'
description:
'Username of a user assigned to the issue.'
...
...
app/graphql/resolvers/alert_management/alert_status_counts_resolver.rb
View file @
dad47460
...
@@ -5,11 +5,11 @@ module Resolvers
...
@@ -5,11 +5,11 @@ module Resolvers
class
AlertStatusCountsResolver
<
BaseResolver
class
AlertStatusCountsResolver
<
BaseResolver
type
Types
::
AlertManagement
::
AlertStatusCountsType
,
null:
true
type
Types
::
AlertManagement
::
AlertStatusCountsType
,
null:
true
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
description:
'Search query for title, description, service, or monitoring_tool.'
,
description:
'Search query for title, description, service, or monitoring_tool.'
,
required:
false
required:
false
argument
:assignee_username
,
GraphQL
::
STRING_TYPE
,
argument
:assignee_username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of a user assigned to the issue.'
description:
'Username of a user assigned to the issue.'
...
...
app/graphql/resolvers/blobs_resolver.rb
View file @
dad47460
...
@@ -10,10 +10,10 @@ module Resolvers
...
@@ -10,10 +10,10 @@ module Resolvers
alias_method
:repository
,
:object
alias_method
:repository
,
:object
argument
:paths
,
[
GraphQL
::
STRING_TYPE
],
argument
:paths
,
[
GraphQL
::
Types
::
String
],
required:
true
,
required:
true
,
description:
'Array of desired blob paths.'
description:
'Array of desired blob paths.'
argument
:ref
,
GraphQL
::
STRING_TYPE
,
argument
:ref
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
default_value:
nil
,
default_value:
nil
,
description:
'The commit ref to get the blobs from. Default value is HEAD.'
description:
'The commit ref to get the blobs from. Default value is HEAD.'
...
...
app/graphql/resolvers/ci/config_resolver.rb
View file @
dad47460
...
@@ -14,19 +14,19 @@ module Resolvers
...
@@ -14,19 +14,19 @@ module Resolvers
authorize
:read_pipeline
authorize
:read_pipeline
argument
:project_path
,
GraphQL
::
ID_TYPE
,
argument
:project_path
,
GraphQL
::
Types
::
ID
,
required:
true
,
required:
true
,
description:
'The project of the CI config.'
description:
'The project of the CI config.'
argument
:sha
,
GraphQL
::
STRING_TYPE
,
argument
:sha
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
"Sha for the pipeline."
description:
"Sha for the pipeline."
argument
:content
,
GraphQL
::
STRING_TYPE
,
argument
:content
,
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
"Contents of `.gitlab-ci.yml`."
description:
"Contents of `.gitlab-ci.yml`."
argument
:dry_run
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:dry_run
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Run pipeline creation simulation, or only do static check.'
description:
'Run pipeline creation simulation, or only do static check.'
...
...
app/graphql/resolvers/ci/runner_setup_resolver.rb
View file @
dad47460
...
@@ -9,12 +9,12 @@ module Resolvers
...
@@ -9,12 +9,12 @@ module Resolvers
description
'Runner setup instructions.'
description
'Runner setup instructions.'
argument
:platform
,
argument
:platform
,
type:
GraphQL
::
STRING_TYPE
,
type:
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
'Platform to generate the instructions for.'
description:
'Platform to generate the instructions for.'
argument
:architecture
,
argument
:architecture
,
type:
GraphQL
::
STRING_TYPE
,
type:
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
'Architecture to generate the instructions for.'
description:
'Architecture to generate the instructions for.'
...
...
app/graphql/resolvers/ci/runners_resolver.rb
View file @
dad47460
...
@@ -15,11 +15,11 @@ module Resolvers
...
@@ -15,11 +15,11 @@ module Resolvers
required:
false
,
required:
false
,
description:
'Filter runners by type.'
description:
'Filter runners by type.'
argument
:tag_list
,
[
GraphQL
::
STRING_TYPE
],
argument
:tag_list
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'Filter by tags associated with the runner (comma-separated or array).'
description:
'Filter by tags associated with the runner (comma-separated or array).'
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Filter by full token or partial text in description field.'
description:
'Filter by full token or partial text in description field.'
...
...
app/graphql/resolvers/ci/template_resolver.rb
View file @
dad47460
...
@@ -5,7 +5,7 @@ module Resolvers
...
@@ -5,7 +5,7 @@ module Resolvers
class
TemplateResolver
<
BaseResolver
class
TemplateResolver
<
BaseResolver
type
Types
::
Ci
::
TemplateType
,
null:
true
type
Types
::
Ci
::
TemplateType
,
null:
true
argument
:name
,
GraphQL
::
STRING_TYPE
,
required:
true
,
argument
:name
,
GraphQL
::
Types
::
String
,
required:
true
,
description:
'Name of the CI/CD template to search for. Template must be formatted as `Name.gitlab-ci.yml`.'
description:
'Name of the CI/CD template to search for. Template must be formatted as `Name.gitlab-ci.yml`.'
alias_method
:project
,
:object
alias_method
:project
,
:object
...
...
app/graphql/resolvers/ci/test_suite_resolver.rb
View file @
dad47460
...
@@ -11,7 +11,7 @@ module Resolvers
...
@@ -11,7 +11,7 @@ module Resolvers
alias_method
:pipeline
,
:object
alias_method
:pipeline
,
:object
argument
:build_ids
,
[
GraphQL
::
ID_TYPE
],
argument
:build_ids
,
[
GraphQL
::
Types
::
ID
],
required:
true
,
required:
true
,
description:
'IDs of the builds used to run the test suite.'
description:
'IDs of the builds used to run the test suite.'
...
...
app/graphql/resolvers/concerns/group_issuable_resolver.rb
View file @
dad47460
...
@@ -5,7 +5,7 @@ module GroupIssuableResolver
...
@@ -5,7 +5,7 @@ module GroupIssuableResolver
class_methods
do
class_methods
do
def
include_subgroups
(
name_of_things
)
def
include_subgroups
(
name_of_things
)
argument
:include_subgroups
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_subgroups
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
default_value:
false
,
default_value:
false
,
description:
"Include
#{
name_of_things
}
belonging to subgroups"
description:
"Include
#{
name_of_things
}
belonging to subgroups"
...
...
app/graphql/resolvers/concerns/issue_resolver_arguments.rb
View file @
dad47460
...
@@ -6,29 +6,29 @@ module IssueResolverArguments
...
@@ -6,29 +6,29 @@ module IssueResolverArguments
prepended
do
prepended
do
include
LooksAhead
include
LooksAhead
argument
:iid
,
GraphQL
::
STRING_TYPE
,
argument
:iid
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'IID of the issue. For example, "1".'
description:
'IID of the issue. For example, "1".'
argument
:iids
,
[
GraphQL
::
STRING_TYPE
],
argument
:iids
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'List of IIDs of issues. For example, `["1", "2"]`.'
description:
'List of IIDs of issues. For example, `["1", "2"]`.'
argument
:label_name
,
[
GraphQL
::
STRING_TYPE
,
null:
true
],
argument
:label_name
,
[
GraphQL
::
Types
::
String
,
null:
true
],
required:
false
,
required:
false
,
description:
'Labels applied to this issue.'
description:
'Labels applied to this issue.'
argument
:milestone_title
,
[
GraphQL
::
STRING_TYPE
,
null:
true
],
argument
:milestone_title
,
[
GraphQL
::
Types
::
String
,
null:
true
],
required:
false
,
required:
false
,
description:
'Milestone applied to this issue.'
description:
'Milestone applied to this issue.'
argument
:author_username
,
GraphQL
::
STRING_TYPE
,
argument
:author_username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of the author of the issue.'
description:
'Username of the author of the issue.'
argument
:assignee_username
,
GraphQL
::
STRING_TYPE
,
argument
:assignee_username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of a user assigned to the issue.'
,
description:
'Username of a user assigned to the issue.'
,
deprecated:
{
reason:
'Use `assigneeUsernames`'
,
milestone:
'13.11'
}
deprecated:
{
reason:
'Use `assigneeUsernames`'
,
milestone:
'13.11'
}
argument
:assignee_usernames
,
[
GraphQL
::
STRING_TYPE
],
argument
:assignee_usernames
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'Usernames of users assigned to the issue.'
description:
'Usernames of users assigned to the issue.'
argument
:assignee_id
,
GraphQL
::
STRING_TYPE
,
argument
:assignee_id
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'ID of a user assigned to the issues, "none" and "any" values are supported.'
description:
'ID of a user assigned to the issues, "none" and "any" values are supported.'
argument
:created_before
,
Types
::
TimeType
,
argument
:created_before
,
Types
::
TimeType
,
...
@@ -49,7 +49,7 @@ module IssueResolverArguments
...
@@ -49,7 +49,7 @@ module IssueResolverArguments
argument
:closed_after
,
Types
::
TimeType
,
argument
:closed_after
,
Types
::
TimeType
,
required:
false
,
required:
false
,
description:
'Issues closed after this date.'
description:
'Issues closed after this date.'
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Search query for issue title or description.'
description:
'Search query for issue title or description.'
argument
:types
,
[
Types
::
IssueTypeEnum
],
argument
:types
,
[
Types
::
IssueTypeEnum
],
...
...
app/graphql/resolvers/concerns/resolves_pipelines.rb
View file @
dad47460
...
@@ -10,11 +10,11 @@ module ResolvesPipelines
...
@@ -10,11 +10,11 @@ module ResolvesPipelines
required:
false
,
required:
false
,
description:
"Filter pipelines by their status."
description:
"Filter pipelines by their status."
argument
:ref
,
argument
:ref
,
GraphQL
::
STRING_TYPE
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
"Filter pipelines by the ref they are run for."
description:
"Filter pipelines by the ref they are run for."
argument
:sha
,
argument
:sha
,
GraphQL
::
STRING_TYPE
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
"Filter pipelines by the sha of the commit they are run for."
description:
"Filter pipelines by the sha of the commit they are run for."
end
end
...
...
app/graphql/resolvers/container_repositories_resolver.rb
View file @
dad47460
...
@@ -6,7 +6,7 @@ module Resolvers
...
@@ -6,7 +6,7 @@ module Resolvers
type
Types
::
ContainerRepositoryType
,
null:
true
type
Types
::
ContainerRepositoryType
,
null:
true
argument
:name
,
GraphQL
::
STRING_TYPE
,
argument
:name
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Filter the container repositories by their name.'
description:
'Filter the container repositories by their name.'
...
...
app/graphql/resolvers/design_management/design_resolver.rb
View file @
dad47460
...
@@ -11,7 +11,7 @@ module Resolvers
...
@@ -11,7 +11,7 @@ module Resolvers
required:
false
,
required:
false
,
description:
'Find a design by its ID.'
description:
'Find a design by its ID.'
argument
:filename
,
GraphQL
::
STRING_TYPE
,
argument
:filename
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Find a design by its filename.'
description:
'Find a design by its filename.'
...
...
app/graphql/resolvers/design_management/designs_resolver.rb
View file @
dad47460
...
@@ -11,7 +11,7 @@ module Resolvers
...
@@ -11,7 +11,7 @@ module Resolvers
argument
:ids
,
[
DesignID
],
argument
:ids
,
[
DesignID
],
required:
false
,
required:
false
,
description:
'Filters designs by their ID.'
description:
'Filters designs by their ID.'
argument
:filenames
,
[
GraphQL
::
STRING_TYPE
],
argument
:filenames
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'Filters designs by their filename.'
description:
'Filters designs by their filename.'
argument
:at_version
,
VersionID
,
argument
:at_version
,
VersionID
,
...
...
app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
View file @
dad47460
...
@@ -23,7 +23,7 @@ module Resolvers
...
@@ -23,7 +23,7 @@ module Resolvers
argument
:design_id
,
DesignID
,
argument
:design_id
,
DesignID
,
required:
false
,
required:
false
,
description:
'The ID of a specific design.'
description:
'The ID of a specific design.'
argument
:filename
,
GraphQL
::
STRING_TYPE
,
argument
:filename
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'The filename of a specific design.'
description:
'The filename of a specific design.'
...
...
app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
View file @
dad47460
...
@@ -17,7 +17,7 @@ module Resolvers
...
@@ -17,7 +17,7 @@ module Resolvers
required:
false
,
required:
false
,
description:
'Filters designs by their ID.'
description:
'Filters designs by their ID.'
argument
:filenames
,
argument
:filenames
,
[
GraphQL
::
STRING_TYPE
],
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'Filters designs by their filename.'
description:
'Filters designs by their filename.'
...
...
app/graphql/resolvers/design_management/version_in_collection_resolver.rb
View file @
dad47460
...
@@ -15,7 +15,7 @@ module Resolvers
...
@@ -15,7 +15,7 @@ module Resolvers
VersionID
=
::
Types
::
GlobalIDType
[
::
DesignManagement
::
Version
]
VersionID
=
::
Types
::
GlobalIDType
[
::
DesignManagement
::
Version
]
argument
:sha
,
GraphQL
::
STRING_TYPE
,
argument
:sha
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
"The SHA256 of a specific version."
description:
"The SHA256 of a specific version."
argument
:id
,
VersionID
,
argument
:id
,
VersionID
,
...
...
app/graphql/resolvers/design_management/versions_resolver.rb
View file @
dad47460
...
@@ -11,7 +11,7 @@ module Resolvers
...
@@ -11,7 +11,7 @@ module Resolvers
extras
[
:parent
]
extras
[
:parent
]
argument
:earlier_or_equal_to_sha
,
GraphQL
::
STRING_TYPE
,
argument
:earlier_or_equal_to_sha
,
GraphQL
::
Types
::
String
,
as: :sha
,
as: :sha
,
required:
false
,
required:
false
,
description:
'The SHA256 of the most recent acceptable version.'
description:
'The SHA256 of the most recent acceptable version.'
...
...
app/graphql/resolvers/echo_resolver.rb
View file @
dad47460
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
module
Resolvers
module
Resolvers
class
EchoResolver
<
BaseResolver
class
EchoResolver
<
BaseResolver
type
::
GraphQL
::
STRING_TYPE
,
null:
false
type
::
GraphQL
::
Types
::
String
,
null:
false
description
'Testing endpoint to validate the API with'
description
'Testing endpoint to validate the API with'
argument
:text
,
argument
:text
,
type:
GraphQL
::
STRING_TYPE
,
type:
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
'Text to echo back.'
description:
'Text to echo back.'
...
...
app/graphql/resolvers/environments_resolver.rb
View file @
dad47460
...
@@ -2,15 +2,15 @@
...
@@ -2,15 +2,15 @@
module
Resolvers
module
Resolvers
class
EnvironmentsResolver
<
BaseResolver
class
EnvironmentsResolver
<
BaseResolver
argument
:name
,
GraphQL
::
STRING_TYPE
,
argument
:name
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Name of the environment.'
description:
'Name of the environment.'
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Search query for environment name.'
description:
'Search query for environment name.'
argument
:states
,
[
GraphQL
::
STRING_TYPE
],
argument
:states
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'States of environments that should be included in result.'
description:
'States of environments that should be included in result.'
...
...
app/graphql/resolvers/error_tracking/sentry_errors_resolver.rb
View file @
dad47460
...
@@ -6,12 +6,12 @@ module Resolvers
...
@@ -6,12 +6,12 @@ module Resolvers
type
Types
::
ErrorTracking
::
SentryErrorType
.
connection_type
,
null:
true
type
Types
::
ErrorTracking
::
SentryErrorType
.
connection_type
,
null:
true
extension
Gitlab
::
Graphql
::
Extensions
::
ExternallyPaginatedArrayExtension
extension
Gitlab
::
Graphql
::
Extensions
::
ExternallyPaginatedArrayExtension
argument
:search_term
,
::
GraphQL
::
STRING_TYPE
,
argument
:search_term
,
::
GraphQL
::
Types
::
String
,
description:
'Search query for the Sentry error details.'
,
description:
'Search query for the Sentry error details.'
,
required:
false
required:
false
# TODO: convert to Enum
# TODO: convert to Enum
argument
:sort
,
::
GraphQL
::
STRING_TYPE
,
argument
:sort
,
::
GraphQL
::
Types
::
String
,
description:
'Attribute to sort on. Options are frequency, first_seen, last_seen. last_seen is default.'
,
description:
'Attribute to sort on. Options are frequency, first_seen, last_seen. last_seen is default.'
,
required:
false
required:
false
...
...
app/graphql/resolvers/full_path_resolver.rb
View file @
dad47460
...
@@ -5,7 +5,7 @@ module Resolvers
...
@@ -5,7 +5,7 @@ module Resolvers
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
prepended
do
prepended
do
argument
:full_path
,
GraphQL
::
ID_TYPE
,
argument
:full_path
,
GraphQL
::
Types
::
ID
,
required:
true
,
required:
true
,
description:
'The full path of the project, group or namespace, e.g., `gitlab-org/gitlab-foss`.'
description:
'The full path of the project, group or namespace, e.g., `gitlab-org/gitlab-foss`.'
end
end
...
...
app/graphql/resolvers/group_labels_resolver.rb
View file @
dad47460
...
@@ -4,12 +4,12 @@ module Resolvers
...
@@ -4,12 +4,12 @@ module Resolvers
class
GroupLabelsResolver
<
LabelsResolver
class
GroupLabelsResolver
<
LabelsResolver
type
Types
::
LabelType
.
connection_type
,
null:
true
type
Types
::
LabelType
.
connection_type
,
null:
true
argument
:include_descendant_groups
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_descendant_groups
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Include labels from descendant groups.'
,
description:
'Include labels from descendant groups.'
,
default_value:
false
default_value:
false
argument
:only_group_labels
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:only_group_labels
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Include only group level labels.'
,
description:
'Include only group level labels.'
,
default_value:
false
default_value:
false
...
...
app/graphql/resolvers/group_milestones_resolver.rb
View file @
dad47460
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
module
Resolvers
module
Resolvers
class
GroupMilestonesResolver
<
MilestonesResolver
class
GroupMilestonesResolver
<
MilestonesResolver
argument
:include_descendants
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_descendants
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Include milestones from all subgroups and subprojects.'
description:
'Include milestones from all subgroups and subprojects.'
argument
:include_ancestors
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_ancestors
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Include milestones from all parent groups.'
description:
'Include milestones from all parent groups.'
...
...
app/graphql/resolvers/labels_resolver.rb
View file @
dad47460
...
@@ -8,11 +8,11 @@ module Resolvers
...
@@ -8,11 +8,11 @@ module Resolvers
type
Types
::
LabelType
.
connection_type
,
null:
true
type
Types
::
LabelType
.
connection_type
,
null:
true
argument
:search_term
,
GraphQL
::
STRING_TYPE
,
argument
:search_term
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'A search term to find labels with.'
description:
'A search term to find labels with.'
argument
:include_ancestor_groups
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_ancestor_groups
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Include labels from ancestor groups.'
,
description:
'Include labels from ancestor groups.'
,
default_value:
false
default_value:
false
...
...
app/graphql/resolvers/members_resolver.rb
View file @
dad47460
...
@@ -7,7 +7,7 @@ module Resolvers
...
@@ -7,7 +7,7 @@ module Resolvers
type
Types
::
MemberInterface
.
connection_type
,
null:
true
type
Types
::
MemberInterface
.
connection_type
,
null:
true
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Search query.'
description:
'Search query.'
...
...
app/graphql/resolvers/merge_request_resolver.rb
View file @
dad47460
...
@@ -8,7 +8,7 @@ module Resolvers
...
@@ -8,7 +8,7 @@ module Resolvers
type
::
Types
::
MergeRequestType
,
null:
true
type
::
Types
::
MergeRequestType
,
null:
true
argument
:iid
,
GraphQL
::
STRING_TYPE
,
argument
:iid
,
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
as: :iids
,
as: :iids
,
description:
'IID of the merge request, for example `1`.'
description:
'IID of the merge request, for example `1`.'
...
...
app/graphql/resolvers/merge_requests_resolver.rb
View file @
dad47460
...
@@ -10,28 +10,28 @@ module Resolvers
...
@@ -10,28 +10,28 @@ module Resolvers
alias_method
:project
,
:object
alias_method
:project
,
:object
def
self
.
accept_assignee
def
self
.
accept_assignee
argument
:assignee_username
,
GraphQL
::
STRING_TYPE
,
argument
:assignee_username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of the assignee.'
description:
'Username of the assignee.'
end
end
def
self
.
accept_author
def
self
.
accept_author
argument
:author_username
,
GraphQL
::
STRING_TYPE
,
argument
:author_username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of the author.'
description:
'Username of the author.'
end
end
def
self
.
accept_reviewer
def
self
.
accept_reviewer
argument
:reviewer_username
,
GraphQL
::
STRING_TYPE
,
argument
:reviewer_username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of the reviewer.'
description:
'Username of the reviewer.'
end
end
argument
:iids
,
[
GraphQL
::
STRING_TYPE
],
argument
:iids
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'Array of IIDs of merge requests, for example `[1, 2]`.'
description:
'Array of IIDs of merge requests, for example `[1, 2]`.'
argument
:source_branches
,
[
GraphQL
::
STRING_TYPE
],
argument
:source_branches
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
as: :source_branch
,
as: :source_branch
,
description:
<<~
DESC
description:
<<~
DESC
...
@@ -39,7 +39,7 @@ module Resolvers
...
@@ -39,7 +39,7 @@ module Resolvers
All resolved merge requests will have one of these branches as their source.
All resolved merge requests will have one of these branches as their source.
DESC
DESC
argument
:target_branches
,
[
GraphQL
::
STRING_TYPE
],
argument
:target_branches
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
as: :target_branch
,
as: :target_branch
,
description:
<<~
DESC
description:
<<~
DESC
...
@@ -51,7 +51,7 @@ module Resolvers
...
@@ -51,7 +51,7 @@ module Resolvers
required:
false
,
required:
false
,
description:
'A merge request state. If provided, all resolved merge requests will have this state.'
description:
'A merge request state. If provided, all resolved merge requests will have this state.'
argument
:labels
,
[
GraphQL
::
STRING_TYPE
],
argument
:labels
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
as: :label_name
,
as: :label_name
,
description:
'Array of label names. All resolved merge requests will have all of these labels.'
description:
'Array of label names. All resolved merge requests will have all of these labels.'
...
@@ -61,7 +61,7 @@ module Resolvers
...
@@ -61,7 +61,7 @@ module Resolvers
argument
:merged_before
,
Types
::
TimeType
,
argument
:merged_before
,
Types
::
TimeType
,
required:
false
,
required:
false
,
description:
'Merge requests merged before this date.'
description:
'Merge requests merged before this date.'
argument
:milestone_title
,
GraphQL
::
STRING_TYPE
,
argument
:milestone_title
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Title of the milestone.'
description:
'Title of the milestone.'
argument
:sort
,
Types
::
MergeRequestSortEnum
,
argument
:sort
,
Types
::
MergeRequestSortEnum
,
...
@@ -70,11 +70,11 @@ module Resolvers
...
@@ -70,11 +70,11 @@ module Resolvers
default_value: :created_desc
default_value: :created_desc
negated
do
negated
do
argument
:labels
,
[
GraphQL
::
STRING_TYPE
],
argument
:labels
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
as: :label_name
,
as: :label_name
,
description:
'Array of label names. All resolved merge requests will not have these labels.'
description:
'Array of label names. All resolved merge requests will not have these labels.'
argument
:milestone_title
,
GraphQL
::
STRING_TYPE
,
argument
:milestone_title
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Title of the milestone.'
description:
'Title of the milestone.'
end
end
...
...
app/graphql/resolvers/metrics/dashboard_resolver.rb
View file @
dad47460
...
@@ -6,7 +6,7 @@ module Resolvers
...
@@ -6,7 +6,7 @@ module Resolvers
type
Types
::
Metrics
::
DashboardType
,
null:
true
type
Types
::
Metrics
::
DashboardType
,
null:
true
calls_gitaly!
calls_gitaly!
argument
:path
,
GraphQL
::
STRING_TYPE
,
argument
:path
,
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
<<~
MD
description:
<<~
MD
Path to a file which defines a metrics dashboard eg: `"config/prometheus/common_metrics.yml"`.
Path to a file which defines a metrics dashboard eg: `"config/prometheus/common_metrics.yml"`.
...
...
app/graphql/resolvers/milestones_resolver.rb
View file @
dad47460
...
@@ -5,7 +5,7 @@ module Resolvers
...
@@ -5,7 +5,7 @@ module Resolvers
include
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
include
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
include
TimeFrameArguments
include
TimeFrameArguments
argument
:ids
,
[
GraphQL
::
ID_TYPE
],
argument
:ids
,
[
GraphQL
::
Types
::
ID
],
required:
false
,
required:
false
,
description:
'Array of global milestone IDs, e.g., `"gid://gitlab/Milestone/1"`.'
description:
'Array of global milestone IDs, e.g., `"gid://gitlab/Milestone/1"`.'
...
@@ -13,11 +13,11 @@ module Resolvers
...
@@ -13,11 +13,11 @@ module Resolvers
required:
false
,
required:
false
,
description:
'Filter milestones by state.'
description:
'Filter milestones by state.'
argument
:title
,
GraphQL
::
STRING_TYPE
,
argument
:title
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'The title of the milestone.'
description:
'The title of the milestone.'
argument
:search_title
,
GraphQL
::
STRING_TYPE
,
argument
:search_title
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'A search string for the title.'
description:
'A search string for the title.'
...
...
app/graphql/resolvers/namespace_projects_resolver.rb
View file @
dad47460
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
module
Resolvers
module
Resolvers
class
NamespaceProjectsResolver
<
BaseResolver
class
NamespaceProjectsResolver
<
BaseResolver
argument
:include_subgroups
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_subgroups
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
default_value:
false
,
default_value:
false
,
description:
'Include also subgroup projects.'
description:
'Include also subgroup projects.'
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
default_value:
nil
,
default_value:
nil
,
description:
'Search project with most similar names or paths.'
description:
'Search project with most similar names or paths.'
...
@@ -17,7 +17,7 @@ module Resolvers
...
@@ -17,7 +17,7 @@ module Resolvers
default_value:
nil
,
default_value:
nil
,
description:
'Sort projects by this criteria.'
description:
'Sort projects by this criteria.'
argument
:ids
,
[
GraphQL
::
ID_TYPE
],
argument
:ids
,
[
GraphQL
::
Types
::
ID
],
required:
false
,
required:
false
,
default_value:
nil
,
default_value:
nil
,
description:
'Filter projects by IDs.'
description:
'Filter projects by IDs.'
...
...
app/graphql/resolvers/packages_base_resolver.rb
View file @
dad47460
...
@@ -9,7 +9,7 @@ module Resolvers
...
@@ -9,7 +9,7 @@ module Resolvers
required:
false
,
required:
false
,
default_value: :created_desc
default_value: :created_desc
argument
:package_name
,
GraphQL
::
STRING_TYPE
,
argument
:package_name
,
GraphQL
::
Types
::
String
,
description:
'Search a package by name.'
,
description:
'Search a package by name.'
,
required:
false
,
required:
false
,
default_value:
nil
default_value:
nil
...
@@ -24,7 +24,7 @@ module Resolvers
...
@@ -24,7 +24,7 @@ module Resolvers
required:
false
,
required:
false
,
default_value:
nil
default_value:
nil
argument
:include_versionless
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_versionless
,
GraphQL
::
Types
::
Boolean
,
description:
'Include versionless packages.'
,
description:
'Include versionless packages.'
,
required:
false
,
required:
false
,
default_value:
false
default_value:
false
...
...
app/graphql/resolvers/project_milestones_resolver.rb
View file @
dad47460
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
Resolvers
module
Resolvers
class
ProjectMilestonesResolver
<
MilestonesResolver
class
ProjectMilestonesResolver
<
MilestonesResolver
argument
:include_ancestors
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:include_ancestors
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
"Also return milestones in the project's parent group and its ancestors."
description:
"Also return milestones in the project's parent group and its ancestors."
...
...
app/graphql/resolvers/project_pipeline_resolver.rb
View file @
dad47460
...
@@ -6,11 +6,11 @@ module Resolvers
...
@@ -6,11 +6,11 @@ module Resolvers
alias_method
:project
,
:object
alias_method
:project
,
:object
argument
:iid
,
GraphQL
::
ID_TYPE
,
argument
:iid
,
GraphQL
::
Types
::
ID
,
required:
false
,
required:
false
,
description:
'IID of the Pipeline. For example, "1".'
description:
'IID of the Pipeline. For example, "1".'
argument
:sha
,
GraphQL
::
STRING_TYPE
,
argument
:sha
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'SHA of the Pipeline. For example, "dyd0f15ay83993f5ab66k927w28673882x99100b".'
description:
'SHA of the Pipeline. For example, "dyd0f15ay83993f5ab66k927w28673882x99100b".'
...
...
app/graphql/resolvers/projects/jira_projects_resolver.rb
View file @
dad47460
...
@@ -9,7 +9,7 @@ module Resolvers
...
@@ -9,7 +9,7 @@ module Resolvers
authorize
:admin_project
authorize
:admin_project
argument
:name
,
argument
:name
,
GraphQL
::
STRING_TYPE
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Project name or key.'
description:
'Project name or key.'
...
...
app/graphql/resolvers/projects/services_resolver.rb
View file @
dad47460
...
@@ -10,7 +10,7 @@ module Resolvers
...
@@ -10,7 +10,7 @@ module Resolvers
authorizes_object!
authorizes_object!
argument
:active
,
argument
:active
,
GraphQL
::
BOOLEAN_TYPE
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Indicates if the integration is active.'
description:
'Indicates if the integration is active.'
argument
:type
,
argument
:type
,
...
...
app/graphql/resolvers/projects_resolver.rb
View file @
dad47460
...
@@ -4,27 +4,27 @@ module Resolvers
...
@@ -4,27 +4,27 @@ module Resolvers
class
ProjectsResolver
<
BaseResolver
class
ProjectsResolver
<
BaseResolver
type
Types
::
ProjectType
,
null:
true
type
Types
::
ProjectType
,
null:
true
argument
:membership
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:membership
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Limit projects that the current user is a member of.'
description:
'Limit projects that the current user is a member of.'
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Search query for project name, path, or description.'
description:
'Search query for project name, path, or description.'
argument
:ids
,
[
GraphQL
::
ID_TYPE
],
argument
:ids
,
[
GraphQL
::
Types
::
ID
],
required:
false
,
required:
false
,
description:
'Filter projects by IDs.'
description:
'Filter projects by IDs.'
argument
:search_namespaces
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:search_namespaces
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Include namespace in project search.'
description:
'Include namespace in project search.'
argument
:sort
,
GraphQL
::
STRING_TYPE
,
argument
:sort
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Sort order of results.'
description:
'Sort order of results.'
argument
:topics
,
type:
[
GraphQL
::
STRING_TYPE
],
argument
:topics
,
type:
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'Filters projects by topics.'
description:
'Filters projects by topics.'
...
...
app/graphql/resolvers/release_resolver.rb
View file @
dad47460
...
@@ -4,7 +4,7 @@ module Resolvers
...
@@ -4,7 +4,7 @@ module Resolvers
class
ReleaseResolver
<
BaseResolver
class
ReleaseResolver
<
BaseResolver
type
Types
::
ReleaseType
,
null:
true
type
Types
::
ReleaseType
,
null:
true
argument
:tag_name
,
GraphQL
::
STRING_TYPE
,
argument
:tag_name
,
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
'The name of the tag associated to the release.'
description:
'The name of the tag associated to the release.'
...
...
app/graphql/resolvers/repository_branch_names_resolver.rb
View file @
dad47460
...
@@ -2,19 +2,19 @@
...
@@ -2,19 +2,19 @@
module
Resolvers
module
Resolvers
class
RepositoryBranchNamesResolver
<
BaseResolver
class
RepositoryBranchNamesResolver
<
BaseResolver
type
::
GraphQL
::
STRING_TYPE
,
null:
false
type
::
GraphQL
::
Types
::
String
,
null:
false
calls_gitaly!
calls_gitaly!
argument
:search_pattern
,
GraphQL
::
STRING_TYPE
,
argument
:search_pattern
,
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
'The pattern to search for branch names by.'
description:
'The pattern to search for branch names by.'
argument
:offset
,
GraphQL
::
INT_TYPE
,
argument
:offset
,
GraphQL
::
Types
::
Int
,
required:
true
,
required:
true
,
description:
'The number of branch names to skip.'
description:
'The number of branch names to skip.'
argument
:limit
,
GraphQL
::
INT_TYPE
,
argument
:limit
,
GraphQL
::
Types
::
Int
,
required:
true
,
required:
true
,
description:
'The number of branch names to return.'
description:
'The number of branch names to return.'
...
...
app/graphql/resolvers/snippets/blobs_resolver.rb
View file @
dad47460
...
@@ -12,7 +12,7 @@ module Resolvers
...
@@ -12,7 +12,7 @@ module Resolvers
alias_method
:snippet
,
:object
alias_method
:snippet
,
:object
argument
:paths
,
[
GraphQL
::
STRING_TYPE
],
argument
:paths
,
[
GraphQL
::
Types
::
String
],
required:
false
,
required:
false
,
description:
'Paths of the blobs.'
description:
'Paths of the blobs.'
...
...
app/graphql/resolvers/snippets_resolver.rb
View file @
dad47460
...
@@ -22,7 +22,7 @@ module Resolvers
...
@@ -22,7 +22,7 @@ module Resolvers
description:
'The type of snippet.'
description:
'The type of snippet.'
argument
:explore
,
argument
:explore
,
GraphQL
::
BOOLEAN_TYPE
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
description:
'Explore personal snippets.'
description:
'Explore personal snippets.'
...
...
app/graphql/resolvers/terraform/states_resolver.rb
View file @
dad47460
...
@@ -8,7 +8,7 @@ module Resolvers
...
@@ -8,7 +8,7 @@ module Resolvers
alias_method
:project
,
:object
alias_method
:project
,
:object
when_single
do
when_single
do
argument
:name
,
GraphQL
::
STRING_TYPE
,
argument
:name
,
GraphQL
::
Types
::
String
,
required:
true
,
required:
true
,
description:
'Name of the Terraform state.'
description:
'Name of the Terraform state.'
end
end
...
...
app/graphql/resolvers/todo_resolver.rb
View file @
dad47460
...
@@ -10,15 +10,15 @@ module Resolvers
...
@@ -10,15 +10,15 @@ module Resolvers
required:
false
,
required:
false
,
description:
'The action to be filtered.'
description:
'The action to be filtered.'
argument
:author_id
,
[
GraphQL
::
ID_TYPE
],
argument
:author_id
,
[
GraphQL
::
Types
::
ID
],
required:
false
,
required:
false
,
description:
'The ID of an author.'
description:
'The ID of an author.'
argument
:project_id
,
[
GraphQL
::
ID_TYPE
],
argument
:project_id
,
[
GraphQL
::
Types
::
ID
],
required:
false
,
required:
false
,
description:
'The ID of a project.'
description:
'The ID of a project.'
argument
:group_id
,
[
GraphQL
::
ID_TYPE
],
argument
:group_id
,
[
GraphQL
::
Types
::
ID
],
required:
false
,
required:
false
,
description:
'The ID of a group.'
description:
'The ID of a group.'
...
...
app/graphql/resolvers/tree_resolver.rb
View file @
dad47460
...
@@ -6,15 +6,15 @@ module Resolvers
...
@@ -6,15 +6,15 @@ module Resolvers
calls_gitaly!
calls_gitaly!
argument
:path
,
GraphQL
::
STRING_TYPE
,
argument
:path
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
default_value:
''
,
default_value:
''
,
description:
'The path to get the tree for. Default value is the root of the repository.'
description:
'The path to get the tree for. Default value is the root of the repository.'
argument
:ref
,
GraphQL
::
STRING_TYPE
,
argument
:ref
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
default_value: :head
,
default_value: :head
,
description:
'The commit ref to get the tree for. Default value is HEAD.'
description:
'The commit ref to get the tree for. Default value is HEAD.'
argument
:recursive
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:recursive
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
default_value:
false
,
default_value:
false
,
description:
'Used to get a recursive tree. Default is false.'
description:
'Used to get a recursive tree. Default is false.'
...
...
app/graphql/resolvers/user_discussions_count_resolver.rb
View file @
dad47460
...
@@ -4,7 +4,7 @@ module Resolvers
...
@@ -4,7 +4,7 @@ module Resolvers
class
UserDiscussionsCountResolver
<
BaseResolver
class
UserDiscussionsCountResolver
<
BaseResolver
include
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
include
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
type
GraphQL
::
INT_TYPE
,
null:
true
type
GraphQL
::
Types
::
Int
,
null:
true
def
resolve
def
resolve
authorize!
(
object
)
authorize!
(
object
)
...
...
app/graphql/resolvers/user_merge_requests_resolver_base.rb
View file @
dad47460
...
@@ -5,7 +5,7 @@ module Resolvers
...
@@ -5,7 +5,7 @@ module Resolvers
include
ResolvesProject
include
ResolvesProject
argument
:project_path
,
argument
:project_path
,
type:
GraphQL
::
STRING_TYPE
,
type:
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
<<~
DESC
description:
<<~
DESC
The full-path of the project the authored merge requests should be in.
The full-path of the project the authored merge requests should be in.
...
...
app/graphql/resolvers/user_notes_count_resolver.rb
View file @
dad47460
...
@@ -4,7 +4,7 @@ module Resolvers
...
@@ -4,7 +4,7 @@ module Resolvers
class
UserNotesCountResolver
<
BaseResolver
class
UserNotesCountResolver
<
BaseResolver
include
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
include
Gitlab
::
Graphql
::
Authorize
::
AuthorizeResource
type
GraphQL
::
INT_TYPE
,
null:
true
type
GraphQL
::
Types
::
Int
,
null:
true
def
resolve
def
resolve
authorize!
(
object
)
authorize!
(
object
)
...
...
app/graphql/resolvers/user_resolver.rb
View file @
dad47460
...
@@ -10,7 +10,7 @@ module Resolvers
...
@@ -10,7 +10,7 @@ module Resolvers
required:
false
,
required:
false
,
description:
'ID of the User.'
description:
'ID of the User.'
argument
:username
,
GraphQL
::
STRING_TYPE
,
argument
:username
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Username of the User.'
description:
'Username of the User.'
...
...
app/graphql/resolvers/user_starred_projects_resolver.rb
View file @
dad47460
...
@@ -4,7 +4,7 @@ module Resolvers
...
@@ -4,7 +4,7 @@ module Resolvers
class
UserStarredProjectsResolver
<
BaseResolver
class
UserStarredProjectsResolver
<
BaseResolver
type
Types
::
ProjectType
.
connection_type
,
null:
true
type
Types
::
ProjectType
.
connection_type
,
null:
true
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
'Search query.'
description:
'Search query.'
...
...
app/graphql/resolvers/users/group_count_resolver.rb
View file @
dad47460
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
Resolvers
module
Resolvers
module
Users
module
Users
class
GroupCountResolver
<
BaseResolver
class
GroupCountResolver
<
BaseResolver
type
GraphQL
::
INT_TYPE
,
null:
true
type
GraphQL
::
Types
::
Int
,
null:
true
alias_method
:user
,
:object
alias_method
:user
,
:object
...
...
app/graphql/resolvers/users_resolver.rb
View file @
dad47460
...
@@ -7,11 +7,11 @@ module Resolvers
...
@@ -7,11 +7,11 @@ module Resolvers
type
Types
::
UserType
.
connection_type
,
null:
true
type
Types
::
UserType
.
connection_type
,
null:
true
description
'Find Users'
description
'Find Users'
argument
:ids
,
[
GraphQL
::
ID_TYPE
],
argument
:ids
,
[
GraphQL
::
Types
::
ID
],
required:
false
,
required:
false
,
description:
'List of user Global IDs.'
description:
'List of user Global IDs.'
argument
:usernames
,
[
GraphQL
::
STRING_TYPE
],
required:
false
,
argument
:usernames
,
[
GraphQL
::
Types
::
String
],
required:
false
,
description:
'List of usernames.'
description:
'List of usernames.'
argument
:sort
,
Types
::
SortEnum
,
argument
:sort
,
Types
::
SortEnum
,
...
@@ -19,11 +19,11 @@ module Resolvers
...
@@ -19,11 +19,11 @@ module Resolvers
required:
false
,
required:
false
,
default_value: :created_desc
default_value: :created_desc
argument
:search
,
GraphQL
::
STRING_TYPE
,
argument
:search
,
GraphQL
::
Types
::
String
,
required:
false
,
required:
false
,
description:
"Query to search users by name, username, or primary email."
description:
"Query to search users by name, username, or primary email."
argument
:admins
,
GraphQL
::
BOOLEAN_TYPE
,
argument
:admins
,
GraphQL
::
Types
::
Boolean
,
required:
false
,
required:
false
,
default_value:
false
,
default_value:
false
,
description:
'Return only admin users.'
description:
'Return only admin users.'
...
...
ee/spec/graphql/resolvers/user_discussions_count_resolver_spec.rb
View file @
dad47460
...
@@ -11,7 +11,7 @@ RSpec.describe Resolvers::UserDiscussionsCountResolver do
...
@@ -11,7 +11,7 @@ RSpec.describe Resolvers::UserDiscussionsCountResolver do
let_it_be
(
:private_project
)
{
create
(
:project
,
:repository
,
:private
)
}
let_it_be
(
:private_project
)
{
create
(
:project
,
:repository
,
:private
)
}
specify
do
specify
do
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
INT_TYPE
)
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
Types
::
Int
)
end
end
context
'when counting discussions from an epic'
do
context
'when counting discussions from an epic'
do
...
...
ee/spec/graphql/resolvers/user_notes_count_resolver_spec.rb
View file @
dad47460
...
@@ -11,7 +11,7 @@ RSpec.describe Resolvers::UserNotesCountResolver do
...
@@ -11,7 +11,7 @@ RSpec.describe Resolvers::UserNotesCountResolver do
let_it_be
(
:private_project
)
{
create
(
:project
,
:repository
,
:private
)
}
let_it_be
(
:private_project
)
{
create
(
:project
,
:repository
,
:private
)
}
specify
do
specify
do
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
INT_TYPE
)
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
Types
::
Int
)
end
end
context
'when counting notes from an epic'
do
context
'when counting notes from an epic'
do
...
...
spec/graphql/resolvers/base_resolver_spec.rb
View file @
dad47460
...
@@ -7,8 +7,8 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -7,8 +7,8 @@ RSpec.describe Resolvers::BaseResolver do
let
(
:resolver
)
do
let
(
:resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
argument
:test
,
::
GraphQL
::
INT_TYPE
,
required:
false
argument
:test
,
::
GraphQL
::
Types
::
Int
,
required:
false
type
[
::
GraphQL
::
INT_TYPE
],
null:
true
type
[
::
GraphQL
::
Types
::
Int
],
null:
true
def
resolve
(
test:
100
)
def
resolve
(
test:
100
)
process
(
object
)
process
(
object
)
...
@@ -22,7 +22,7 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -22,7 +22,7 @@ RSpec.describe Resolvers::BaseResolver do
let
(
:last_resolver
)
do
let
(
:last_resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
type
[
::
GraphQL
::
INT_TYPE
],
null:
true
type
[
::
GraphQL
::
Types
::
Int
],
null:
true
def
resolve
(
**
args
)
def
resolve
(
**
args
)
[
1
,
2
]
[
1
,
2
]
...
@@ -36,11 +36,11 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -36,11 +36,11 @@ RSpec.describe Resolvers::BaseResolver do
context
'for a connection of scalars'
do
context
'for a connection of scalars'
do
let
(
:resolver
)
do
let
(
:resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
type
::
GraphQL
::
INT_TYPE
.
connection_type
,
null:
true
type
::
GraphQL
::
Types
::
Int
.
connection_type
,
null:
true
end
end
end
end
it
{
is_expected
.
to
eq
(
::
GraphQL
::
INT_TYPE
)
}
it
{
is_expected
.
to
eq
(
::
GraphQL
::
Types
::
Int
)
}
end
end
context
'for a connection of objects'
do
context
'for a connection of objects'
do
...
@@ -64,21 +64,21 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -64,21 +64,21 @@ RSpec.describe Resolvers::BaseResolver do
context
'for a list type'
do
context
'for a list type'
do
let
(
:resolver
)
do
let
(
:resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
type
[
::
GraphQL
::
STRING_TYPE
],
null:
true
type
[
::
GraphQL
::
Types
::
String
],
null:
true
end
end
end
end
it
{
is_expected
.
to
eq
(
::
GraphQL
::
STRING_TYPE
)
}
it
{
is_expected
.
to
eq
(
::
GraphQL
::
Types
::
String
)
}
end
end
context
'for a scalar type'
do
context
'for a scalar type'
do
let
(
:resolver
)
do
let
(
:resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
type
::
GraphQL
::
BOOLEAN_TYPE
,
null:
true
type
::
GraphQL
::
Types
::
Boolean
,
null:
true
end
end
end
end
it
{
is_expected
.
to
eq
(
::
GraphQL
::
BOOLEAN_TYPE
)
}
it
{
is_expected
.
to
eq
(
::
GraphQL
::
Types
::
Boolean
)
}
end
end
end
end
...
@@ -88,7 +88,7 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -88,7 +88,7 @@ RSpec.describe Resolvers::BaseResolver do
end
end
it
'has the correct (singular) type'
do
it
'has the correct (singular) type'
do
expect
(
resolver
.
single
.
type
).
to
eq
(
::
GraphQL
::
INT_TYPE
)
expect
(
resolver
.
single
.
type
).
to
eq
(
::
GraphQL
::
Types
::
Int
)
end
end
it
'returns the same subclass every time'
do
it
'returns the same subclass every time'
do
...
@@ -105,10 +105,10 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -105,10 +105,10 @@ RSpec.describe Resolvers::BaseResolver do
describe
'.when_single'
do
describe
'.when_single'
do
let
(
:resolver
)
do
let
(
:resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
type
[
::
GraphQL
::
INT_TYPE
],
null:
true
type
[
::
GraphQL
::
Types
::
Int
],
null:
true
when_single
do
when_single
do
argument
:foo
,
::
GraphQL
::
INT_TYPE
,
required:
true
argument
:foo
,
::
GraphQL
::
Types
::
Int
,
required:
true
end
end
def
resolve
(
foo:
1
)
def
resolve
(
foo:
1
)
...
@@ -138,14 +138,14 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -138,14 +138,14 @@ RSpec.describe Resolvers::BaseResolver do
context
'multiple when_single blocks'
do
context
'multiple when_single blocks'
do
let
(
:resolver
)
do
let
(
:resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
type
[
::
GraphQL
::
INT_TYPE
],
null:
true
type
[
::
GraphQL
::
Types
::
Int
],
null:
true
when_single
do
when_single
do
argument
:foo
,
::
GraphQL
::
INT_TYPE
,
required:
true
argument
:foo
,
::
GraphQL
::
Types
::
Int
,
required:
true
end
end
when_single
do
when_single
do
argument
:bar
,
::
GraphQL
::
INT_TYPE
,
required:
true
argument
:bar
,
::
GraphQL
::
Types
::
Int
,
required:
true
end
end
def
resolve
(
foo:
1
,
bar:
2
)
def
resolve
(
foo:
1
,
bar:
2
)
...
@@ -168,7 +168,7 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -168,7 +168,7 @@ RSpec.describe Resolvers::BaseResolver do
let
(
:subclass
)
do
let
(
:subclass
)
do
Class
.
new
(
resolver
)
do
Class
.
new
(
resolver
)
do
when_single
do
when_single
do
argument
:inc
,
::
GraphQL
::
INT_TYPE
,
required:
true
argument
:inc
,
::
GraphQL
::
Types
::
Int
,
required:
true
end
end
def
resolve
(
foo
:,
inc
:)
def
resolve
(
foo
:,
inc
:)
...
@@ -194,7 +194,7 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -194,7 +194,7 @@ RSpec.describe Resolvers::BaseResolver do
context
'when the resolver returns early'
do
context
'when the resolver returns early'
do
let
(
:resolver
)
do
let
(
:resolver
)
do
Class
.
new
(
described_class
)
do
Class
.
new
(
described_class
)
do
type
[
::
GraphQL
::
STRING_TYPE
],
null:
true
type
[
::
GraphQL
::
Types
::
String
],
null:
true
def
ready?
(
**
args
)
def
ready?
(
**
args
)
[
false
,
%w[early return]
]
[
false
,
%w[early return]
]
...
@@ -237,14 +237,14 @@ RSpec.describe Resolvers::BaseResolver do
...
@@ -237,14 +237,14 @@ RSpec.describe Resolvers::BaseResolver do
context
'when field is a connection'
do
context
'when field is a connection'
do
it
'increases complexity based on arguments'
do
it
'increases complexity based on arguments'
do
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
STRING_TYPE
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
1
)
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
Types
::
String
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
1
)
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sort:
'foo'
},
1
)).
to
eq
3
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sort:
'foo'
},
1
)).
to
eq
3
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
search:
'foo'
},
1
)).
to
eq
7
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
search:
'foo'
},
1
)).
to
eq
7
end
end
it
'does not increase complexity when filtering by iids'
do
it
'does not increase complexity when filtering by iids'
do
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
STRING_TYPE
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
Types
::
String
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sort:
'foo'
},
1
)).
to
eq
6
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sort:
'foo'
},
1
)).
to
eq
6
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sort:
'foo'
,
iid:
1
},
1
)).
to
eq
3
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sort:
'foo'
,
iid:
1
},
1
)).
to
eq
3
...
...
spec/graphql/resolvers/concerns/caching_array_resolver_spec.rb
View file @
dad47460
...
@@ -20,7 +20,7 @@ RSpec.describe ::CachingArrayResolver do
...
@@ -20,7 +20,7 @@ RSpec.describe ::CachingArrayResolver do
Class
.
new
(
::
Resolvers
::
BaseResolver
)
do
Class
.
new
(
::
Resolvers
::
BaseResolver
)
do
include
mod
include
mod
type
[
::
Types
::
UserType
],
null:
true
type
[
::
Types
::
UserType
],
null:
true
argument
:is_admin
,
::
GraphQL
::
BOOLEAN_TYPE
,
required:
false
argument
:is_admin
,
::
GraphQL
::
Types
::
Boolean
,
required:
false
def
query_input
(
is_admin
:)
def
query_input
(
is_admin
:)
is_admin
is_admin
...
@@ -50,7 +50,7 @@ RSpec.describe ::CachingArrayResolver do
...
@@ -50,7 +50,7 @@ RSpec.describe ::CachingArrayResolver do
Class
.
new
(
::
Resolvers
::
BaseResolver
)
do
Class
.
new
(
::
Resolvers
::
BaseResolver
)
do
include
mod
include
mod
type
[
::
Types
::
UserType
],
null:
true
type
[
::
Types
::
UserType
],
null:
true
argument
:username
,
::
GraphQL
::
STRING_TYPE
,
required:
false
argument
:username
,
::
GraphQL
::
Types
::
String
,
required:
false
def
query_input
(
username
:)
def
query_input
(
username
:)
username
username
...
...
spec/graphql/resolvers/concerns/resolves_pipelines_spec.rb
View file @
dad47460
...
@@ -50,7 +50,7 @@ RSpec.describe ResolvesPipelines do
...
@@ -50,7 +50,7 @@ RSpec.describe ResolvesPipelines do
end
end
it
'increases field complexity based on arguments'
do
it
'increases field complexity based on arguments'
do
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
STRING_TYPE
,
resolver_class:
resolver
,
null:
false
,
max_page_size:
1
)
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
Types
::
String
,
resolver_class:
resolver
,
null:
false
,
max_page_size:
1
)
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
2
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
2
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sha:
'foo'
},
1
)).
to
eq
4
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
sha:
'foo'
},
1
)).
to
eq
4
...
...
spec/graphql/resolvers/echo_resolver_spec.rb
View file @
dad47460
...
@@ -9,7 +9,7 @@ RSpec.describe Resolvers::EchoResolver do
...
@@ -9,7 +9,7 @@ RSpec.describe Resolvers::EchoResolver do
let
(
:text
)
{
'Message test'
}
let
(
:text
)
{
'Message test'
}
specify
do
specify
do
expect
(
described_class
).
to
have_non_null_graphql_type
(
::
GraphQL
::
STRING_TYPE
)
expect
(
described_class
).
to
have_non_null_graphql_type
(
::
GraphQL
::
Types
::
String
)
end
end
describe
'#resolve'
do
describe
'#resolve'
do
...
...
spec/graphql/resolvers/issues_resolver_spec.rb
View file @
dad47460
...
@@ -407,7 +407,7 @@ RSpec.describe Resolvers::IssuesResolver do
...
@@ -407,7 +407,7 @@ RSpec.describe Resolvers::IssuesResolver do
end
end
it
'increases field complexity based on arguments'
do
it
'increases field complexity based on arguments'
do
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
STRING_TYPE
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
Types
::
String
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
4
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
4
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
labelName:
'foo'
},
1
)).
to
eq
8
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
labelName:
'foo'
},
1
)).
to
eq
8
...
...
spec/graphql/resolvers/namespace_projects_resolver_spec.rb
View file @
dad47460
...
@@ -145,7 +145,7 @@ RSpec.describe Resolvers::NamespaceProjectsResolver do
...
@@ -145,7 +145,7 @@ RSpec.describe Resolvers::NamespaceProjectsResolver do
end
end
it
'has an high complexity regardless of arguments'
do
it
'has an high complexity regardless of arguments'
do
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
STRING_TYPE
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
field
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
Types
::
String
.
connection_type
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
24
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
24
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
include_subgroups:
true
},
1
)).
to
eq
24
expect
(
field
.
to_graphql
.
complexity
.
call
({},
{
include_subgroups:
true
},
1
)).
to
eq
24
...
...
spec/graphql/resolvers/project_resolver_spec.rb
View file @
dad47460
...
@@ -28,8 +28,8 @@ RSpec.describe Resolvers::ProjectResolver do
...
@@ -28,8 +28,8 @@ RSpec.describe Resolvers::ProjectResolver do
end
end
it
'does not increase complexity depending on number of load limits'
do
it
'does not increase complexity depending on number of load limits'
do
field1
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
STRING_TYPE
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
field1
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
Types
::
String
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
100
)
field2
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
STRING_TYPE
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
1
)
field2
=
Types
::
BaseField
.
new
(
name:
'test'
,
type:
GraphQL
::
Types
::
String
,
resolver_class:
described_class
,
null:
false
,
max_page_size:
1
)
expect
(
field1
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
2
expect
(
field1
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
2
expect
(
field2
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
2
expect
(
field2
.
to_graphql
.
complexity
.
call
({},
{},
1
)).
to
eq
2
...
...
spec/graphql/resolvers/terraform/states_resolver_spec.rb
View file @
dad47460
...
@@ -43,7 +43,8 @@ RSpec.describe Resolvers::Terraform::StatesResolver.single do
...
@@ -43,7 +43,8 @@ RSpec.describe Resolvers::Terraform::StatesResolver.single do
it
do
it
do
expect
(
subject
).
to
be_present
expect
(
subject
).
to
be_present
expect
(
subject
.
type
.
to_s
).
to
eq
(
'String!'
)
expect
(
subject
.
type
).
to
be_kind_of
GraphQL
::
Schema
::
NonNull
expect
(
subject
.
type
.
unwrap
).
to
eq
GraphQL
::
Types
::
String
expect
(
subject
.
description
).
to
be_present
expect
(
subject
.
description
).
to
be_present
end
end
end
end
...
...
spec/graphql/resolvers/user_discussions_count_resolver_spec.rb
View file @
dad47460
...
@@ -16,7 +16,7 @@ RSpec.describe Resolvers::UserDiscussionsCountResolver do
...
@@ -16,7 +16,7 @@ RSpec.describe Resolvers::UserDiscussionsCountResolver do
let_it_be
(
:private_discussion
)
{
create_list
(
:discussion_note_on_issue
,
3
,
noteable:
private_issue
,
project:
private_project
)
}
let_it_be
(
:private_discussion
)
{
create_list
(
:discussion_note_on_issue
,
3
,
noteable:
private_issue
,
project:
private_project
)
}
specify
do
specify
do
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
INT_TYPE
)
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
Types
::
Int
)
end
end
context
'when counting discussions from a public issue'
do
context
'when counting discussions from a public issue'
do
...
...
spec/graphql/resolvers/user_notes_count_resolver_spec.rb
View file @
dad47460
...
@@ -11,7 +11,7 @@ RSpec.describe Resolvers::UserNotesCountResolver do
...
@@ -11,7 +11,7 @@ RSpec.describe Resolvers::UserNotesCountResolver do
let_it_be
(
:private_project
)
{
create
(
:project
,
:repository
,
:private
)
}
let_it_be
(
:private_project
)
{
create
(
:project
,
:repository
,
:private
)
}
specify
do
specify
do
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
INT_TYPE
)
expect
(
described_class
).
to
have_nullable_graphql_type
(
GraphQL
::
Types
::
Int
)
end
end
context
'when counting notes from an issue'
do
context
'when counting notes from an issue'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment