Commit b0a89914 authored by Brett Walker's avatar Brett Walker

Convert old graphql types to newer types

in prep for interpreter
parent 5cb8a263
......@@ -178,61 +178,6 @@ Graphql/OldTypes:
- 'app/graphql/types/container_repository_type.rb'
- 'app/graphql/types/countable_connection_type.rb'
- 'app/graphql/types/custom_emoji_type.rb'
- 'app/graphql/types/design_management/design_fields.rb'
- 'app/graphql/types/design_management/version_type.rb'
- 'app/graphql/types/diff_paths_input_type.rb'
- 'app/graphql/types/diff_refs_type.rb'
- 'app/graphql/types/diff_stats_summary_type.rb'
- 'app/graphql/types/diff_stats_type.rb'
- 'app/graphql/types/environment_type.rb'
- 'app/graphql/types/error_tracking/sentry_detailed_error_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_collection_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_frequency_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_stack_trace_entry_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_tags_type.rb'
- 'app/graphql/types/error_tracking/sentry_error_type.rb'
- 'app/graphql/types/event_type.rb'
- 'app/graphql/types/evidence_type.rb'
- 'app/graphql/types/grafana_integration_type.rb'
- 'app/graphql/types/invitation_interface.rb'
- 'app/graphql/types/issue_type.rb'
- 'app/graphql/types/issues/negated_issue_filter_input_type.rb'
- 'app/graphql/types/jira_import_type.rb'
- 'app/graphql/types/jira_user_type.rb'
- 'app/graphql/types/jira_users_mapping_input_type.rb'
- 'app/graphql/types/label_type.rb'
- 'app/graphql/types/member_interface.rb'
- 'app/graphql/types/merge_request_type.rb'
- 'app/graphql/types/metadata/kas_type.rb'
- 'app/graphql/types/metadata_type.rb'
- 'app/graphql/types/metrics/dashboard_type.rb'
- 'app/graphql/types/metrics/dashboards/annotation_type.rb'
- 'app/graphql/types/milestone_stats_type.rb'
- 'app/graphql/types/milestone_type.rb'
- 'app/graphql/types/namespace/package_settings_type.rb'
- 'app/graphql/types/namespace_type.rb'
- 'app/graphql/types/notes/diff_image_position_input_type.rb'
- 'app/graphql/types/notes/diff_position_base_input_type.rb'
- 'app/graphql/types/notes/diff_position_input_type.rb'
- 'app/graphql/types/notes/diff_position_type.rb'
- 'app/graphql/types/notes/note_type.rb'
- 'app/graphql/types/notes/update_diff_image_position_input_type.rb'
- 'app/graphql/types/packages/composer/json_type.rb'
- 'app/graphql/types/packages/composer/metadatum_type.rb'
- 'app/graphql/types/packages/conan/file_metadatum_type.rb'
- 'app/graphql/types/packages/conan/metadatum_type.rb'
- 'app/graphql/types/packages/maven/metadatum_type.rb'
- 'app/graphql/types/packages/nuget/metadatum_type.rb'
- 'app/graphql/types/packages/package_file_type.rb'
- 'app/graphql/types/packages/package_tag_type.rb'
- 'app/graphql/types/packages/package_type.rb'
- 'app/graphql/types/packages/pypi/metadatum_type.rb'
- 'app/graphql/types/project_type.rb'
- 'app/graphql/types/projects/service_type.rb'
- 'app/graphql/types/projects/services/jira_project_type.rb'
- 'app/graphql/types/prometheus_alert_type.rb'
- 'app/graphql/types/query_complexity_type.rb'
- 'app/graphql/types/release_asset_link_shared_input_arguments.rb'
- 'app/graphql/types/release_asset_link_type.rb'
......
......@@ -7,13 +7,13 @@ module Types
field_class Types::BaseField
field :id, GraphQL::ID_TYPE, description: 'The ID of this design.', null: false
field :id, GraphQL::Types::ID, description: 'The ID of this design.', null: false
field :project, Types::ProjectType, null: false, description: 'The project the design belongs to.'
field :issue, Types::IssueType, null: false, description: 'The issue the design belongs to.'
field :filename, GraphQL::STRING_TYPE, null: false, description: 'The filename of the design.'
field :full_path, GraphQL::STRING_TYPE, null: false, description: 'The full path to the design file.'
field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent], description: 'The URL of the full-sized image.'
field :image_v432x230, GraphQL::STRING_TYPE, null: true, extras: [:parent],
field :filename, GraphQL::Types::String, null: false, description: 'The filename of the design.'
field :full_path, GraphQL::Types::String, null: false, description: 'The full path to the design file.'
field :image, GraphQL::Types::String, null: false, extras: [:parent], description: 'The URL of the full-sized image.'
field :image_v432x230, GraphQL::Types::String, null: true, extras: [:parent],
description: 'The URL of the design resized to fit within the bounds of 432x230. ' \
'This will be `null` if the image has not been generated'
field :diff_refs, Types::DiffRefsType,
......@@ -26,7 +26,7 @@ module Types
extras: [:parent],
description: 'How this design was changed in the current version.'
field :notes_count,
GraphQL::INT_TYPE,
GraphQL::Types::Int,
null: false,
method: :user_notes_count,
description: 'The total count of user-created notes for this design.'
......
......@@ -11,9 +11,9 @@ module Types
authorize :read_design
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the design version.'
field :sha, GraphQL::ID_TYPE, null: false,
field :sha, GraphQL::Types::ID, null: false,
description: 'SHA of the design version.'
field :designs,
......
......@@ -2,9 +2,9 @@
module Types
class DiffPathsInputType < BaseInputObject
argument :old_path, GraphQL::STRING_TYPE, required: false,
argument :old_path, GraphQL::Types::String, required: false,
description: 'The path of the file on the start sha.'
argument :new_path, GraphQL::STRING_TYPE, required: false,
argument :new_path, GraphQL::Types::String, required: false,
description: 'The path of the file on the head sha.'
end
end
......@@ -6,11 +6,11 @@ module Types
class DiffRefsType < BaseObject
graphql_name 'DiffRefs'
field :head_sha, GraphQL::STRING_TYPE, null: false,
field :head_sha, GraphQL::Types::String, null: false,
description: 'SHA of the HEAD at the time the comment was made.'
field :base_sha, GraphQL::STRING_TYPE, null: true,
field :base_sha, GraphQL::Types::String, null: true,
description: 'Merge base of the branch the comment was made on.'
field :start_sha, GraphQL::STRING_TYPE, null: false,
field :start_sha, GraphQL::Types::String, null: false,
description: 'SHA of the branch being compared against.'
end
# rubocop: enable Graphql/AuthorizeTypes
......
......@@ -8,13 +8,13 @@ module Types
description 'Aggregated summary of changes'
field :additions, GraphQL::INT_TYPE, null: false,
field :additions, GraphQL::Types::Int, null: false,
description: 'Number of lines added.'
field :deletions, GraphQL::INT_TYPE, null: false,
field :deletions, GraphQL::Types::Int, null: false,
description: 'Number of lines deleted.'
field :changes, GraphQL::INT_TYPE, null: false,
field :changes, GraphQL::Types::Int, null: false,
description: 'Number of lines changed.'
field :file_count, GraphQL::INT_TYPE, null: false,
field :file_count, GraphQL::Types::Int, null: false,
description: 'Number of files changed.'
def changes
......
......@@ -8,11 +8,11 @@ module Types
description 'Changes to a single file'
field :path, GraphQL::STRING_TYPE, null: false,
field :path, GraphQL::Types::String, null: false,
description: 'File path, relative to repository root.'
field :additions, GraphQL::INT_TYPE, null: false,
field :additions, GraphQL::Types::Int, null: false,
description: 'Number of lines added to this file.'
field :deletions, GraphQL::INT_TYPE, null: false,
field :deletions, GraphQL::Types::Int, null: false,
description: 'Number of lines deleted from this file.'
end
# rubocop: enable Graphql/AuthorizeTypes
......
......@@ -9,16 +9,16 @@ module Types
authorize :read_environment
field :name, GraphQL::STRING_TYPE, null: false,
field :name, GraphQL::Types::String, null: false,
description: 'Human-readable name of the environment.'
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the environment.'
field :state, GraphQL::STRING_TYPE, null: false,
field :state, GraphQL::Types::String, null: false,
description: 'State of the environment, for example: available/stopped.'
field :path, GraphQL::STRING_TYPE, null: false,
field :path, GraphQL::Types::String, null: false,
description: 'The path to the environment.'
field :metrics_dashboard, Types::Metrics::DashboardType, null: true,
......
......@@ -10,23 +10,23 @@ module Types
authorize :read_sentry_issue
field :id, GraphQL::ID_TYPE,
field :id, GraphQL::Types::ID,
null: false,
description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE,
field :sentry_id, GraphQL::Types::String,
method: :id,
null: false,
description: 'ID (Sentry ID) of the error.'
field :title, GraphQL::STRING_TYPE,
field :title, GraphQL::Types::String,
null: false,
description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE,
field :type, GraphQL::Types::String,
null: false,
description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE,
field :user_count, GraphQL::Types::Int,
null: false,
description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE,
field :count, GraphQL::Types::Int,
null: false,
description: 'Count of occurrences.'
field :first_seen, Types::TimeType,
......@@ -35,31 +35,31 @@ module Types
field :last_seen, Types::TimeType,
null: false,
description: 'Timestamp when the error was last seen.'
field :message, GraphQL::STRING_TYPE,
field :message, GraphQL::Types::String,
null: true,
description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE,
field :culprit, GraphQL::Types::String,
null: false,
description: 'Culprit of the error.'
field :external_base_url, GraphQL::STRING_TYPE,
field :external_base_url, GraphQL::Types::String,
null: false,
description: 'External Base URL of the Sentry Instance.'
field :external_url, GraphQL::STRING_TYPE,
field :external_url, GraphQL::Types::String,
null: false,
description: 'External URL of the error.'
field :sentry_project_id, GraphQL::ID_TYPE,
field :sentry_project_id, GraphQL::Types::ID,
method: :project_id,
null: false,
description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE,
field :sentry_project_name, GraphQL::Types::String,
method: :project_name,
null: false,
description: 'Name of the project affected by the error.'
field :sentry_project_slug, GraphQL::STRING_TYPE,
field :sentry_project_slug, GraphQL::Types::String,
method: :project_slug,
null: false,
description: 'Slug of the project affected by the error.'
field :short_id, GraphQL::STRING_TYPE,
field :short_id, GraphQL::Types::String,
null: false,
description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum,
......@@ -68,31 +68,31 @@ module Types
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false,
description: 'Last 24hr stats of the error.'
field :first_release_last_commit, GraphQL::STRING_TYPE,
field :first_release_last_commit, GraphQL::Types::String,
null: true,
description: 'Commit the error was first seen.'
field :last_release_last_commit, GraphQL::STRING_TYPE,
field :last_release_last_commit, GraphQL::Types::String,
null: true,
description: 'Commit the error was last seen.'
field :first_release_short_version, GraphQL::STRING_TYPE,
field :first_release_short_version, GraphQL::Types::String,
null: true,
description: 'Release short version the error was first seen.'
field :last_release_short_version, GraphQL::STRING_TYPE,
field :last_release_short_version, GraphQL::Types::String,
null: true,
description: 'Release short version the error was last seen.'
field :first_release_version, GraphQL::STRING_TYPE,
field :first_release_version, GraphQL::Types::String,
null: true,
description: 'Release version the error was first seen.'
field :last_release_version, GraphQL::STRING_TYPE,
field :last_release_version, GraphQL::Types::String,
null: true,
description: 'Release version the error was last seen.'
field :gitlab_commit, GraphQL::STRING_TYPE,
field :gitlab_commit, GraphQL::Types::String,
null: true,
description: 'GitLab commit SHA attributed to the Error based on the release version.'
field :gitlab_commit_path, GraphQL::STRING_TYPE,
field :gitlab_commit_path, GraphQL::Types::String,
null: true,
description: 'Path to the GitLab page for the GitLab commit attributed to the error.'
field :gitlab_issue_path, GraphQL::STRING_TYPE,
field :gitlab_issue_path, GraphQL::Types::String,
method: :gitlab_issue,
null: true,
description: 'URL of GitLab Issue.'
......
......@@ -18,7 +18,7 @@ module Types
description: 'Stack Trace of Sentry Error.',
resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver
field :external_url,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
null: true,
description: "External URL for Sentry."
end
......
......@@ -9,7 +9,7 @@ module Types
field :time, Types::TimeType,
null: false,
description: "Time the error frequency stats were recorded."
field :count, GraphQL::INT_TYPE,
field :count, GraphQL::Types::Int,
null: false,
description: "Count of errors received since the previously recorded time."
end
......
......@@ -8,11 +8,11 @@ module Types
description 'An object context for a Sentry error stack trace'
field :line,
GraphQL::INT_TYPE,
GraphQL::Types::Int,
null: false,
description: 'Line number of the context.'
field :code,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
null: false,
description: 'Code number of the context.'
......
......@@ -7,16 +7,16 @@ module Types
graphql_name 'SentryErrorStackTraceEntry'
description 'An object containing a stack trace entry for a Sentry error'
field :function, GraphQL::STRING_TYPE,
field :function, GraphQL::Types::String,
null: true,
description: 'Function in which the Sentry error occurred.'
field :col, GraphQL::STRING_TYPE,
field :col, GraphQL::Types::String,
null: true,
description: 'Function in which the Sentry error occurred.'
field :line, GraphQL::STRING_TYPE,
field :line, GraphQL::Types::String,
null: true,
description: 'Function in which the Sentry error occurred.'
field :file_name, GraphQL::STRING_TYPE,
field :file_name, GraphQL::Types::String,
null: true,
description: 'File in which the Sentry error occurred.'
field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType],
......
......@@ -8,10 +8,10 @@ module Types
authorize :read_sentry_issue
field :issue_id, GraphQL::STRING_TYPE,
field :issue_id, GraphQL::Types::String,
null: false,
description: 'ID of the Sentry error.'
field :date_received, GraphQL::STRING_TYPE,
field :date_received, GraphQL::Types::String,
null: false,
description: 'Time the stack trace was received by Sentry.'
field :stack_trace_entries, [Types::ErrorTracking::SentryErrorStackTraceEntryType],
......
......@@ -7,10 +7,10 @@ module Types
graphql_name 'SentryErrorTags'
description 'State of a Sentry error'
field :level, GraphQL::STRING_TYPE,
field :level, GraphQL::Types::String,
null: true,
description: "Severity level of the Sentry Error."
field :logger, GraphQL::STRING_TYPE,
field :logger, GraphQL::Types::String,
null: true,
description: "Logger of the Sentry Error."
end
......
......@@ -9,10 +9,10 @@ module Types
present_using SentryErrorPresenter
field :id, GraphQL::ID_TYPE,
field :id, GraphQL::Types::ID,
null: false,
description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE,
field :sentry_id, GraphQL::Types::String,
method: :id,
null: false,
description: 'ID (Sentry ID) of the error.'
......@@ -22,28 +22,28 @@ module Types
field :last_seen, Types::TimeType,
null: false,
description: 'Timestamp when the error was last seen.'
field :title, GraphQL::STRING_TYPE,
field :title, GraphQL::Types::String,
null: false,
description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE,
field :type, GraphQL::Types::String,
null: false,
description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE,
field :user_count, GraphQL::Types::Int,
null: false,
description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE,
field :count, GraphQL::Types::Int,
null: false,
description: 'Count of occurrences.'
field :message, GraphQL::STRING_TYPE,
field :message, GraphQL::Types::String,
null: true,
description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE,
field :culprit, GraphQL::Types::String,
null: false,
description: 'Culprit of the error.'
field :external_url, GraphQL::STRING_TYPE,
field :external_url, GraphQL::Types::String,
null: false,
description: 'External URL of the error.'
field :short_id, GraphQL::STRING_TYPE,
field :short_id, GraphQL::Types::String,
null: false,
description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum,
......@@ -52,15 +52,15 @@ module Types
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false,
description: 'Last 24hr stats of the error.'
field :sentry_project_id, GraphQL::ID_TYPE,
field :sentry_project_id, GraphQL::Types::ID,
method: :project_id,
null: false,
description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE,
field :sentry_project_name, GraphQL::Types::String,
method: :project_name,
null: false,
description: 'Name of the project affected by the error.'
field :sentry_project_slug, GraphQL::STRING_TYPE,
field :sentry_project_slug, GraphQL::Types::String,
method: :project_slug,
null: false,
description: 'Slug of the project affected by the error.'
......
......@@ -9,7 +9,7 @@ module Types
authorize :read_event
field :id, GraphQL::ID_TYPE,
field :id, GraphQL::Types::ID,
description: 'ID of the event.',
null: false
......
......@@ -9,11 +9,11 @@ module Types
present_using Releases::EvidencePresenter
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the evidence.'
field :sha, GraphQL::STRING_TYPE, null: true,
field :sha, GraphQL::Types::String, null: true,
description: 'SHA1 ID of the evidence hash.'
field :filepath, GraphQL::STRING_TYPE, null: true,
field :filepath, GraphQL::Types::String, null: true,
description: 'URL from where the evidence can be downloaded.'
field :collected_at, Types::TimeType, null: true,
description: 'Timestamp when the evidence was collected.'
......
......@@ -6,11 +6,11 @@ module Types
authorize :admin_operations
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'Internal ID of the Grafana integration.'
field :grafana_url, GraphQL::STRING_TYPE, null: false,
field :grafana_url, GraphQL::Types::String, null: false,
description: 'URL for the Grafana host for the Grafana integration.'
field :enabled, GraphQL::BOOLEAN_TYPE, null: false,
field :enabled, GraphQL::Types::Boolean, null: false,
description: 'Indicates whether Grafana integration is enabled.'
field :created_at, Types::TimeType, null: false,
description: 'Timestamp of the issue\'s creation.'
......
......@@ -9,12 +9,12 @@ module Types
expose_permissions Types::PermissionTypes::Group
field :web_url,
type: GraphQL::STRING_TYPE,
type: GraphQL::Types::String,
null: false,
description: 'Web URL of the group.'
field :avatar_url,
type: GraphQL::STRING_TYPE,
type: GraphQL::Types::String,
null: true,
description: 'Avatar URL of the group.'
......@@ -25,42 +25,42 @@ module Types
feature_flag: :custom_emoji
field :share_with_group_lock,
type: GraphQL::BOOLEAN_TYPE,
type: GraphQL::Types::Boolean,
null: true,
description: 'Indicates if sharing a project with another group within this group is prevented.'
field :project_creation_level,
type: GraphQL::STRING_TYPE,
type: GraphQL::Types::String,
null: true,
method: :project_creation_level_str,
description: 'The permission level required to create projects in the group.'
field :subgroup_creation_level,
type: GraphQL::STRING_TYPE,
type: GraphQL::Types::String,
null: true,
method: :subgroup_creation_level_str,
description: 'The permission level required to create subgroups within the group.'
field :require_two_factor_authentication,
type: GraphQL::BOOLEAN_TYPE,
type: GraphQL::Types::Boolean,
null: true,
description: 'Indicates if all users in this group are required to set up two-factor authentication.'
field :two_factor_grace_period,
type: GraphQL::INT_TYPE,
type: GraphQL::Types::Int,
null: true,
description: 'Time before two-factor authentication is enforced.'
field :auto_devops_enabled,
type: GraphQL::BOOLEAN_TYPE,
type: GraphQL::Types::Boolean,
null: true,
description: 'Indicates whether Auto DevOps is enabled for all projects within this group.'
field :emails_disabled,
type: GraphQL::BOOLEAN_TYPE,
type: GraphQL::Types::Boolean,
null: true,
description: 'Indicates if a group has email notifications disabled.'
field :mentions_disabled,
type: GraphQL::BOOLEAN_TYPE,
type: GraphQL::Types::Boolean,
null: true,
description: 'Indicates if a group is disabled from getting mentioned.'
......@@ -103,7 +103,7 @@ module Types
null: true,
description: 'A label available on this group.' do
argument :title,
type: GraphQL::STRING_TYPE,
type: GraphQL::Types::String,
required: true,
description: 'Title of the label.'
end
......@@ -120,7 +120,7 @@ module Types
authorize: :read_container_image
field :container_repositories_count,
type: GraphQL::INT_TYPE,
type: GraphQL::Types::Int,
null: false,
description: 'Number of container repositories in the group.'
......
......@@ -4,7 +4,7 @@ module Types
module InvitationInterface
include BaseInterface
field :email, GraphQL::STRING_TYPE, null: false,
field :email, GraphQL::Types::String, null: false,
description: 'Email of the member to invite.'
field :access_level, Types::AccessLevelType, null: true,
......
......@@ -15,7 +15,7 @@ module Types
next unless available_issue_states.include?(state.downcase)
field state,
GraphQL::INT_TYPE,
GraphQL::Types::Int,
null: true,
description: "Number of issues with status #{state.upcase} for the project"
end
......
......@@ -15,23 +15,23 @@ module Types
present_using IssuePresenter
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: "ID of the issue."
field :iid, GraphQL::ID_TYPE, null: false,
field :iid, GraphQL::Types::ID, null: false,
description: "Internal ID of the issue."
field :title, GraphQL::STRING_TYPE, null: false,
field :title, GraphQL::Types::String, null: false,
description: 'Title of the issue.'
markdown_field :title_html, null: true
field :description, GraphQL::STRING_TYPE, null: true,
field :description, GraphQL::Types::String, null: true,
description: 'Description of the issue.'
markdown_field :description_html, null: true
field :state, IssueStateEnum, null: false,
description: 'State of the issue.'
field :reference, GraphQL::STRING_TYPE, null: false,
field :reference, GraphQL::Types::String, null: false,
description: 'Internal reference of the issue. Returned in shortened format by default.',
method: :to_reference do
argument :full, GraphQL::BOOLEAN_TYPE, required: false, default_value: false,
argument :full, GraphQL::Types::Boolean, required: false, default_value: false,
description: 'Boolean option specifying whether the reference should be returned in full.'
end
......@@ -51,42 +51,42 @@ module Types
field :due_date, Types::TimeType, null: true,
description: 'Due date of the issue.'
field :confidential, GraphQL::BOOLEAN_TYPE, null: false,
field :confidential, GraphQL::Types::Boolean, null: false,
description: 'Indicates the issue is confidential.'
field :discussion_locked, GraphQL::BOOLEAN_TYPE, null: false,
field :discussion_locked, GraphQL::Types::Boolean, null: false,
description: 'Indicates discussion is locked on the issue.'
field :upvotes, GraphQL::INT_TYPE, null: false,
field :upvotes, GraphQL::Types::Int, null: false,
description: 'Number of upvotes the issue has received.'
field :downvotes, GraphQL::INT_TYPE, null: false,
field :downvotes, GraphQL::Types::Int, null: false,
description: 'Number of downvotes the issue has received.'
field :user_notes_count, GraphQL::INT_TYPE, null: false,
field :user_notes_count, GraphQL::Types::Int, null: false,
description: 'Number of user notes of the issue.',
resolver: Resolvers::UserNotesCountResolver
field :user_discussions_count, GraphQL::INT_TYPE, null: false,
field :user_discussions_count, GraphQL::Types::Int, null: false,
description: 'Number of user discussions in the issue.',
resolver: Resolvers::UserDiscussionsCountResolver
field :web_path, GraphQL::STRING_TYPE, null: false, method: :issue_path,
field :web_path, GraphQL::Types::String, null: false, method: :issue_path,
description: 'Web path of the issue.'
field :web_url, GraphQL::STRING_TYPE, null: false,
field :web_url, GraphQL::Types::String, null: false,
description: 'Web URL of the issue.'
field :relative_position, GraphQL::INT_TYPE, null: true,
field :relative_position, GraphQL::Types::Int, null: true,
description: 'Relative position of the issue (used for positioning in epic tree and issue boards).'
field :participants, Types::UserType.connection_type, null: true, complexity: 5,
description: 'List of participants in the issue.'
field :emails_disabled, GraphQL::BOOLEAN_TYPE, null: false,
field :emails_disabled, GraphQL::Types::Boolean, null: false,
method: :project_emails_disabled?,
description: 'Indicates if a project has email notifications disabled: `true` if email notifications are disabled.'
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
field :subscribed, GraphQL::Types::Boolean, method: :subscribed?, null: false, complexity: 5,
description: 'Indicates the currently logged in user is subscribed to the issue.'
field :time_estimate, GraphQL::INT_TYPE, null: false,
field :time_estimate, GraphQL::Types::Int, null: false,
description: 'Time estimate of the issue.'
field :total_time_spent, GraphQL::INT_TYPE, null: false,
field :total_time_spent, GraphQL::Types::Int, null: false,
description: 'Total time reported as spent on the issue.'
field :human_time_estimate, GraphQL::STRING_TYPE, null: true,
field :human_time_estimate, GraphQL::Types::String, null: true,
description: 'Human-readable time estimate of the issue.'
field :human_total_time_spent, GraphQL::STRING_TYPE, null: true,
field :human_total_time_spent, GraphQL::Types::String, null: true,
description: 'Human-readable total time reported as spent on the issue.'
field :closed_at, Types::TimeType, null: true,
......@@ -115,19 +115,19 @@ module Types
field :severity, Types::IssuableSeverityEnum, null: true,
description: 'Severity level of the incident.'
field :moved, GraphQL::BOOLEAN_TYPE, method: :moved?, null: true,
field :moved, GraphQL::Types::Boolean, method: :moved?, null: true,
description: 'Indicates if issue got moved from other project.'
field :moved_to, Types::IssueType, null: true,
description: 'Updated Issue after it got moved to another project.'
field :create_note_email, GraphQL::STRING_TYPE, null: true,
field :create_note_email, GraphQL::Types::String, null: true,
description: 'User specific email address for the issue.'
field :timelogs, Types::TimelogType.connection_type, null: false,
description: 'Timelogs on the issue.'
field :project_id, GraphQL::INT_TYPE, null: false, method: :project_id,
field :project_id, GraphQL::Types::Int, null: false, method: :project_id,
description: 'ID of the issue project.'
def author
......
......@@ -5,19 +5,19 @@ module Types
class NegatedIssueFilterInputType < BaseInputObject
graphql_name 'NegatedIssueFilterInput'
argument :iids, [GraphQL::STRING_TYPE],
argument :iids, [GraphQL::Types::String],
required: false,
description: 'List of IIDs of issues to exclude. For example, `[1, 2]`.'
argument :label_name, [GraphQL::STRING_TYPE],
argument :label_name, [GraphQL::Types::String],
required: false,
description: 'Labels not applied to this issue.'
argument :milestone_title, [GraphQL::STRING_TYPE],
argument :milestone_title, [GraphQL::Types::String],
required: false,
description: 'Milestone not applied to this issue.'
argument :assignee_usernames, [GraphQL::STRING_TYPE],
argument :assignee_usernames, [GraphQL::Types::String],
required: false,
description: 'Usernames of users not assigned to the issue.'
argument :assignee_id, GraphQL::STRING_TYPE,
argument :assignee_id, GraphQL::Types::String,
required: false,
description: 'ID of a user not assigned to the issues.'
end
......
......@@ -12,13 +12,13 @@ module Types
description: 'Timestamp of when the Jira import was scheduled.'
field :scheduled_by, Types::UserType, null: true,
description: 'User that started the Jira import.'
field :jira_project_key, GraphQL::STRING_TYPE, null: false,
field :jira_project_key, GraphQL::Types::String, null: false,
description: 'Project key for the imported Jira project.'
field :imported_issues_count, GraphQL::INT_TYPE, null: false,
field :imported_issues_count, GraphQL::Types::Int, null: false,
description: 'Count of issues that were successfully imported.'
field :failed_to_import_count, GraphQL::INT_TYPE, null: false,
field :failed_to_import_count, GraphQL::Types::Int, null: false,
description: 'Count of issues that failed to import.'
field :total_issue_count, GraphQL::INT_TYPE, null: false,
field :total_issue_count, GraphQL::Types::Int, null: false,
description: 'Total count of issues that were attempted to import.'
end
# rubocop: enable Graphql/AuthorizeTypes
......
......@@ -6,17 +6,17 @@ module Types
class JiraUserType < BaseObject
graphql_name 'JiraUser'
field :jira_account_id, GraphQL::STRING_TYPE, null: false,
field :jira_account_id, GraphQL::Types::String, null: false,
description: 'Account ID of the Jira user.'
field :jira_display_name, GraphQL::STRING_TYPE, null: false,
field :jira_display_name, GraphQL::Types::String, null: false,
description: 'Display name of the Jira user.'
field :jira_email, GraphQL::STRING_TYPE, null: true,
field :jira_email, GraphQL::Types::String, null: true,
description: 'Email of the Jira user, returned only for users with public emails.'
field :gitlab_id, GraphQL::INT_TYPE, null: true,
field :gitlab_id, GraphQL::Types::Int, null: true,
description: 'ID of the matched GitLab user.'
field :gitlab_username, GraphQL::STRING_TYPE, null: true,
field :gitlab_username, GraphQL::Types::String, null: true,
description: 'Username of the matched GitLab user.'
field :gitlab_name, GraphQL::STRING_TYPE, null: true,
field :gitlab_name, GraphQL::Types::String, null: true,
description: 'Name of the matched GitLab user.'
end
# rubocop: enable Graphql/AuthorizeTypes
......
......@@ -5,11 +5,11 @@ module Types
graphql_name 'JiraUsersMappingInputType'
argument :jira_account_id,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
required: true,
description: 'Jira account ID of the user.'
argument :gitlab_id,
GraphQL::INT_TYPE,
GraphQL::Types::Int,
required: false,
description: 'ID of the GitLab user.'
end
......
......@@ -8,16 +8,16 @@ module Types
authorize :read_label
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'Label ID.'
field :description, GraphQL::STRING_TYPE, null: true,
field :description, GraphQL::Types::String, null: true,
description: 'Description of the label (Markdown rendered as HTML for caching).'
markdown_field :description_html, null: true
field :title, GraphQL::STRING_TYPE, null: false,
field :title, GraphQL::Types::String, null: false,
description: 'Content of the label.'
field :color, GraphQL::STRING_TYPE, null: false,
field :color, GraphQL::Types::String, null: false,
description: 'Background color of the label.'
field :text_color, GraphQL::STRING_TYPE, null: false,
field :text_color, GraphQL::Types::String, null: false,
description: 'Text color of the label.'
field :created_at, Types::TimeType, null: false,
description: 'When this label was created.'
......
......@@ -4,7 +4,7 @@ module Types
module MemberInterface
include BaseInterface
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the member.'
field :access_level, Types::AccessLevelType, null: true,
......
This diff is collapsed.
......@@ -7,11 +7,11 @@ module Types
authorize :read_instance_metadata
field :enabled, GraphQL::BOOLEAN_TYPE, null: false,
field :enabled, GraphQL::Types::Boolean, null: false,
description: 'Indicates whether the Kubernetes Agent Server is enabled.'
field :version, GraphQL::STRING_TYPE, null: true,
field :version, GraphQL::Types::String, null: true,
description: 'KAS version.'
field :external_url, GraphQL::STRING_TYPE, null: true,
field :external_url, GraphQL::Types::String, null: true,
description: 'The URL used by the Agents to communicate with KAS.'
end
end
......
......@@ -6,9 +6,9 @@ module Types
authorize :read_instance_metadata
field :version, GraphQL::STRING_TYPE, null: false,
field :version, GraphQL::Types::String, null: false,
description: 'Version.'
field :revision, GraphQL::STRING_TYPE, null: false,
field :revision, GraphQL::Types::String, null: false,
description: 'Revision.'
field :kas, ::Types::Metadata::KasType, null: false,
description: 'Metadata about KAS.'
......
......@@ -7,10 +7,10 @@ module Types
class DashboardType < ::Types::BaseObject
graphql_name 'MetricsDashboard'
field :path, GraphQL::STRING_TYPE, null: true,
field :path, GraphQL::Types::String, null: true,
description: 'Path to a file with the dashboard definition.'
field :schema_validation_warnings, [GraphQL::STRING_TYPE], null: true,
field :schema_validation_warnings, [GraphQL::Types::String], null: true,
description: 'Dashboard schema validation warnings.'
field :annotations, Types::Metrics::Dashboards::AnnotationType.connection_type, null: true,
......
......@@ -7,13 +7,13 @@ module Types
authorize :read_metrics_dashboard_annotation
graphql_name 'MetricsDashboardAnnotation'
field :description, GraphQL::STRING_TYPE, null: true,
field :description, GraphQL::Types::String, null: true,
description: 'Description of the annotation.'
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the annotation.'
field :panel_id, GraphQL::STRING_TYPE, null: true,
field :panel_id, GraphQL::Types::String, null: true,
description: 'ID of a dashboard panel to which the annotation should be scoped.'
field :starting_at, Types::TimeType, null: true,
......
......@@ -7,10 +7,10 @@ module Types
authorize :read_milestone
field :total_issues_count, GraphQL::INT_TYPE, null: true,
field :total_issues_count, GraphQL::Types::Int, null: true,
description: 'Total number of issues associated with the milestone.'
field :closed_issues_count, GraphQL::INT_TYPE, null: true,
field :closed_issues_count, GraphQL::Types::Int, null: true,
description: 'Number of closed issues associated with the milestone.'
end
end
......@@ -11,25 +11,25 @@ module Types
alias_method :milestone, :object
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the milestone.'
field :iid, GraphQL::ID_TYPE, null: false,
field :iid, GraphQL::Types::ID, null: false,
description: "Internal ID of the milestone."
field :title, GraphQL::STRING_TYPE, null: false,
field :title, GraphQL::Types::String, null: false,
description: 'Title of the milestone.'
field :description, GraphQL::STRING_TYPE, null: true,
field :description, GraphQL::Types::String, null: true,
description: 'Description of the milestone.'
field :state, Types::MilestoneStateEnum, null: false,
description: 'State of the milestone.'
field :expired, GraphQL::BOOLEAN_TYPE, null: false,
field :expired, GraphQL::Types::Boolean, null: false,
description: 'Expired state of the milestone (a milestone is expired when the due date is past the current date). Defaults to `false` when due date has not been set.'
field :web_path, GraphQL::STRING_TYPE, null: false, method: :milestone_path,
field :web_path, GraphQL::Types::String, null: false, method: :milestone_path,
description: 'Web path of the milestone.'
field :due_date, Types::TimeType, null: true,
......@@ -44,15 +44,15 @@ module Types
field :updated_at, Types::TimeType, null: false,
description: 'Timestamp of last milestone update.'
field :project_milestone, GraphQL::BOOLEAN_TYPE, null: false,
field :project_milestone, GraphQL::Types::Boolean, null: false,
description: 'Indicates if milestone is at project level.',
method: :project_milestone?
field :group_milestone, GraphQL::BOOLEAN_TYPE, null: false,
field :group_milestone, GraphQL::Types::Boolean, null: false,
description: 'Indicates if milestone is at group level.',
method: :group_milestone?
field :subgroup_milestone, GraphQL::BOOLEAN_TYPE, null: false,
field :subgroup_milestone, GraphQL::Types::Boolean, null: false,
description: 'Indicates if milestone is at subgroup level.',
method: :subgroup_milestone?
......
......@@ -8,9 +8,9 @@ module Types
authorize :read_package_settings
field :maven_duplicates_allowed, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether duplicate Maven packages are allowed for this namespace.'
field :maven_duplicates_allowed, GraphQL::Types::Boolean, null: false, description: 'Indicates whether duplicate Maven packages are allowed for this namespace.'
field :maven_duplicate_exception_regex, Types::UntrustedRegexp, null: true, description: 'When maven_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect.'
field :generic_duplicates_allowed, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether duplicate generic packages are allowed for this namespace.'
field :generic_duplicates_allowed, GraphQL::Types::Boolean, null: false, description: 'Indicates whether duplicate generic packages are allowed for this namespace.'
field :generic_duplicate_exception_regex, Types::UntrustedRegexp, null: true, description: 'When generic_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect.'
end
end
......@@ -6,27 +6,27 @@ module Types
authorize :read_namespace
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the namespace.'
field :name, GraphQL::STRING_TYPE, null: false,
field :name, GraphQL::Types::String, null: false,
description: 'Name of the namespace.'
field :path, GraphQL::STRING_TYPE, null: false,
field :path, GraphQL::Types::String, null: false,
description: 'Path of the namespace.'
field :full_name, GraphQL::STRING_TYPE, null: false,
field :full_name, GraphQL::Types::String, null: false,
description: 'Full name of the namespace.'
field :full_path, GraphQL::ID_TYPE, null: false,
field :full_path, GraphQL::Types::ID, null: false,
description: 'Full path of the namespace.'
field :description, GraphQL::STRING_TYPE, null: true,
field :description, GraphQL::Types::String, null: true,
description: 'Description of the namespace.'
markdown_field :description_html, null: true
field :visibility, GraphQL::STRING_TYPE, null: true,
field :visibility, GraphQL::Types::String, null: true,
description: 'Visibility of the namespace.'
field :lfs_enabled, GraphQL::BOOLEAN_TYPE, null: true, method: :lfs_enabled?,
field :lfs_enabled, GraphQL::Types::Boolean, null: true, method: :lfs_enabled?,
description: 'Indicates if Large File Storage (LFS) is enabled for namespace.'
field :request_access_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :request_access_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if users can request access to namespace.'
field :root_storage_statistics, Types::RootStorageStatisticsType,
......
......@@ -5,13 +5,13 @@ module Types
class DiffImagePositionInputType < DiffPositionBaseInputType
graphql_name 'DiffImagePositionInput'
argument :x, GraphQL::INT_TYPE, required: true,
argument :x, GraphQL::Types::Int, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :x)
argument :y, GraphQL::INT_TYPE, required: true,
argument :y, GraphQL::Types::Int, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :y)
argument :width, GraphQL::INT_TYPE, required: true,
argument :width, GraphQL::Types::Int, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :width)
argument :height, GraphQL::INT_TYPE, required: true,
argument :height, GraphQL::Types::Int, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :height)
end
end
......
......@@ -3,11 +3,11 @@
module Types
module Notes
class DiffPositionBaseInputType < BaseInputObject
argument :head_sha, GraphQL::STRING_TYPE, required: true,
argument :head_sha, GraphQL::Types::String, required: true,
description: copy_field_description(Types::DiffRefsType, :head_sha)
argument :base_sha, GraphQL::STRING_TYPE, required: false,
argument :base_sha, GraphQL::Types::String, required: false,
description: copy_field_description(Types::DiffRefsType, :base_sha)
argument :start_sha, GraphQL::STRING_TYPE, required: true,
argument :start_sha, GraphQL::Types::String, required: true,
description: copy_field_description(Types::DiffRefsType, :start_sha)
argument :paths,
......
......@@ -5,9 +5,9 @@ module Types
class DiffPositionInputType < DiffPositionBaseInputType
graphql_name 'DiffPositionInput'
argument :old_line, GraphQL::INT_TYPE, required: false,
argument :old_line, GraphQL::Types::Int, required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :old_line)
argument :new_line, GraphQL::INT_TYPE, required: false,
argument :new_line, GraphQL::Types::Int, required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :new_line)
end
end
......
......@@ -10,29 +10,29 @@ module Types
field :diff_refs, Types::DiffRefsType, null: false,
description: 'Information about the branch, HEAD, and base at the time of commenting.'
field :file_path, GraphQL::STRING_TYPE, null: false,
field :file_path, GraphQL::Types::String, null: false,
description: 'Path of the file that was changed.'
field :old_path, GraphQL::STRING_TYPE, null: true,
field :old_path, GraphQL::Types::String, null: true,
description: 'Path of the file on the start SHA.'
field :new_path, GraphQL::STRING_TYPE, null: true,
field :new_path, GraphQL::Types::String, null: true,
description: 'Path of the file on the HEAD SHA.'
field :position_type, Types::Notes::PositionTypeEnum, null: false,
description: 'Type of file the position refers to.'
# Fields for text positions
field :old_line, GraphQL::INT_TYPE, null: true,
field :old_line, GraphQL::Types::Int, null: true,
description: 'Line on start SHA that was changed.'
field :new_line, GraphQL::INT_TYPE, null: true,
field :new_line, GraphQL::Types::Int, null: true,
description: 'Line on HEAD SHA that was changed.'
# Fields for image positions
field :x, GraphQL::INT_TYPE, null: true,
field :x, GraphQL::Types::Int, null: true,
description: 'X position of the note.'
field :y, GraphQL::INT_TYPE, null: true,
field :y, GraphQL::Types::Int, null: true,
description: 'Y position of the note.'
field :width, GraphQL::INT_TYPE, null: true,
field :width, GraphQL::Types::Int, null: true,
description: 'Total width of the image.'
field :height, GraphQL::INT_TYPE, null: true,
field :height, GraphQL::Types::Int, null: true,
description: 'Total height of the image.'
def old_line
......
......@@ -22,13 +22,13 @@ module Types
null: false,
description: 'User who wrote this note.'
field :system, GraphQL::BOOLEAN_TYPE,
field :system, GraphQL::Types::Boolean,
null: false,
description: 'Indicates whether this note was created by the system or by a user.'
field :system_note_icon_name, GraphQL::STRING_TYPE, null: true,
field :system_note_icon_name, GraphQL::Types::String, null: true,
description: 'Name of the icon corresponding to a system note.'
field :body, GraphQL::STRING_TYPE,
field :body, GraphQL::Types::String,
null: false,
method: :note,
description: 'Content of the note.'
......@@ -43,10 +43,10 @@ module Types
description: 'The discussion this note is a part of.'
field :position, Types::Notes::DiffPositionType, null: true,
description: 'The position of this note on a diff.'
field :confidential, GraphQL::BOOLEAN_TYPE, null: true,
field :confidential, GraphQL::Types::Boolean, null: true,
description: 'Indicates if this note is confidential.',
method: :confidential?
field :url, GraphQL::STRING_TYPE,
field :url, GraphQL::Types::String,
null: true,
description: 'URL to view this Note in the Web UI.'
......
......@@ -6,19 +6,19 @@ module Types
class UpdateDiffImagePositionInputType < BaseInputObject
graphql_name 'UpdateDiffImagePositionInput'
argument :x, GraphQL::INT_TYPE,
argument :x, GraphQL::Types::Int,
required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :x)
argument :y, GraphQL::INT_TYPE,
argument :y, GraphQL::Types::Int,
required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :y)
argument :width, GraphQL::INT_TYPE,
argument :width, GraphQL::Types::Int,
required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :width)
argument :height, GraphQL::INT_TYPE,
argument :height, GraphQL::Types::Int,
required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :height)
......
......@@ -8,10 +8,10 @@ module Types
graphql_name 'PackageComposerJsonType'
description 'Represents a composer JSON file'
field :name, GraphQL::STRING_TYPE, null: true, description: 'The name set in the Composer JSON file.'
field :type, GraphQL::STRING_TYPE, null: true, description: 'The type set in the Composer JSON file.'
field :license, GraphQL::STRING_TYPE, null: true, description: 'The license set in the Composer JSON file.'
field :version, GraphQL::STRING_TYPE, null: true, description: 'The version set in the Composer JSON file.'
field :name, GraphQL::Types::String, null: true, description: 'The name set in the Composer JSON file.'
field :type, GraphQL::Types::String, null: true, description: 'The type set in the Composer JSON file.'
field :license, GraphQL::Types::String, null: true, description: 'The license set in the Composer JSON file.'
field :version, GraphQL::Types::String, null: true, description: 'The version set in the Composer JSON file.'
end
end
end
......
......@@ -9,7 +9,7 @@ module Types
authorize :read_package
field :target_sha, GraphQL::STRING_TYPE, null: false, description: 'Target SHA of the package.'
field :target_sha, GraphQL::Types::String, null: false, description: 'Target SHA of the package.'
field :composer_json, Types::Packages::Composer::JsonType, null: false, description: 'Data of the Composer JSON file.'
end
end
......
......@@ -12,9 +12,9 @@ module Types
authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Conan::FileMetadatum], null: false, description: 'ID of the metadatum.'
field :recipe_revision, GraphQL::STRING_TYPE, null: false, description: 'Revision of the Conan recipe.'
field :package_revision, GraphQL::STRING_TYPE, null: true, description: 'Revision of the package.'
field :conan_package_reference, GraphQL::STRING_TYPE, null: true, description: 'Reference of the Conan package.'
field :recipe_revision, GraphQL::Types::String, null: false, description: 'Revision of the Conan recipe.'
field :package_revision, GraphQL::Types::String, null: true, description: 'Revision of the package.'
field :conan_package_reference, GraphQL::Types::String, null: true, description: 'Reference of the Conan package.'
field :conan_file_type, ::Types::Packages::Conan::MetadatumFileTypeEnum, null: false, description: 'Type of the Conan file.'
end
end
......
......@@ -12,10 +12,10 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::Conan::Metadatum], null: false, description: 'ID of the metadatum.'
field :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
field :package_username, GraphQL::STRING_TYPE, null: false, description: 'Username of the Conan package.'
field :package_channel, GraphQL::STRING_TYPE, null: false, description: 'Channel of the Conan package.'
field :recipe, GraphQL::STRING_TYPE, null: false, description: 'Recipe of the Conan package.'
field :recipe_path, GraphQL::STRING_TYPE, null: false, description: 'Recipe path of the Conan package.'
field :package_username, GraphQL::Types::String, null: false, description: 'Username of the Conan package.'
field :package_channel, GraphQL::Types::String, null: false, description: 'Channel of the Conan package.'
field :recipe, GraphQL::Types::String, null: false, description: 'Recipe of the Conan package.'
field :recipe_path, GraphQL::Types::String, null: false, description: 'Recipe path of the Conan package.'
end
end
end
......
......@@ -12,10 +12,10 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::Maven::Metadatum], null: false, description: 'ID of the metadatum.'
field :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
field :path, GraphQL::STRING_TYPE, null: false, description: 'Path of the Maven package.'
field :app_group, GraphQL::STRING_TYPE, null: false, description: 'App group of the Maven package.'
field :app_version, GraphQL::STRING_TYPE, null: true, description: 'App version of the Maven package.'
field :app_name, GraphQL::STRING_TYPE, null: false, description: 'App name of the Maven package.'
field :path, GraphQL::Types::String, null: false, description: 'Path of the Maven package.'
field :app_group, GraphQL::Types::String, null: false, description: 'App group of the Maven package.'
field :app_version, GraphQL::Types::String, null: true, description: 'App version of the Maven package.'
field :app_name, GraphQL::Types::String, null: false, description: 'App name of the Maven package.'
end
end
end
......
......@@ -10,9 +10,9 @@ module Types
authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Nuget::Metadatum], null: false, description: 'ID of the metadatum.'
field :license_url, GraphQL::STRING_TYPE, null: false, description: 'License URL of the Nuget package.'
field :project_url, GraphQL::STRING_TYPE, null: false, description: 'Project URL of the Nuget package.'
field :icon_url, GraphQL::STRING_TYPE, null: false, description: 'Icon URL of the Nuget package.'
field :license_url, GraphQL::Types::String, null: false, description: 'License URL of the Nuget package.'
field :project_url, GraphQL::Types::String, null: false, description: 'Project URL of the Nuget package.'
field :icon_url, GraphQL::Types::String, null: false, description: 'Icon URL of the Nuget package.'
end
end
end
......
......@@ -10,12 +10,12 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::PackageFile], null: false, description: 'ID of the file.'
field :created_at, Types::TimeType, null: false, description: 'The created date.'
field :updated_at, Types::TimeType, null: false, description: 'The updated date.'
field :size, GraphQL::STRING_TYPE, null: false, description: 'Size of the package file.'
field :file_name, GraphQL::STRING_TYPE, null: false, description: 'Name of the package file.'
field :download_path, GraphQL::STRING_TYPE, null: false, description: 'Download path of the package file.'
field :file_md5, GraphQL::STRING_TYPE, null: true, description: 'Md5 of the package file.'
field :file_sha1, GraphQL::STRING_TYPE, null: true, description: 'Sha1 of the package file.'
field :file_sha256, GraphQL::STRING_TYPE, null: true, description: 'Sha256 of the package file.'
field :size, GraphQL::Types::String, null: false, description: 'Size of the package file.'
field :file_name, GraphQL::Types::String, null: false, description: 'Name of the package file.'
field :download_path, GraphQL::Types::String, null: false, description: 'Download path of the package file.'
field :file_md5, GraphQL::Types::String, null: true, description: 'Md5 of the package file.'
field :file_sha1, GraphQL::Types::String, null: true, description: 'Sha1 of the package file.'
field :file_sha256, GraphQL::Types::String, null: true, description: 'Sha256 of the package file.'
field :file_metadata, Types::Packages::FileMetadataType, null: true,
description: 'File metadata.'
......
......@@ -7,8 +7,8 @@ module Types
description 'Represents a package tag'
authorize :read_package
field :id, GraphQL::ID_TYPE, null: false, description: 'The ID of the tag.'
field :name, GraphQL::STRING_TYPE, null: false, description: 'The name of the tag.'
field :id, GraphQL::Types::ID, null: false, description: 'The ID of the tag.'
field :name, GraphQL::Types::String, null: false, description: 'The name of the tag.'
field :created_at, Types::TimeType, null: false, description: 'The created date.'
field :updated_at, Types::TimeType, null: false, description: 'The updated date.'
end
......
......@@ -11,10 +11,10 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::Package], null: false,
description: 'ID of the package.'
field :name, GraphQL::STRING_TYPE, null: false, description: 'Name of the package.'
field :name, GraphQL::Types::String, null: false, description: 'Name of the package.'
field :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
field :version, GraphQL::STRING_TYPE, null: true, description: 'Version string.'
field :version, GraphQL::Types::String, null: true, description: 'Version string.'
field :package_type, Types::Packages::PackageTypeEnum, null: false, description: 'Package type.'
field :tags, Types::Packages::PackageTagType.connection_type, null: true, description: 'Package tags.'
field :project, Types::ProjectType, null: false, description: 'Project where the package is stored.'
......
......@@ -10,7 +10,7 @@ module Types
authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Pypi::Metadatum], null: false, description: 'ID of the metadatum.'
field :required_python, GraphQL::STRING_TYPE, null: true, description: 'Required Python version of the Pypi package.'
field :required_python, GraphQL::Types::String, null: true, description: 'Required Python version of the Pypi package.'
end
end
end
......
......@@ -24,7 +24,7 @@ module Types
def self.permission_field(name, **kword_args)
kword_args = kword_args.reverse_merge(
name: name,
type: GraphQL::BOOLEAN_TYPE,
type: GraphQL::Types::Boolean,
description: "Indicates the user can perform `#{name}` on this resource",
null: false)
......
......@@ -8,44 +8,44 @@ module Types
expose_permissions Types::PermissionTypes::Project
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the project.'
field :full_path, GraphQL::ID_TYPE, null: false,
field :full_path, GraphQL::Types::ID, null: false,
description: 'Full path of the project.'
field :path, GraphQL::STRING_TYPE, null: false,
field :path, GraphQL::Types::String, null: false,
description: 'Path of the project.'
field :sast_ci_configuration, Types::CiConfiguration::Sast::Type, null: true,
calls_gitaly: true,
description: 'SAST CI configuration for the project.'
field :name_with_namespace, GraphQL::STRING_TYPE, null: false,
field :name_with_namespace, GraphQL::Types::String, null: false,
description: 'Full name of the project with its namespace.'
field :name, GraphQL::STRING_TYPE, null: false,
field :name, GraphQL::Types::String, null: false,
description: 'Name of the project (without namespace).'
field :description, GraphQL::STRING_TYPE, null: true,
field :description, GraphQL::Types::String, null: true,
description: 'Short description of the project.'
markdown_field :description_html, null: true
field :tag_list, GraphQL::STRING_TYPE, null: true,
field :tag_list, GraphQL::Types::String, null: true,
deprecated: { reason: 'Use `topics`', milestone: '13.12' },
description: 'List of project topics (not Git tags).'
field :topics, [GraphQL::STRING_TYPE], null: true,
field :topics, [GraphQL::Types::String], null: true,
description: 'List of project topics.'
field :ssh_url_to_repo, GraphQL::STRING_TYPE, null: true,
field :ssh_url_to_repo, GraphQL::Types::String, null: true,
description: 'URL to connect to the project via SSH.'
field :http_url_to_repo, GraphQL::STRING_TYPE, null: true,
field :http_url_to_repo, GraphQL::Types::String, null: true,
description: 'URL to connect to the project via HTTPS.'
field :web_url, GraphQL::STRING_TYPE, null: true,
field :web_url, GraphQL::Types::String, null: true,
description: 'Web URL of the project.'
field :star_count, GraphQL::INT_TYPE, null: false,
field :star_count, GraphQL::Types::Int, null: false,
description: 'Number of times the project has been starred.'
field :forks_count, GraphQL::INT_TYPE, null: false, calls_gitaly: true, # 4 times
field :forks_count, GraphQL::Types::Int, null: false, calls_gitaly: true, # 4 times
description: 'Number of times the project has been forked.'
field :created_at, Types::TimeType, null: true,
......@@ -53,26 +53,26 @@ module Types
field :last_activity_at, Types::TimeType, null: true,
description: 'Timestamp of the project last activity.'
field :archived, GraphQL::BOOLEAN_TYPE, null: true,
field :archived, GraphQL::Types::Boolean, null: true,
description: 'Indicates the archived status of the project.'
field :visibility, GraphQL::STRING_TYPE, null: true,
field :visibility, GraphQL::Types::String, null: true,
description: 'Visibility of the project.'
field :shared_runners_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :shared_runners_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if shared runners are enabled for the project.'
field :lfs_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :lfs_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the project has Large File Storage (LFS) enabled.'
field :merge_requests_ff_only_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :merge_requests_ff_only_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if no merge commits should be created and all merges should instead be fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded.'
field :service_desk_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :service_desk_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the project has service desk enabled.'
field :service_desk_address, GraphQL::STRING_TYPE, null: true,
field :service_desk_address, GraphQL::Types::String, null: true,
description: 'E-mail address of the service desk.'
field :avatar_url, GraphQL::STRING_TYPE, null: true, calls_gitaly: true,
field :avatar_url, GraphQL::Types::String, null: true, calls_gitaly: true,
description: 'URL to avatar image file of the project.'
{
......@@ -90,36 +90,36 @@ module Types
end
end
field :jobs_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :jobs_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if CI/CD pipeline jobs are enabled for the current user.'
field :public_jobs, GraphQL::BOOLEAN_TYPE, method: :public_builds, null: true,
field :public_jobs, GraphQL::Types::Boolean, method: :public_builds, null: true,
description: 'Indicates if there is public access to pipelines and job details of the project, including output logs and artifacts.'
field :open_issues_count, GraphQL::INT_TYPE, null: true,
field :open_issues_count, GraphQL::Types::Int, null: true,
description: 'Number of open issues for the project.'
field :import_status, GraphQL::STRING_TYPE, null: true,
field :import_status, GraphQL::Types::String, null: true,
description: 'Status of import background job of the project.'
field :jira_import_status, GraphQL::STRING_TYPE, null: true,
field :jira_import_status, GraphQL::Types::String, null: true,
description: 'Status of Jira import background job of the project.'
field :only_allow_merge_if_pipeline_succeeds, GraphQL::BOOLEAN_TYPE, null: true,
field :only_allow_merge_if_pipeline_succeeds, GraphQL::Types::Boolean, null: true,
description: 'Indicates if merge requests of the project can only be merged with successful jobs.'
field :allow_merge_on_skipped_pipeline, GraphQL::BOOLEAN_TYPE, null: true,
field :allow_merge_on_skipped_pipeline, GraphQL::Types::Boolean, null: true,
description: 'If `only_allow_merge_if_pipeline_succeeds` is true, indicates if merge requests of the project can also be merged with skipped jobs.'
field :request_access_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :request_access_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if users can request member access to the project.'
field :only_allow_merge_if_all_discussions_are_resolved, GraphQL::BOOLEAN_TYPE, null: true,
field :only_allow_merge_if_all_discussions_are_resolved, GraphQL::Types::Boolean, null: true,
description: 'Indicates if merge requests of the project can only be merged when all the discussions are resolved.'
field :printing_merge_request_link_enabled, GraphQL::BOOLEAN_TYPE, null: true,
field :printing_merge_request_link_enabled, GraphQL::Types::Boolean, null: true,
description: 'Indicates if a link to create or view a merge request should display after a push to Git repositories of the project from the command line.'
field :remove_source_branch_after_merge, GraphQL::BOOLEAN_TYPE, null: true,
field :remove_source_branch_after_merge, GraphQL::Types::Boolean, null: true,
description: 'Indicates if `Delete source branch` option should be enabled by default for all new merge requests of the project.'
field :autoclose_referenced_issues, GraphQL::BOOLEAN_TYPE, null: true,
field :autoclose_referenced_issues, GraphQL::Types::Boolean, null: true,
description: 'Indicates if issues referenced by merge requests and commits within the default branch are closed automatically.'
field :suggestion_commit_message, GraphQL::STRING_TYPE, null: true,
field :suggestion_commit_message, GraphQL::Types::String, null: true,
description: 'The commit message used to apply merge request suggestions.'
field :squash_read_only, GraphQL::BOOLEAN_TYPE, null: false, method: :squash_readonly?,
field :squash_read_only, GraphQL::Types::Boolean, null: false, method: :squash_readonly?,
description: 'Indicates if `squashReadOnly` is enabled.'
field :namespace, Types::NamespaceType, null: true,
......@@ -318,14 +318,14 @@ module Types
description: 'Container repositories of the project.',
resolver: Resolvers::ContainerRepositoriesResolver
field :container_repositories_count, GraphQL::INT_TYPE, null: false,
field :container_repositories_count, GraphQL::Types::Int, null: false,
description: 'Number of container repositories in the project.'
field :label,
Types::LabelType,
null: true,
description: 'A label available on this project.' do
argument :title, GraphQL::STRING_TYPE,
argument :title, GraphQL::Types::String,
required: true,
description: 'Title of the label.'
end
......
......@@ -8,9 +8,9 @@ module Types
# TODO: Add all the fields that we want to expose for the project services integrations
# https://gitlab.com/gitlab-org/gitlab/-/issues/213088
field :type, GraphQL::STRING_TYPE, null: true,
field :type, GraphQL::Types::String, null: true,
description: 'Class name of the service.'
field :active, GraphQL::BOOLEAN_TYPE, null: true,
field :active, GraphQL::Types::Boolean, null: true,
description: 'Indicates if the service is active.'
definition_methods do
......
......@@ -7,12 +7,12 @@ module Types
class JiraProjectType < BaseObject
graphql_name 'JiraProject'
field :key, GraphQL::STRING_TYPE, null: false,
field :key, GraphQL::Types::String, null: false,
description: 'Key of the Jira project.'
field :project_id, GraphQL::INT_TYPE, null: false,
field :project_id, GraphQL::Types::Int, null: false,
description: 'ID of the Jira project.',
method: :id
field :name, GraphQL::STRING_TYPE, null: true,
field :name, GraphQL::Types::String, null: true,
description: 'Name of the Jira project.'
end
# rubocop:enable Graphql/AuthorizeTypes
......
......@@ -9,11 +9,11 @@ module Types
present_using PrometheusAlertPresenter
field :id, GraphQL::ID_TYPE, null: false,
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the alert condition.'
field :humanized_text,
GraphQL::STRING_TYPE,
GraphQL::Types::String,
null: false,
description: 'The human-readable text of the alert condition.'
end
......
......@@ -255,7 +255,7 @@ RSpec.describe Types::GlobalIDType do
query(GraphQL.parse(gql_query), vars).result
end
all_types = [::GraphQL::ID_TYPE, ::Types::GlobalIDType, ::Types::GlobalIDType[::Project]]
all_types = [::GraphQL::Types::ID, ::Types::GlobalIDType, ::Types::GlobalIDType[::Project]]
shared_examples 'a working query' do
# Simplified schema to test compatibility
......@@ -284,7 +284,7 @@ RSpec.describe Types::GlobalIDType do
# This is needed so that all types are always registered as input types
field :echo, String, null: true do
argument :id, ::GraphQL::ID_TYPE, required: false
argument :id, ::GraphQL::Types::ID, required: false
argument :gid, ::Types::GlobalIDType, required: false
argument :pid, ::Types::GlobalIDType[::Project], required: false
end
......
......@@ -36,7 +36,7 @@ RSpec.describe Types::PermissionTypes::BasePermissionType do
expected_keywords = {
name: :resolve_using_hash,
hash_key: :the_key,
type: GraphQL::BOOLEAN_TYPE,
type: GraphQL::Types::Boolean,
description: "custom description",
null: false
}
......
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