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: ...@@ -178,61 +178,6 @@ Graphql/OldTypes:
- 'app/graphql/types/container_repository_type.rb' - 'app/graphql/types/container_repository_type.rb'
- 'app/graphql/types/countable_connection_type.rb' - 'app/graphql/types/countable_connection_type.rb'
- 'app/graphql/types/custom_emoji_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/query_complexity_type.rb'
- 'app/graphql/types/release_asset_link_shared_input_arguments.rb' - 'app/graphql/types/release_asset_link_shared_input_arguments.rb'
- 'app/graphql/types/release_asset_link_type.rb' - 'app/graphql/types/release_asset_link_type.rb'
......
...@@ -7,13 +7,13 @@ module Types ...@@ -7,13 +7,13 @@ module Types
field_class Types::BaseField 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 :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 :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 :filename, GraphQL::Types::String, 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 :full_path, GraphQL::Types::String, 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, GraphQL::Types::String, null: false, extras: [:parent], description: 'The URL of the full-sized image.'
field :image_v432x230, GraphQL::STRING_TYPE, null: true, extras: [:parent], field :image_v432x230, GraphQL::Types::String, null: true, extras: [:parent],
description: 'The URL of the design resized to fit within the bounds of 432x230. ' \ 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' 'This will be `null` if the image has not been generated'
field :diff_refs, Types::DiffRefsType, field :diff_refs, Types::DiffRefsType,
...@@ -26,7 +26,7 @@ module Types ...@@ -26,7 +26,7 @@ module Types
extras: [:parent], extras: [:parent],
description: 'How this design was changed in the current version.' description: 'How this design was changed in the current version.'
field :notes_count, field :notes_count,
GraphQL::INT_TYPE, GraphQL::Types::Int,
null: false, null: false,
method: :user_notes_count, method: :user_notes_count,
description: 'The total count of user-created notes for this design.' description: 'The total count of user-created notes for this design.'
......
...@@ -11,9 +11,9 @@ module Types ...@@ -11,9 +11,9 @@ module Types
authorize :read_design authorize :read_design
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the design version.' 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.' description: 'SHA of the design version.'
field :designs, field :designs,
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
module Types module Types
class DiffPathsInputType < BaseInputObject 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.' 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.' description: 'The path of the file on the head sha.'
end end
end end
...@@ -6,11 +6,11 @@ module Types ...@@ -6,11 +6,11 @@ module Types
class DiffRefsType < BaseObject class DiffRefsType < BaseObject
graphql_name 'DiffRefs' 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.' 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.' 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.' description: 'SHA of the branch being compared against.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
......
...@@ -8,13 +8,13 @@ module Types ...@@ -8,13 +8,13 @@ module Types
description 'Aggregated summary of changes' description 'Aggregated summary of changes'
field :additions, GraphQL::INT_TYPE, null: false, field :additions, GraphQL::Types::Int, null: false,
description: 'Number of lines added.' description: 'Number of lines added.'
field :deletions, GraphQL::INT_TYPE, null: false, field :deletions, GraphQL::Types::Int, null: false,
description: 'Number of lines deleted.' description: 'Number of lines deleted.'
field :changes, GraphQL::INT_TYPE, null: false, field :changes, GraphQL::Types::Int, null: false,
description: 'Number of lines changed.' 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.' description: 'Number of files changed.'
def changes def changes
......
...@@ -8,11 +8,11 @@ module Types ...@@ -8,11 +8,11 @@ module Types
description 'Changes to a single file' 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.' 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.' 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.' description: 'Number of lines deleted from this file.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
......
...@@ -9,16 +9,16 @@ module Types ...@@ -9,16 +9,16 @@ module Types
authorize :read_environment authorize :read_environment
field :name, GraphQL::STRING_TYPE, null: false, field :name, GraphQL::Types::String, null: false,
description: 'Human-readable name of the environment.' 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.' 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.' 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.' description: 'The path to the environment.'
field :metrics_dashboard, Types::Metrics::DashboardType, null: true, field :metrics_dashboard, Types::Metrics::DashboardType, null: true,
......
...@@ -10,23 +10,23 @@ module Types ...@@ -10,23 +10,23 @@ module Types
authorize :read_sentry_issue authorize :read_sentry_issue
field :id, GraphQL::ID_TYPE, field :id, GraphQL::Types::ID,
null: false, null: false,
description: 'ID (global ID) of the error.' description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE, field :sentry_id, GraphQL::Types::String,
method: :id, method: :id,
null: false, null: false,
description: 'ID (Sentry ID) of the error.' description: 'ID (Sentry ID) of the error.'
field :title, GraphQL::STRING_TYPE, field :title, GraphQL::Types::String,
null: false, null: false,
description: 'Title of the error.' description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE, field :type, GraphQL::Types::String,
null: false, null: false,
description: 'Type of the error.' description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE, field :user_count, GraphQL::Types::Int,
null: false, null: false,
description: 'Count of users affected by the error.' description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE, field :count, GraphQL::Types::Int,
null: false, null: false,
description: 'Count of occurrences.' description: 'Count of occurrences.'
field :first_seen, Types::TimeType, field :first_seen, Types::TimeType,
...@@ -35,31 +35,31 @@ module Types ...@@ -35,31 +35,31 @@ module Types
field :last_seen, Types::TimeType, field :last_seen, Types::TimeType,
null: false, null: false,
description: 'Timestamp when the error was last seen.' description: 'Timestamp when the error was last seen.'
field :message, GraphQL::STRING_TYPE, field :message, GraphQL::Types::String,
null: true, null: true,
description: 'Sentry metadata message of the error.' description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE, field :culprit, GraphQL::Types::String,
null: false, null: false,
description: 'Culprit of the error.' description: 'Culprit of the error.'
field :external_base_url, GraphQL::STRING_TYPE, field :external_base_url, GraphQL::Types::String,
null: false, null: false,
description: 'External Base URL of the Sentry Instance.' description: 'External Base URL of the Sentry Instance.'
field :external_url, GraphQL::STRING_TYPE, field :external_url, GraphQL::Types::String,
null: false, null: false,
description: 'External URL of the error.' description: 'External URL of the error.'
field :sentry_project_id, GraphQL::ID_TYPE, field :sentry_project_id, GraphQL::Types::ID,
method: :project_id, method: :project_id,
null: false, null: false,
description: 'ID of the project (Sentry project).' description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE, field :sentry_project_name, GraphQL::Types::String,
method: :project_name, method: :project_name,
null: false, null: false,
description: 'Name of the project affected by the error.' 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, method: :project_slug,
null: false, null: false,
description: 'Slug of the project affected by the error.' description: 'Slug of the project affected by the error.'
field :short_id, GraphQL::STRING_TYPE, field :short_id, GraphQL::Types::String,
null: false, null: false,
description: 'Short ID (Sentry ID) of the error.' description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum, field :status, Types::ErrorTracking::SentryErrorStatusEnum,
...@@ -68,31 +68,31 @@ module Types ...@@ -68,31 +68,31 @@ module Types
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType], field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false, null: false,
description: 'Last 24hr stats of the error.' 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, null: true,
description: 'Commit the error was first seen.' 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, null: true,
description: 'Commit the error was last seen.' 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, null: true,
description: 'Release short version the error was first seen.' 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, null: true,
description: 'Release short version the error was last seen.' 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, null: true,
description: 'Release version the error was first seen.' description: 'Release version the error was first seen.'
field :last_release_version, GraphQL::STRING_TYPE, field :last_release_version, GraphQL::Types::String,
null: true, null: true,
description: 'Release version the error was last seen.' description: 'Release version the error was last seen.'
field :gitlab_commit, GraphQL::STRING_TYPE, field :gitlab_commit, GraphQL::Types::String,
null: true, null: true,
description: 'GitLab commit SHA attributed to the Error based on the release version.' 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, null: true,
description: 'Path to the GitLab page for the GitLab commit attributed to the error.' 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, method: :gitlab_issue,
null: true, null: true,
description: 'URL of GitLab Issue.' description: 'URL of GitLab Issue.'
......
...@@ -18,7 +18,7 @@ module Types ...@@ -18,7 +18,7 @@ module Types
description: 'Stack Trace of Sentry Error.', description: 'Stack Trace of Sentry Error.',
resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver resolver: Resolvers::ErrorTracking::SentryErrorStackTraceResolver
field :external_url, field :external_url,
GraphQL::STRING_TYPE, GraphQL::Types::String,
null: true, null: true,
description: "External URL for Sentry." description: "External URL for Sentry."
end end
......
...@@ -9,7 +9,7 @@ module Types ...@@ -9,7 +9,7 @@ module Types
field :time, Types::TimeType, field :time, Types::TimeType,
null: false, null: false,
description: "Time the error frequency stats were recorded." description: "Time the error frequency stats were recorded."
field :count, GraphQL::INT_TYPE, field :count, GraphQL::Types::Int,
null: false, null: false,
description: "Count of errors received since the previously recorded time." description: "Count of errors received since the previously recorded time."
end end
......
...@@ -8,11 +8,11 @@ module Types ...@@ -8,11 +8,11 @@ module Types
description 'An object context for a Sentry error stack trace' description 'An object context for a Sentry error stack trace'
field :line, field :line,
GraphQL::INT_TYPE, GraphQL::Types::Int,
null: false, null: false,
description: 'Line number of the context.' description: 'Line number of the context.'
field :code, field :code,
GraphQL::STRING_TYPE, GraphQL::Types::String,
null: false, null: false,
description: 'Code number of the context.' description: 'Code number of the context.'
......
...@@ -7,16 +7,16 @@ module Types ...@@ -7,16 +7,16 @@ module Types
graphql_name 'SentryErrorStackTraceEntry' graphql_name 'SentryErrorStackTraceEntry'
description 'An object containing a stack trace entry for a Sentry error' description 'An object containing a stack trace entry for a Sentry error'
field :function, GraphQL::STRING_TYPE, field :function, GraphQL::Types::String,
null: true, null: true,
description: 'Function in which the Sentry error occurred.' description: 'Function in which the Sentry error occurred.'
field :col, GraphQL::STRING_TYPE, field :col, GraphQL::Types::String,
null: true, null: true,
description: 'Function in which the Sentry error occurred.' description: 'Function in which the Sentry error occurred.'
field :line, GraphQL::STRING_TYPE, field :line, GraphQL::Types::String,
null: true, null: true,
description: 'Function in which the Sentry error occurred.' description: 'Function in which the Sentry error occurred.'
field :file_name, GraphQL::STRING_TYPE, field :file_name, GraphQL::Types::String,
null: true, null: true,
description: 'File in which the Sentry error occurred.' description: 'File in which the Sentry error occurred.'
field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType], field :trace_context, [Types::ErrorTracking::SentryErrorStackTraceContextType],
......
...@@ -8,10 +8,10 @@ module Types ...@@ -8,10 +8,10 @@ module Types
authorize :read_sentry_issue authorize :read_sentry_issue
field :issue_id, GraphQL::STRING_TYPE, field :issue_id, GraphQL::Types::String,
null: false, null: false,
description: 'ID of the Sentry error.' description: 'ID of the Sentry error.'
field :date_received, GraphQL::STRING_TYPE, field :date_received, GraphQL::Types::String,
null: false, null: false,
description: 'Time the stack trace was received by Sentry.' description: 'Time the stack trace was received by Sentry.'
field :stack_trace_entries, [Types::ErrorTracking::SentryErrorStackTraceEntryType], field :stack_trace_entries, [Types::ErrorTracking::SentryErrorStackTraceEntryType],
......
...@@ -7,10 +7,10 @@ module Types ...@@ -7,10 +7,10 @@ module Types
graphql_name 'SentryErrorTags' graphql_name 'SentryErrorTags'
description 'State of a Sentry error' description 'State of a Sentry error'
field :level, GraphQL::STRING_TYPE, field :level, GraphQL::Types::String,
null: true, null: true,
description: "Severity level of the Sentry Error." description: "Severity level of the Sentry Error."
field :logger, GraphQL::STRING_TYPE, field :logger, GraphQL::Types::String,
null: true, null: true,
description: "Logger of the Sentry Error." description: "Logger of the Sentry Error."
end end
......
...@@ -9,10 +9,10 @@ module Types ...@@ -9,10 +9,10 @@ module Types
present_using SentryErrorPresenter present_using SentryErrorPresenter
field :id, GraphQL::ID_TYPE, field :id, GraphQL::Types::ID,
null: false, null: false,
description: 'ID (global ID) of the error.' description: 'ID (global ID) of the error.'
field :sentry_id, GraphQL::STRING_TYPE, field :sentry_id, GraphQL::Types::String,
method: :id, method: :id,
null: false, null: false,
description: 'ID (Sentry ID) of the error.' description: 'ID (Sentry ID) of the error.'
...@@ -22,28 +22,28 @@ module Types ...@@ -22,28 +22,28 @@ module Types
field :last_seen, Types::TimeType, field :last_seen, Types::TimeType,
null: false, null: false,
description: 'Timestamp when the error was last seen.' description: 'Timestamp when the error was last seen.'
field :title, GraphQL::STRING_TYPE, field :title, GraphQL::Types::String,
null: false, null: false,
description: 'Title of the error.' description: 'Title of the error.'
field :type, GraphQL::STRING_TYPE, field :type, GraphQL::Types::String,
null: false, null: false,
description: 'Type of the error.' description: 'Type of the error.'
field :user_count, GraphQL::INT_TYPE, field :user_count, GraphQL::Types::Int,
null: false, null: false,
description: 'Count of users affected by the error.' description: 'Count of users affected by the error.'
field :count, GraphQL::INT_TYPE, field :count, GraphQL::Types::Int,
null: false, null: false,
description: 'Count of occurrences.' description: 'Count of occurrences.'
field :message, GraphQL::STRING_TYPE, field :message, GraphQL::Types::String,
null: true, null: true,
description: 'Sentry metadata message of the error.' description: 'Sentry metadata message of the error.'
field :culprit, GraphQL::STRING_TYPE, field :culprit, GraphQL::Types::String,
null: false, null: false,
description: 'Culprit of the error.' description: 'Culprit of the error.'
field :external_url, GraphQL::STRING_TYPE, field :external_url, GraphQL::Types::String,
null: false, null: false,
description: 'External URL of the error.' description: 'External URL of the error.'
field :short_id, GraphQL::STRING_TYPE, field :short_id, GraphQL::Types::String,
null: false, null: false,
description: 'Short ID (Sentry ID) of the error.' description: 'Short ID (Sentry ID) of the error.'
field :status, Types::ErrorTracking::SentryErrorStatusEnum, field :status, Types::ErrorTracking::SentryErrorStatusEnum,
...@@ -52,15 +52,15 @@ module Types ...@@ -52,15 +52,15 @@ module Types
field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType], field :frequency, [Types::ErrorTracking::SentryErrorFrequencyType],
null: false, null: false,
description: 'Last 24hr stats of the error.' description: 'Last 24hr stats of the error.'
field :sentry_project_id, GraphQL::ID_TYPE, field :sentry_project_id, GraphQL::Types::ID,
method: :project_id, method: :project_id,
null: false, null: false,
description: 'ID of the project (Sentry project).' description: 'ID of the project (Sentry project).'
field :sentry_project_name, GraphQL::STRING_TYPE, field :sentry_project_name, GraphQL::Types::String,
method: :project_name, method: :project_name,
null: false, null: false,
description: 'Name of the project affected by the error.' 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, method: :project_slug,
null: false, null: false,
description: 'Slug of the project affected by the error.' description: 'Slug of the project affected by the error.'
......
...@@ -9,7 +9,7 @@ module Types ...@@ -9,7 +9,7 @@ module Types
authorize :read_event authorize :read_event
field :id, GraphQL::ID_TYPE, field :id, GraphQL::Types::ID,
description: 'ID of the event.', description: 'ID of the event.',
null: false null: false
......
...@@ -9,11 +9,11 @@ module Types ...@@ -9,11 +9,11 @@ module Types
present_using Releases::EvidencePresenter present_using Releases::EvidencePresenter
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the evidence.' 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.' 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.' description: 'URL from where the evidence can be downloaded.'
field :collected_at, Types::TimeType, null: true, field :collected_at, Types::TimeType, null: true,
description: 'Timestamp when the evidence was collected.' description: 'Timestamp when the evidence was collected.'
......
...@@ -6,11 +6,11 @@ module Types ...@@ -6,11 +6,11 @@ module Types
authorize :admin_operations authorize :admin_operations
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'Internal ID of the Grafana integration.' 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.' 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.' description: 'Indicates whether Grafana integration is enabled.'
field :created_at, Types::TimeType, null: false, field :created_at, Types::TimeType, null: false,
description: 'Timestamp of the issue\'s creation.' description: 'Timestamp of the issue\'s creation.'
......
...@@ -9,12 +9,12 @@ module Types ...@@ -9,12 +9,12 @@ module Types
expose_permissions Types::PermissionTypes::Group expose_permissions Types::PermissionTypes::Group
field :web_url, field :web_url,
type: GraphQL::STRING_TYPE, type: GraphQL::Types::String,
null: false, null: false,
description: 'Web URL of the group.' description: 'Web URL of the group.'
field :avatar_url, field :avatar_url,
type: GraphQL::STRING_TYPE, type: GraphQL::Types::String,
null: true, null: true,
description: 'Avatar URL of the group.' description: 'Avatar URL of the group.'
...@@ -25,42 +25,42 @@ module Types ...@@ -25,42 +25,42 @@ module Types
feature_flag: :custom_emoji feature_flag: :custom_emoji
field :share_with_group_lock, field :share_with_group_lock,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::Types::Boolean,
null: true, null: true,
description: 'Indicates if sharing a project with another group within this group is prevented.' description: 'Indicates if sharing a project with another group within this group is prevented.'
field :project_creation_level, field :project_creation_level,
type: GraphQL::STRING_TYPE, type: GraphQL::Types::String,
null: true, null: true,
method: :project_creation_level_str, method: :project_creation_level_str,
description: 'The permission level required to create projects in the group.' description: 'The permission level required to create projects in the group.'
field :subgroup_creation_level, field :subgroup_creation_level,
type: GraphQL::STRING_TYPE, type: GraphQL::Types::String,
null: true, null: true,
method: :subgroup_creation_level_str, method: :subgroup_creation_level_str,
description: 'The permission level required to create subgroups within the group.' description: 'The permission level required to create subgroups within the group.'
field :require_two_factor_authentication, field :require_two_factor_authentication,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::Types::Boolean,
null: true, null: true,
description: 'Indicates if all users in this group are required to set up two-factor authentication.' description: 'Indicates if all users in this group are required to set up two-factor authentication.'
field :two_factor_grace_period, field :two_factor_grace_period,
type: GraphQL::INT_TYPE, type: GraphQL::Types::Int,
null: true, null: true,
description: 'Time before two-factor authentication is enforced.' description: 'Time before two-factor authentication is enforced.'
field :auto_devops_enabled, field :auto_devops_enabled,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::Types::Boolean,
null: true, null: true,
description: 'Indicates whether Auto DevOps is enabled for all projects within this group.' description: 'Indicates whether Auto DevOps is enabled for all projects within this group.'
field :emails_disabled, field :emails_disabled,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::Types::Boolean,
null: true, null: true,
description: 'Indicates if a group has email notifications disabled.' description: 'Indicates if a group has email notifications disabled.'
field :mentions_disabled, field :mentions_disabled,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::Types::Boolean,
null: true, null: true,
description: 'Indicates if a group is disabled from getting mentioned.' description: 'Indicates if a group is disabled from getting mentioned.'
...@@ -103,7 +103,7 @@ module Types ...@@ -103,7 +103,7 @@ module Types
null: true, null: true,
description: 'A label available on this group.' do description: 'A label available on this group.' do
argument :title, argument :title,
type: GraphQL::STRING_TYPE, type: GraphQL::Types::String,
required: true, required: true,
description: 'Title of the label.' description: 'Title of the label.'
end end
...@@ -120,7 +120,7 @@ module Types ...@@ -120,7 +120,7 @@ module Types
authorize: :read_container_image authorize: :read_container_image
field :container_repositories_count, field :container_repositories_count,
type: GraphQL::INT_TYPE, type: GraphQL::Types::Int,
null: false, null: false,
description: 'Number of container repositories in the group.' description: 'Number of container repositories in the group.'
......
...@@ -4,7 +4,7 @@ module Types ...@@ -4,7 +4,7 @@ module Types
module InvitationInterface module InvitationInterface
include BaseInterface include BaseInterface
field :email, GraphQL::STRING_TYPE, null: false, field :email, GraphQL::Types::String, null: false,
description: 'Email of the member to invite.' description: 'Email of the member to invite.'
field :access_level, Types::AccessLevelType, null: true, field :access_level, Types::AccessLevelType, null: true,
......
...@@ -15,7 +15,7 @@ module Types ...@@ -15,7 +15,7 @@ module Types
next unless available_issue_states.include?(state.downcase) next unless available_issue_states.include?(state.downcase)
field state, field state,
GraphQL::INT_TYPE, GraphQL::Types::Int,
null: true, null: true,
description: "Number of issues with status #{state.upcase} for the project" description: "Number of issues with status #{state.upcase} for the project"
end end
......
...@@ -15,23 +15,23 @@ module Types ...@@ -15,23 +15,23 @@ module Types
present_using IssuePresenter present_using IssuePresenter
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: "ID of the issue." 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." 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.' description: 'Title of the issue.'
markdown_field :title_html, null: true 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.' description: 'Description of the issue.'
markdown_field :description_html, null: true markdown_field :description_html, null: true
field :state, IssueStateEnum, null: false, field :state, IssueStateEnum, null: false,
description: 'State of the issue.' 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.', description: 'Internal reference of the issue. Returned in shortened format by default.',
method: :to_reference do 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.' description: 'Boolean option specifying whether the reference should be returned in full.'
end end
...@@ -51,42 +51,42 @@ module Types ...@@ -51,42 +51,42 @@ module Types
field :due_date, Types::TimeType, null: true, field :due_date, Types::TimeType, null: true,
description: 'Due date of the issue.' 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.' 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.' 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.' 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.' 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.', description: 'Number of user notes of the issue.',
resolver: Resolvers::UserNotesCountResolver 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.', description: 'Number of user discussions in the issue.',
resolver: Resolvers::UserDiscussionsCountResolver 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.' 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.' 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).' 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, field :participants, Types::UserType.connection_type, null: true, complexity: 5,
description: 'List of participants in the issue.' 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?, method: :project_emails_disabled?,
description: 'Indicates if a project has email notifications disabled: `true` if email notifications are 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.' 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.' 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.' 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.' 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.' description: 'Human-readable total time reported as spent on the issue.'
field :closed_at, Types::TimeType, null: true, field :closed_at, Types::TimeType, null: true,
...@@ -115,19 +115,19 @@ module Types ...@@ -115,19 +115,19 @@ module Types
field :severity, Types::IssuableSeverityEnum, null: true, field :severity, Types::IssuableSeverityEnum, null: true,
description: 'Severity level of the incident.' 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.' description: 'Indicates if issue got moved from other project.'
field :moved_to, Types::IssueType, null: true, field :moved_to, Types::IssueType, null: true,
description: 'Updated Issue after it got moved to another project.' 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.' description: 'User specific email address for the issue.'
field :timelogs, Types::TimelogType.connection_type, null: false, field :timelogs, Types::TimelogType.connection_type, null: false,
description: 'Timelogs on the issue.' 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.' description: 'ID of the issue project.'
def author def author
......
...@@ -5,19 +5,19 @@ module Types ...@@ -5,19 +5,19 @@ module Types
class NegatedIssueFilterInputType < BaseInputObject class NegatedIssueFilterInputType < BaseInputObject
graphql_name 'NegatedIssueFilterInput' graphql_name 'NegatedIssueFilterInput'
argument :iids, [GraphQL::STRING_TYPE], argument :iids, [GraphQL::Types::String],
required: false, required: false,
description: 'List of IIDs of issues to exclude. For example, `[1, 2]`.' 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, required: false,
description: 'Labels not applied to this issue.' description: 'Labels not applied to this issue.'
argument :milestone_title, [GraphQL::STRING_TYPE], argument :milestone_title, [GraphQL::Types::String],
required: false, required: false,
description: 'Milestone not applied to this issue.' description: 'Milestone not applied to this issue.'
argument :assignee_usernames, [GraphQL::STRING_TYPE], argument :assignee_usernames, [GraphQL::Types::String],
required: false, required: false,
description: 'Usernames of users not assigned to the issue.' description: 'Usernames of users not 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 not assigned to the issues.' description: 'ID of a user not assigned to the issues.'
end end
......
...@@ -12,13 +12,13 @@ module Types ...@@ -12,13 +12,13 @@ module Types
description: 'Timestamp of when the Jira import was scheduled.' description: 'Timestamp of when the Jira import was scheduled.'
field :scheduled_by, Types::UserType, null: true, field :scheduled_by, Types::UserType, null: true,
description: 'User that started the Jira import.' 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.' 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.' 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.' 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.' description: 'Total count of issues that were attempted to import.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
......
...@@ -6,17 +6,17 @@ module Types ...@@ -6,17 +6,17 @@ module Types
class JiraUserType < BaseObject class JiraUserType < BaseObject
graphql_name 'JiraUser' 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.' 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.' 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.' 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.' 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.' 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.' description: 'Name of the matched GitLab user.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
......
...@@ -5,11 +5,11 @@ module Types ...@@ -5,11 +5,11 @@ module Types
graphql_name 'JiraUsersMappingInputType' graphql_name 'JiraUsersMappingInputType'
argument :jira_account_id, argument :jira_account_id,
GraphQL::STRING_TYPE, GraphQL::Types::String,
required: true, required: true,
description: 'Jira account ID of the user.' description: 'Jira account ID of the user.'
argument :gitlab_id, argument :gitlab_id,
GraphQL::INT_TYPE, GraphQL::Types::Int,
required: false, required: false,
description: 'ID of the GitLab user.' description: 'ID of the GitLab user.'
end end
......
...@@ -8,16 +8,16 @@ module Types ...@@ -8,16 +8,16 @@ module Types
authorize :read_label authorize :read_label
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'Label ID.' 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).' description: 'Description of the label (Markdown rendered as HTML for caching).'
markdown_field :description_html, null: true 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.' 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.' 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.' description: 'Text color of the label.'
field :created_at, Types::TimeType, null: false, field :created_at, Types::TimeType, null: false,
description: 'When this label was created.' description: 'When this label was created.'
......
...@@ -4,7 +4,7 @@ module Types ...@@ -4,7 +4,7 @@ module Types
module MemberInterface module MemberInterface
include BaseInterface include BaseInterface
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the member.' description: 'ID of the member.'
field :access_level, Types::AccessLevelType, null: true, field :access_level, Types::AccessLevelType, null: true,
......
This diff is collapsed.
...@@ -7,11 +7,11 @@ module Types ...@@ -7,11 +7,11 @@ module Types
authorize :read_instance_metadata 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.' 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.' 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.' description: 'The URL used by the Agents to communicate with KAS.'
end end
end end
......
...@@ -6,9 +6,9 @@ module Types ...@@ -6,9 +6,9 @@ module Types
authorize :read_instance_metadata authorize :read_instance_metadata
field :version, GraphQL::STRING_TYPE, null: false, field :version, GraphQL::Types::String, null: false,
description: 'Version.' description: 'Version.'
field :revision, GraphQL::STRING_TYPE, null: false, field :revision, GraphQL::Types::String, null: false,
description: 'Revision.' description: 'Revision.'
field :kas, ::Types::Metadata::KasType, null: false, field :kas, ::Types::Metadata::KasType, null: false,
description: 'Metadata about KAS.' description: 'Metadata about KAS.'
......
...@@ -7,10 +7,10 @@ module Types ...@@ -7,10 +7,10 @@ module Types
class DashboardType < ::Types::BaseObject class DashboardType < ::Types::BaseObject
graphql_name 'MetricsDashboard' 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.' 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.' description: 'Dashboard schema validation warnings.'
field :annotations, Types::Metrics::Dashboards::AnnotationType.connection_type, null: true, field :annotations, Types::Metrics::Dashboards::AnnotationType.connection_type, null: true,
......
...@@ -7,13 +7,13 @@ module Types ...@@ -7,13 +7,13 @@ module Types
authorize :read_metrics_dashboard_annotation authorize :read_metrics_dashboard_annotation
graphql_name 'MetricsDashboardAnnotation' graphql_name 'MetricsDashboardAnnotation'
field :description, GraphQL::STRING_TYPE, null: true, field :description, GraphQL::Types::String, null: true,
description: 'Description of the annotation.' description: 'Description of the annotation.'
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the annotation.' 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.' description: 'ID of a dashboard panel to which the annotation should be scoped.'
field :starting_at, Types::TimeType, null: true, field :starting_at, Types::TimeType, null: true,
......
...@@ -7,10 +7,10 @@ module Types ...@@ -7,10 +7,10 @@ module Types
authorize :read_milestone 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.' 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.' description: 'Number of closed issues associated with the milestone.'
end end
end end
...@@ -11,25 +11,25 @@ module Types ...@@ -11,25 +11,25 @@ module Types
alias_method :milestone, :object alias_method :milestone, :object
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the milestone.' 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." 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.' description: 'Title of the milestone.'
field :description, GraphQL::STRING_TYPE, null: true, field :description, GraphQL::Types::String, null: true,
description: 'Description of the milestone.' description: 'Description of the milestone.'
field :state, Types::MilestoneStateEnum, null: false, field :state, Types::MilestoneStateEnum, null: false,
description: 'State of the milestone.' 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.' 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.' description: 'Web path of the milestone.'
field :due_date, Types::TimeType, null: true, field :due_date, Types::TimeType, null: true,
...@@ -44,15 +44,15 @@ module Types ...@@ -44,15 +44,15 @@ module Types
field :updated_at, Types::TimeType, null: false, field :updated_at, Types::TimeType, null: false,
description: 'Timestamp of last milestone update.' 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.', description: 'Indicates if milestone is at project level.',
method: :project_milestone? 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.', description: 'Indicates if milestone is at group level.',
method: :group_milestone? 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.', description: 'Indicates if milestone is at subgroup level.',
method: :subgroup_milestone? method: :subgroup_milestone?
......
...@@ -8,9 +8,9 @@ module Types ...@@ -8,9 +8,9 @@ module Types
authorize :read_package_settings 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 :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.' 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
end end
...@@ -6,27 +6,27 @@ module Types ...@@ -6,27 +6,27 @@ module Types
authorize :read_namespace authorize :read_namespace
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the namespace.' description: 'ID of the namespace.'
field :name, GraphQL::STRING_TYPE, null: false, field :name, GraphQL::Types::String, null: false,
description: 'Name of the namespace.' description: 'Name of the namespace.'
field :path, GraphQL::STRING_TYPE, null: false, field :path, GraphQL::Types::String, null: false,
description: 'Path of the namespace.' 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.' 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.' 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.' description: 'Description of the namespace.'
markdown_field :description_html, null: true 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.' 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.' 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.' description: 'Indicates if users can request access to namespace.'
field :root_storage_statistics, Types::RootStorageStatisticsType, field :root_storage_statistics, Types::RootStorageStatisticsType,
......
...@@ -5,13 +5,13 @@ module Types ...@@ -5,13 +5,13 @@ module Types
class DiffImagePositionInputType < DiffPositionBaseInputType class DiffImagePositionInputType < DiffPositionBaseInputType
graphql_name 'DiffImagePositionInput' 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) 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) 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) 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) description: copy_field_description(Types::Notes::DiffPositionType, :height)
end end
end end
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
module Types module Types
module Notes module Notes
class DiffPositionBaseInputType < BaseInputObject 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) 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) 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) description: copy_field_description(Types::DiffRefsType, :start_sha)
argument :paths, argument :paths,
......
...@@ -5,9 +5,9 @@ module Types ...@@ -5,9 +5,9 @@ module Types
class DiffPositionInputType < DiffPositionBaseInputType class DiffPositionInputType < DiffPositionBaseInputType
graphql_name 'DiffPositionInput' 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) 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) description: copy_field_description(Types::Notes::DiffPositionType, :new_line)
end end
end end
......
...@@ -10,29 +10,29 @@ module Types ...@@ -10,29 +10,29 @@ module Types
field :diff_refs, Types::DiffRefsType, null: false, field :diff_refs, Types::DiffRefsType, null: false,
description: 'Information about the branch, HEAD, and base at the time of commenting.' 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.' 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.' 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.' description: 'Path of the file on the HEAD SHA.'
field :position_type, Types::Notes::PositionTypeEnum, null: false, field :position_type, Types::Notes::PositionTypeEnum, null: false,
description: 'Type of file the position refers to.' description: 'Type of file the position refers to.'
# Fields for text positions # 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.' 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.' description: 'Line on HEAD SHA that was changed.'
# Fields for image positions # Fields for image positions
field :x, GraphQL::INT_TYPE, null: true, field :x, GraphQL::Types::Int, null: true,
description: 'X position of the note.' 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.' 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.' 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.' description: 'Total height of the image.'
def old_line def old_line
......
...@@ -22,13 +22,13 @@ module Types ...@@ -22,13 +22,13 @@ module Types
null: false, null: false,
description: 'User who wrote this note.' description: 'User who wrote this note.'
field :system, GraphQL::BOOLEAN_TYPE, field :system, GraphQL::Types::Boolean,
null: false, null: false,
description: 'Indicates whether this note was created by the system or by a user.' 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.' description: 'Name of the icon corresponding to a system note.'
field :body, GraphQL::STRING_TYPE, field :body, GraphQL::Types::String,
null: false, null: false,
method: :note, method: :note,
description: 'Content of the note.' description: 'Content of the note.'
...@@ -43,10 +43,10 @@ module Types ...@@ -43,10 +43,10 @@ module Types
description: 'The discussion this note is a part of.' description: 'The discussion this note is a part of.'
field :position, Types::Notes::DiffPositionType, null: true, field :position, Types::Notes::DiffPositionType, null: true,
description: 'The position of this note on a diff.' 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.', description: 'Indicates if this note is confidential.',
method: :confidential? method: :confidential?
field :url, GraphQL::STRING_TYPE, field :url, GraphQL::Types::String,
null: true, null: true,
description: 'URL to view this Note in the Web UI.' description: 'URL to view this Note in the Web UI.'
......
...@@ -6,19 +6,19 @@ module Types ...@@ -6,19 +6,19 @@ module Types
class UpdateDiffImagePositionInputType < BaseInputObject class UpdateDiffImagePositionInputType < BaseInputObject
graphql_name 'UpdateDiffImagePositionInput' graphql_name 'UpdateDiffImagePositionInput'
argument :x, GraphQL::INT_TYPE, argument :x, GraphQL::Types::Int,
required: false, required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :x) description: copy_field_description(Types::Notes::DiffPositionType, :x)
argument :y, GraphQL::INT_TYPE, argument :y, GraphQL::Types::Int,
required: false, required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :y) description: copy_field_description(Types::Notes::DiffPositionType, :y)
argument :width, GraphQL::INT_TYPE, argument :width, GraphQL::Types::Int,
required: false, required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :width) description: copy_field_description(Types::Notes::DiffPositionType, :width)
argument :height, GraphQL::INT_TYPE, argument :height, GraphQL::Types::Int,
required: false, required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :height) description: copy_field_description(Types::Notes::DiffPositionType, :height)
......
...@@ -8,10 +8,10 @@ module Types ...@@ -8,10 +8,10 @@ module Types
graphql_name 'PackageComposerJsonType' graphql_name 'PackageComposerJsonType'
description 'Represents a composer JSON file' description 'Represents a composer JSON file'
field :name, GraphQL::STRING_TYPE, null: true, description: 'The name 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::STRING_TYPE, null: true, description: 'The type 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::STRING_TYPE, null: true, description: 'The license 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::STRING_TYPE, null: true, description: 'The version 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 end
end end
......
...@@ -9,7 +9,7 @@ module Types ...@@ -9,7 +9,7 @@ module Types
authorize :read_package 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.' field :composer_json, Types::Packages::Composer::JsonType, null: false, description: 'Data of the Composer JSON file.'
end end
end end
......
...@@ -12,9 +12,9 @@ module Types ...@@ -12,9 +12,9 @@ module Types
authorize :read_package authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Conan::FileMetadatum], null: false, description: 'ID of the metadatum.' 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 :recipe_revision, GraphQL::Types::String, null: false, description: 'Revision of the Conan recipe.'
field :package_revision, GraphQL::STRING_TYPE, null: true, description: 'Revision of the package.' field :package_revision, GraphQL::Types::String, null: true, description: 'Revision of the package.'
field :conan_package_reference, GraphQL::STRING_TYPE, null: true, description: 'Reference of the Conan 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.' field :conan_file_type, ::Types::Packages::Conan::MetadatumFileTypeEnum, null: false, description: 'Type of the Conan file.'
end end
end end
......
...@@ -12,10 +12,10 @@ module Types ...@@ -12,10 +12,10 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::Conan::Metadatum], null: false, description: 'ID of the metadatum.' 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 :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.' 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_username, GraphQL::Types::String, null: false, description: 'Username of the Conan package.'
field :package_channel, GraphQL::STRING_TYPE, null: false, description: 'Channel of the Conan package.' field :package_channel, GraphQL::Types::String, null: false, description: 'Channel of the Conan package.'
field :recipe, GraphQL::STRING_TYPE, null: false, description: 'Recipe of the Conan package.' field :recipe, GraphQL::Types::String, null: false, description: 'Recipe of the Conan package.'
field :recipe_path, GraphQL::STRING_TYPE, null: false, description: 'Recipe path of the Conan package.' field :recipe_path, GraphQL::Types::String, null: false, description: 'Recipe path of the Conan package.'
end end
end end
end end
......
...@@ -12,10 +12,10 @@ module Types ...@@ -12,10 +12,10 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::Maven::Metadatum], null: false, description: 'ID of the metadatum.' 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 :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.' 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 :path, GraphQL::Types::String, 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_group, GraphQL::Types::String, 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_version, GraphQL::Types::String, 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 :app_name, GraphQL::Types::String, null: false, description: 'App name of the Maven package.'
end end
end end
end end
......
...@@ -10,9 +10,9 @@ module Types ...@@ -10,9 +10,9 @@ module Types
authorize :read_package authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Nuget::Metadatum], null: false, description: 'ID of the metadatum.' 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 :license_url, GraphQL::Types::String, 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 :project_url, GraphQL::Types::String, 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 :icon_url, GraphQL::Types::String, null: false, description: 'Icon URL of the Nuget package.'
end end
end end
end end
......
...@@ -10,12 +10,12 @@ module Types ...@@ -10,12 +10,12 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::PackageFile], null: false, description: 'ID of the file.' 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 :created_at, Types::TimeType, null: false, description: 'The created date.'
field :updated_at, Types::TimeType, null: false, description: 'The updated 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 :size, GraphQL::Types::String, null: false, description: 'Size of the package file.'
field :file_name, GraphQL::STRING_TYPE, null: false, description: 'Name of the package file.' field :file_name, GraphQL::Types::String, null: false, description: 'Name of the package file.'
field :download_path, GraphQL::STRING_TYPE, null: false, description: 'Download path of the package file.' field :download_path, GraphQL::Types::String, 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_md5, GraphQL::Types::String, null: true, description: 'Md5 of the package file.'
field :file_sha1, GraphQL::STRING_TYPE, null: true, description: 'Sha1 of the package file.' field :file_sha1, GraphQL::Types::String, null: true, description: 'Sha1 of the package file.'
field :file_sha256, GraphQL::STRING_TYPE, null: true, description: 'Sha256 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, field :file_metadata, Types::Packages::FileMetadataType, null: true,
description: 'File metadata.' description: 'File metadata.'
......
...@@ -7,8 +7,8 @@ module Types ...@@ -7,8 +7,8 @@ module Types
description 'Represents a package tag' description 'Represents a package tag'
authorize :read_package authorize :read_package
field :id, GraphQL::ID_TYPE, null: false, description: 'The ID of the tag.' field :id, GraphQL::Types::ID, null: false, description: 'The ID of the tag.'
field :name, GraphQL::STRING_TYPE, null: false, description: 'The name 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 :created_at, Types::TimeType, null: false, description: 'The created date.'
field :updated_at, Types::TimeType, null: false, description: 'The updated date.' field :updated_at, Types::TimeType, null: false, description: 'The updated date.'
end end
......
...@@ -11,10 +11,10 @@ module Types ...@@ -11,10 +11,10 @@ module Types
field :id, ::Types::GlobalIDType[::Packages::Package], null: false, field :id, ::Types::GlobalIDType[::Packages::Package], null: false,
description: 'ID of the package.' 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 :created_at, Types::TimeType, null: false, description: 'Date of creation.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.' 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 :package_type, Types::Packages::PackageTypeEnum, null: false, description: 'Package type.'
field :tags, Types::Packages::PackageTagType.connection_type, null: true, description: 'Package tags.' 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.' field :project, Types::ProjectType, null: false, description: 'Project where the package is stored.'
......
...@@ -10,7 +10,7 @@ module Types ...@@ -10,7 +10,7 @@ module Types
authorize :read_package authorize :read_package
field :id, ::Types::GlobalIDType[::Packages::Pypi::Metadatum], null: false, description: 'ID of the metadatum.' 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 end
end end
......
...@@ -24,7 +24,7 @@ module Types ...@@ -24,7 +24,7 @@ module Types
def self.permission_field(name, **kword_args) def self.permission_field(name, **kword_args)
kword_args = kword_args.reverse_merge( kword_args = kword_args.reverse_merge(
name: name, name: name,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::Types::Boolean,
description: "Indicates the user can perform `#{name}` on this resource", description: "Indicates the user can perform `#{name}` on this resource",
null: false) null: false)
......
...@@ -8,44 +8,44 @@ module Types ...@@ -8,44 +8,44 @@ module Types
expose_permissions Types::PermissionTypes::Project expose_permissions Types::PermissionTypes::Project
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the project.' 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.' 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.' description: 'Path of the project.'
field :sast_ci_configuration, Types::CiConfiguration::Sast::Type, null: true, field :sast_ci_configuration, Types::CiConfiguration::Sast::Type, null: true,
calls_gitaly: true, calls_gitaly: true,
description: 'SAST CI configuration for the project.' 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.' 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).' 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.' description: 'Short description of the project.'
markdown_field :description_html, null: true 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' }, deprecated: { reason: 'Use `topics`', milestone: '13.12' },
description: 'List of project topics (not Git tags).' 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.' 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.' 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.' 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.' 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.' 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.' description: 'Number of times the project has been forked.'
field :created_at, Types::TimeType, null: true, field :created_at, Types::TimeType, null: true,
...@@ -53,26 +53,26 @@ module Types ...@@ -53,26 +53,26 @@ module Types
field :last_activity_at, Types::TimeType, null: true, field :last_activity_at, Types::TimeType, null: true,
description: 'Timestamp of the project last activity.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' description: 'URL to avatar image file of the project.'
{ {
...@@ -90,36 +90,36 @@ module Types ...@@ -90,36 +90,36 @@ module Types
end end
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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' 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.' description: 'Indicates if `squashReadOnly` is enabled.'
field :namespace, Types::NamespaceType, null: true, field :namespace, Types::NamespaceType, null: true,
...@@ -318,14 +318,14 @@ module Types ...@@ -318,14 +318,14 @@ module Types
description: 'Container repositories of the project.', description: 'Container repositories of the project.',
resolver: Resolvers::ContainerRepositoriesResolver 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.' description: 'Number of container repositories in the project.'
field :label, field :label,
Types::LabelType, Types::LabelType,
null: true, null: true,
description: 'A label available on this project.' do description: 'A label available on this project.' do
argument :title, GraphQL::STRING_TYPE, argument :title, GraphQL::Types::String,
required: true, required: true,
description: 'Title of the label.' description: 'Title of the label.'
end end
......
...@@ -8,9 +8,9 @@ module Types ...@@ -8,9 +8,9 @@ module Types
# TODO: Add all the fields that we want to expose for the project services integrations # TODO: Add all the fields that we want to expose for the project services integrations
# https://gitlab.com/gitlab-org/gitlab/-/issues/213088 # 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.' 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.' description: 'Indicates if the service is active.'
definition_methods do definition_methods do
......
...@@ -7,12 +7,12 @@ module Types ...@@ -7,12 +7,12 @@ module Types
class JiraProjectType < BaseObject class JiraProjectType < BaseObject
graphql_name 'JiraProject' graphql_name 'JiraProject'
field :key, GraphQL::STRING_TYPE, null: false, field :key, GraphQL::Types::String, null: false,
description: 'Key of the Jira project.' 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.', description: 'ID of the Jira project.',
method: :id method: :id
field :name, GraphQL::STRING_TYPE, null: true, field :name, GraphQL::Types::String, null: true,
description: 'Name of the Jira project.' description: 'Name of the Jira project.'
end end
# rubocop:enable Graphql/AuthorizeTypes # rubocop:enable Graphql/AuthorizeTypes
......
...@@ -9,11 +9,11 @@ module Types ...@@ -9,11 +9,11 @@ module Types
present_using PrometheusAlertPresenter present_using PrometheusAlertPresenter
field :id, GraphQL::ID_TYPE, null: false, field :id, GraphQL::Types::ID, null: false,
description: 'ID of the alert condition.' description: 'ID of the alert condition.'
field :humanized_text, field :humanized_text,
GraphQL::STRING_TYPE, GraphQL::Types::String,
null: false, null: false,
description: 'The human-readable text of the alert condition.' description: 'The human-readable text of the alert condition.'
end end
......
...@@ -255,7 +255,7 @@ RSpec.describe Types::GlobalIDType do ...@@ -255,7 +255,7 @@ RSpec.describe Types::GlobalIDType do
query(GraphQL.parse(gql_query), vars).result query(GraphQL.parse(gql_query), vars).result
end 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 shared_examples 'a working query' do
# Simplified schema to test compatibility # Simplified schema to test compatibility
...@@ -284,7 +284,7 @@ RSpec.describe Types::GlobalIDType do ...@@ -284,7 +284,7 @@ RSpec.describe Types::GlobalIDType do
# This is needed so that all types are always registered as input types # This is needed so that all types are always registered as input types
field :echo, String, null: true do 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 :gid, ::Types::GlobalIDType, required: false
argument :pid, ::Types::GlobalIDType[::Project], required: false argument :pid, ::Types::GlobalIDType[::Project], required: false
end end
......
...@@ -36,7 +36,7 @@ RSpec.describe Types::PermissionTypes::BasePermissionType do ...@@ -36,7 +36,7 @@ RSpec.describe Types::PermissionTypes::BasePermissionType do
expected_keywords = { expected_keywords = {
name: :resolve_using_hash, name: :resolve_using_hash,
hash_key: :the_key, hash_key: :the_key,
type: GraphQL::BOOLEAN_TYPE, type: GraphQL::Types::Boolean,
description: "custom description", description: "custom description",
null: false 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