Commit 31e24c6c authored by Evan Read's avatar Evan Read

Merge branch 'cablett-backfilling-part-4-docs' into 'master'

Backfill graphql descriptions

See merge request gitlab-org/gitlab!21809
parents 191da6c3 9b58f589
......@@ -6,14 +6,24 @@ module Types
class DetailedStatusType < BaseObject
graphql_name 'DetailedStatus'
field :group, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :icon, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :favicon, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :details_path, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :has_details, GraphQL::BOOLEAN_TYPE, null: false, method: :has_details? # rubocop:disable Graphql/Descriptions
field :label, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :text, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :tooltip, GraphQL::STRING_TYPE, null: false, method: :status_tooltip # rubocop:disable Graphql/Descriptions
field :group, GraphQL::STRING_TYPE, null: false,
description: 'Group of the pipeline status'
field :icon, GraphQL::STRING_TYPE, null: false,
description: 'Icon of the pipeline status'
field :favicon, GraphQL::STRING_TYPE, null: false,
description: 'Favicon of the pipeline status'
field :details_path, GraphQL::STRING_TYPE, null: false,
description: 'Path of the details for the pipeline status'
field :has_details, GraphQL::BOOLEAN_TYPE, null: false,
description: 'Indicates if the pipeline status has further details',
method: :has_details?
field :label, GraphQL::STRING_TYPE, null: false,
description: 'Label of the pipeline status'
field :text, GraphQL::STRING_TYPE, null: false,
description: 'Text of the pipeline status'
field :tooltip, GraphQL::STRING_TYPE, null: false,
description: 'Tooltip associated with the pipeline status',
method: :status_tooltip
end
# rubocop: enable Graphql/AuthorizeTypes
end
......
......@@ -9,29 +9,34 @@ module Types
expose_permissions Types::PermissionTypes::Ci::Pipeline
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :iid, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the pipeline'
field :iid, GraphQL::STRING_TYPE, null: false,
description: 'Internal ID of the pipeline'
field :sha, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :before_sha, GraphQL::STRING_TYPE, null: true # rubocop:disable Graphql/Descriptions
field :status, PipelineStatusEnum, null: false # rubocop:disable Graphql/Descriptions
field :detailed_status, # rubocop:disable Graphql/Descriptions
Types::Ci::DetailedStatusType,
null: false,
field :sha, GraphQL::STRING_TYPE, null: false,
description: "SHA of the pipeline's commit"
field :before_sha, GraphQL::STRING_TYPE, null: true,
description: "Base SHA of the source branch"
field :status, PipelineStatusEnum, null: false,
description: "Status of the pipeline (#{::Ci::Pipeline.all_state_names.compact.join(', ').upcase})"
field :detailed_status, Types::Ci::DetailedStatusType, null: false,
description: 'Detailed status of the pipeline',
resolve: -> (obj, _args, ctx) { obj.detailed_status(ctx[:current_user]) }
field :duration,
GraphQL::INT_TYPE,
null: true,
field :duration, GraphQL::INT_TYPE, null: true,
description: "Duration of the pipeline in seconds"
field :coverage,
GraphQL::FLOAT_TYPE,
null: true,
field :coverage, GraphQL::FLOAT_TYPE, null: true,
description: "Coverage percentage"
field :created_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions
field :updated_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions
field :started_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :finished_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :committed_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
field :created_at, Types::TimeType, null: false,
description: "Timestamp of the pipeline's creation"
field :updated_at, Types::TimeType, null: false,
description: "Timestamp of the pipeline's last activity"
field :started_at, Types::TimeType, null: true,
description: 'Timestamp when the pipeline was started'
field :finished_at, Types::TimeType, null: true,
description: "Timestamp of the pipeline's completion"
field :committed_at, Types::TimeType, null: true,
description: "Timestamp of the pipeline's commit"
# TODO: Add triggering user as a type
end
......
......@@ -957,13 +957,44 @@ type DestroySnippetPayload {
}
type DetailedStatus {
"""
Path of the details for the pipeline status
"""
detailsPath: String!
"""
Favicon of the pipeline status
"""
favicon: String!
"""
Group of the pipeline status
"""
group: String!
"""
Indicates if the pipeline status has further details
"""
hasDetails: Boolean!
"""
Icon of the pipeline status
"""
icon: String!
"""
Label of the pipeline status
"""
label: String!
"""
Text of the pipeline status
"""
text: String!
"""
Tooltip associated with the pipeline status
"""
tooltip: String!
}
......@@ -1693,7 +1724,7 @@ type EpicIssue implements Noteable {
designCollection: DesignCollection
"""
Deprecated. Use `design_collection`.
Deprecated. Use `design_collection`
"""
designs: DesignCollection @deprecated(reason: "use design_collection")
......@@ -2508,7 +2539,7 @@ type Issue implements Noteable {
designCollection: DesignCollection
"""
Deprecated. Use `design_collection`.
Deprecated. Use `design_collection`
"""
designs: DesignCollection @deprecated(reason: "use design_collection")
......@@ -4312,26 +4343,69 @@ type PageInfo {
}
type Pipeline {
"""
Base SHA of the source branch
"""
beforeSha: String
"""
Timestamp of the pipeline's commit
"""
committedAt: Time
"""
Coverage percentage
"""
coverage: Float
"""
Timestamp of the pipeline's creation
"""
createdAt: Time!
"""
Detailed status of the pipeline
"""
detailedStatus: DetailedStatus!
"""
Duration of the pipeline in seconds
"""
duration: Int
"""
Timestamp of the pipeline's completion
"""
finishedAt: Time
"""
ID of the pipeline
"""
id: ID!
"""
Internal ID of the pipeline
"""
iid: String!
"""
SHA of the pipeline's commit
"""
sha: String!
"""
Timestamp when the pipeline was started
"""
startedAt: Time
"""
Status of the pipeline (CREATED, PREPARING, PENDING, RUNNING, FAILED, SUCCESS, CANCELED, SKIPPED, MANUAL, SCHEDULED)
"""
status: PipelineStatusEnum!
"""
Timestamp of the pipeline's last activity
"""
updatedAt: Time!
"""
......
......@@ -8148,7 +8148,7 @@
},
{
"name": "designs",
"description": "Deprecated. Use `design_collection`.",
"description": "Deprecated. Use `design_collection`",
"args": [
],
......@@ -9578,7 +9578,7 @@
},
{
"name": "designs",
"description": "Deprecated. Use `design_collection`.",
"description": "Deprecated. Use `design_collection`",
"args": [
],
......@@ -12029,7 +12029,7 @@
"fields": [
{
"name": "beforeSha",
"description": null,
"description": "Base SHA of the source branch",
"args": [
],
......@@ -12043,7 +12043,7 @@
},
{
"name": "committedAt",
"description": null,
"description": "Timestamp of the pipeline's commit",
"args": [
],
......@@ -12071,7 +12071,7 @@
},
{
"name": "createdAt",
"description": null,
"description": "Timestamp of the pipeline's creation",
"args": [
],
......@@ -12089,7 +12089,7 @@
},
{
"name": "detailedStatus",
"description": null,
"description": "Detailed status of the pipeline",
"args": [
],
......@@ -12121,7 +12121,7 @@
},
{
"name": "finishedAt",
"description": null,
"description": "Timestamp of the pipeline's completion",
"args": [
],
......@@ -12135,7 +12135,7 @@
},
{
"name": "id",
"description": null,
"description": "ID of the pipeline",
"args": [
],
......@@ -12153,7 +12153,7 @@
},
{
"name": "iid",
"description": null,
"description": "Internal ID of the pipeline",
"args": [
],
......@@ -12171,7 +12171,7 @@
},
{
"name": "sha",
"description": null,
"description": "SHA of the pipeline's commit",
"args": [
],
......@@ -12189,7 +12189,7 @@
},
{
"name": "startedAt",
"description": null,
"description": "Timestamp when the pipeline was started",
"args": [
],
......@@ -12203,7 +12203,7 @@
},
{
"name": "status",
"description": null,
"description": "Status of the pipeline (CREATED, PREPARING, PENDING, RUNNING, FAILED, SUCCESS, CANCELED, SKIPPED, MANUAL, SCHEDULED)",
"args": [
],
......@@ -12221,7 +12221,7 @@
},
{
"name": "updatedAt",
"description": null,
"description": "Timestamp of the pipeline's last activity",
"args": [
],
......@@ -12408,7 +12408,7 @@
"fields": [
{
"name": "detailsPath",
"description": null,
"description": "Path of the details for the pipeline status",
"args": [
],
......@@ -12426,7 +12426,7 @@
},
{
"name": "favicon",
"description": null,
"description": "Favicon of the pipeline status",
"args": [
],
......@@ -12444,7 +12444,7 @@
},
{
"name": "group",
"description": null,
"description": "Group of the pipeline status",
"args": [
],
......@@ -12462,7 +12462,7 @@
},
{
"name": "hasDetails",
"description": null,
"description": "Indicates if the pipeline status has further details",
"args": [
],
......@@ -12480,7 +12480,7 @@
},
{
"name": "icon",
"description": null,
"description": "Icon of the pipeline status",
"args": [
],
......@@ -12498,7 +12498,7 @@
},
{
"name": "label",
"description": null,
"description": "Label of the pipeline status",
"args": [
],
......@@ -12516,7 +12516,7 @@
},
{
"name": "text",
"description": null,
"description": "Text of the pipeline status",
"args": [
],
......@@ -12534,7 +12534,7 @@
},
{
"name": "tooltip",
"description": null,
"description": "Tooltip associated with the pipeline status",
"args": [
],
......
......@@ -165,14 +165,14 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description |
| --- | ---- | ---------- |
| `group` | String! | |
| `icon` | String! | |
| `favicon` | String! | |
| `detailsPath` | String! | |
| `hasDetails` | Boolean! | |
| `label` | String! | |
| `text` | String! | |
| `tooltip` | String! | |
| `group` | String! | Group of the pipeline status |
| `icon` | String! | Icon of the pipeline status |
| `favicon` | String! | Favicon of the pipeline status |
| `detailsPath` | String! | Path of the details for the pipeline status |
| `hasDetails` | Boolean! | Indicates if the pipeline status has further details |
| `label` | String! | Label of the pipeline status |
| `text` | String! | Text of the pipeline status |
| `tooltip` | String! | Tooltip associated with the pipeline status |
### DiffPosition
......@@ -283,7 +283,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `epic` | Epic | Epic to which this issue belongs |
| `weight` | Int | Weight of the issue |
| `designs` | DesignCollection | Deprecated. Use `design_collection`. |
| `designs` | DesignCollection | Deprecated. Use `design_collection` |
| `designCollection` | DesignCollection | Collection of design images associated with this issue |
| `epicIssueId` | ID! | ID of the epic-issue relation |
| `relationPath` | String | URI path of the epic-issue relation |
......@@ -378,7 +378,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `epic` | Epic | Epic to which this issue belongs |
| `weight` | Int | Weight of the issue |
| `designs` | DesignCollection | Deprecated. Use `design_collection`. |
| `designs` | DesignCollection | Deprecated. Use `design_collection` |
| `designCollection` | DesignCollection | Collection of design images associated with this issue |
### IssuePermissions
......@@ -631,19 +631,19 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description |
| --- | ---- | ---------- |
| `userPermissions` | PipelinePermissions! | Permissions for the current user on the resource |
| `id` | ID! | |
| `iid` | String! | |
| `sha` | String! | |
| `beforeSha` | String | |
| `status` | PipelineStatusEnum! | |
| `detailedStatus` | DetailedStatus! | |
| `id` | ID! | ID of the pipeline |
| `iid` | String! | Internal ID of the pipeline |
| `sha` | String! | SHA of the pipeline's commit |
| `beforeSha` | String | Base SHA of the source branch |
| `status` | PipelineStatusEnum! | Status of the pipeline (CREATED, PREPARING, PENDING, RUNNING, FAILED, SUCCESS, CANCELED, SKIPPED, MANUAL, SCHEDULED) |
| `detailedStatus` | DetailedStatus! | Detailed status of the pipeline |
| `duration` | Int | Duration of the pipeline in seconds |
| `coverage` | Float | Coverage percentage |
| `createdAt` | Time! | |
| `updatedAt` | Time! | |
| `startedAt` | Time | |
| `finishedAt` | Time | |
| `committedAt` | Time | |
| `createdAt` | Time! | Timestamp of the pipeline's creation |
| `updatedAt` | Time! | Timestamp of the pipeline's last activity |
| `startedAt` | Time | Timestamp when the pipeline was started |
| `finishedAt` | Time | Timestamp of the pipeline's completion |
| `committedAt` | Time | Timestamp of the pipeline's commit |
### PipelinePermissions
......
......@@ -14,7 +14,7 @@ module EE
resolve: -> (obj, _args, _ctx) { obj.supports_weight? ? obj.weight : nil }
field :designs, ::Types::DesignManagement::DesignCollectionType, null: true,
description: "Deprecated. Use `design_collection`.",
description: "Deprecated. Use `design_collection`",
method: :design_collection,
deprecation_reason: 'use design_collection'
......
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