Commit 7a8057fd authored by Evan Read's avatar Evan Read

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

Backfill GraphQL descriptions

See merge request gitlab-org/gitlab!22073
parents d0a74585 0148cb09
......@@ -17,16 +17,16 @@ module Types
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"
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,
description: "Duration of the pipeline in seconds"
description: 'Duration of the pipeline in seconds'
field :coverage, GraphQL::FLOAT_TYPE, null: true,
description: "Coverage percentage"
description: 'Coverage percentage'
field :created_at, Types::TimeType, null: false,
description: "Timestamp of the pipeline's creation"
field :updated_at, Types::TimeType, null: false,
......
......@@ -503,6 +503,9 @@ type CreateSnippetPayload {
}
type Design implements Noteable {
"""
Diff refs of the design
"""
diffRefs: DiffRefs!
"""
......@@ -531,13 +534,34 @@ type Design implements Noteable {
): DiscussionConnection!
"""
The change that happened to the design at this version
Type of change made to the design at the version specified by the `atVersion`
argument if supplied. Defaults to the latest version
"""
event: DesignVersionEvent!
"""
Filename of the design file
"""
filename: String!
"""
Full path of the design file
"""
fullPath: String!
"""
ID of the design
"""
id: ID!
"""
Image of the design
"""
image: String!
"""
Issue associated with the design
"""
issue: Issue!
"""
......@@ -566,13 +590,17 @@ type Design implements Noteable {
): NoteConnection!
"""
The total count of user-created notes for this design
Total count of user-created notes for the design
"""
notesCount: Int!
"""
Project associated with the design
"""
project: Project!
"""
All versions related to this design ordered newest first
All versions related to the design, ordered newest first
"""
versions(
"""
......@@ -599,7 +627,7 @@ type Design implements Noteable {
type DesignCollection {
"""
All designs for this collection
All designs for the design collection
"""
designs(
"""
......@@ -638,11 +666,19 @@ type DesignCollection {
"""
last: Int
): DesignConnection!
"""
Issue associated with the design collection
"""
issue: Issue!
"""
Project associated with the design collection
"""
project: Project!
"""
All versions related to all designs ordered newest first
All versions related to all designs, ordered newest first
"""
versions(
"""
......@@ -799,7 +835,7 @@ type DesignManagementUploadPayload {
type DesignVersion {
"""
All designs that were changed in this version
All designs that were changed in the version
"""
designs(
"""
......@@ -822,7 +858,15 @@ type DesignVersion {
"""
last: Int
): DesignConnection!
"""
ID of the design version
"""
id: ID!
"""
SHA of the design version
"""
sha: ID!
}
......
......@@ -9206,7 +9206,7 @@
"fields": [
{
"name": "designs",
"description": "All designs for this collection",
"description": "All designs for the design collection",
"args": [
{
"name": "ids",
......@@ -9309,7 +9309,7 @@
},
{
"name": "issue",
"description": null,
"description": "Issue associated with the design collection",
"args": [
],
......@@ -9327,7 +9327,7 @@
},
{
"name": "project",
"description": null,
"description": "Project associated with the design collection",
"args": [
],
......@@ -9345,7 +9345,7 @@
},
{
"name": "versions",
"description": "All versions related to all designs ordered newest first",
"description": "All versions related to all designs, ordered newest first",
"args": [
{
"name": "after",
......@@ -10322,7 +10322,7 @@
"fields": [
{
"name": "diffRefs",
"description": null,
"description": "Diff refs of the design",
"args": [
],
......@@ -10397,7 +10397,7 @@
},
{
"name": "event",
"description": "The change that happened to the design at this version",
"description": "Type of change made to the design at the version specified by the `atVersion` argument if supplied. Defaults to the latest version",
"args": [
],
......@@ -10415,7 +10415,7 @@
},
{
"name": "filename",
"description": null,
"description": "Filename of the design file",
"args": [
],
......@@ -10433,7 +10433,7 @@
},
{
"name": "fullPath",
"description": null,
"description": "Full path of the design file",
"args": [
],
......@@ -10451,7 +10451,7 @@
},
{
"name": "id",
"description": null,
"description": "ID of the design",
"args": [
],
......@@ -10469,7 +10469,7 @@
},
{
"name": "image",
"description": null,
"description": "Image of the design",
"args": [
],
......@@ -10487,7 +10487,7 @@
},
{
"name": "issue",
"description": null,
"description": "Issue associated with the design",
"args": [
],
......@@ -10562,7 +10562,7 @@
},
{
"name": "notesCount",
"description": "The total count of user-created notes for this design",
"description": "Total count of user-created notes for the design",
"args": [
],
......@@ -10580,7 +10580,7 @@
},
{
"name": "project",
"description": null,
"description": "Project associated with the design",
"args": [
],
......@@ -10598,7 +10598,7 @@
},
{
"name": "versions",
"description": "All versions related to this design ordered newest first",
"description": "All versions related to the design, ordered newest first",
"args": [
{
"name": "after",
......@@ -10819,7 +10819,7 @@
"fields": [
{
"name": "designs",
"description": "All designs that were changed in this version",
"description": "All designs that were changed in the version",
"args": [
{
"name": "after",
......@@ -10876,7 +10876,7 @@
},
{
"name": "id",
"description": null,
"description": "ID of the design version",
"args": [
],
......@@ -10894,7 +10894,7 @@
},
{
"name": "sha",
"description": null,
"description": "SHA of the design version",
"args": [
],
......
......@@ -104,22 +104,22 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description |
| --- | ---- | ---------- |
| `id` | ID! | |
| `project` | Project! | |
| `issue` | Issue! | |
| `notesCount` | Int! | The total count of user-created notes for this design |
| `filename` | String! | |
| `fullPath` | String! | |
| `event` | DesignVersionEvent! | The change that happened to the design at this version |
| `image` | String! | |
| `diffRefs` | DiffRefs! | |
| `id` | ID! | ID of the design |
| `project` | Project! | Project associated with the design |
| `issue` | Issue! | Issue associated with the design |
| `notesCount` | Int! | Total count of user-created notes for the design |
| `filename` | String! | Filename of the design file |
| `fullPath` | String! | Full path of the design file |
| `event` | DesignVersionEvent! | Type of change made to the design at the version specified by the `atVersion` argument if supplied. Defaults to the latest version |
| `image` | String! | Image of the design |
| `diffRefs` | DiffRefs! | Diff refs of the design |
### DesignCollection
| Name | Type | Description |
| --- | ---- | ---------- |
| `project` | Project! | |
| `issue` | Issue! | |
| `project` | Project! | Project associated with the design collection |
| `issue` | Issue! | Issue associated with the design collection |
### DesignManagementDeletePayload
......@@ -142,8 +142,8 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description |
| --- | ---- | ---------- |
| `id` | ID! | |
| `sha` | ID! | |
| `id` | ID! | ID of the design version |
| `sha` | ID! | SHA of the design version |
### DestroyNotePayload
......
......@@ -7,19 +7,18 @@ module Types
authorize :read_design
field :project, Types::ProjectType, null: false # rubocop:disable Graphql/Descriptions
field :issue, Types::IssueType, null: false # rubocop:disable Graphql/Descriptions
field :designs,
Types::DesignManagement::DesignType.connection_type,
null: false,
field :project, Types::ProjectType, null: false,
description: 'Project associated with the design collection'
field :issue, Types::IssueType, null: false,
description: 'Issue associated with the design collection'
field :designs, Types::DesignManagement::DesignType.connection_type, null: false,
resolver: Resolvers::DesignManagement::DesignResolver,
description: "All designs for this collection"
description: 'All designs for the design collection'
# TODO: allow getting a single design by filename
# exposing all designs
field :versions,
Types::DesignManagement::VersionType.connection_type,
field :versions, Types::DesignManagement::VersionType.connection_type,
resolver: Resolvers::DesignManagement::VersionResolver,
description: "All versions related to all designs ordered newest first"
description: 'All versions related to all designs, ordered newest first'
end
end
end
......@@ -11,27 +11,33 @@ module Types
alias_method :design, :object
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :project, Types::ProjectType, null: false # rubocop:disable Graphql/Descriptions
field :issue, Types::IssueType, null: false # rubocop:disable Graphql/Descriptions
field :notes_count,
GraphQL::INT_TYPE,
null: false,
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the design'
field :project, Types::ProjectType, null: false,
description: 'Project associated with the design'
field :issue, Types::IssueType, null: false,
description: 'Issue associated with the design'
field :notes_count, GraphQL::INT_TYPE, null: false,
method: :user_notes_count,
description: 'The total count of user-created notes for this design'
field :filename, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :full_path, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :event,
Types::DesignManagement::DesignVersionEventEnum,
null: false,
description: 'The change that happened to the design at this version',
description: 'Total count of user-created notes for the design'
field :filename, GraphQL::STRING_TYPE, null: false,
description: 'Filename of the design file'
field :full_path, GraphQL::STRING_TYPE, null: false,
description: 'Full path of the design file'
field :event, Types::DesignManagement::DesignVersionEventEnum, null: false,
description: 'Type of change made to the design at the version specified by the `atVersion` argument '\
'if supplied. Defaults to the latest version',
extras: [:parent]
field :image, GraphQL::STRING_TYPE, null: false, extras: [:parent] # rubocop:disable Graphql/Descriptions
field :diff_refs, Types::DiffRefsType, null: false, calls_gitaly: true # rubocop:disable Graphql/Descriptions
field :image, GraphQL::STRING_TYPE, null: false,
description: 'Image of the design',
extras: [:parent]
field :diff_refs, Types::DiffRefsType, null: false,
description: 'Diff refs of the design',
calls_gitaly: true
field :versions,
Types::DesignManagement::VersionType.connection_type,
resolver: Resolvers::DesignManagement::VersionResolver,
description: 'All versions related to this design ordered newest first',
description: 'All versions related to the design, ordered newest first',
extras: [:parent]
def image(parent:)
......
......@@ -9,12 +9,12 @@ module Types
authorize :read_design
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :sha, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :designs,
Types::DesignManagement::DesignType.connection_type,
null: false,
description: "All designs that were changed in this version"
field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the design version'
field :sha, GraphQL::ID_TYPE, null: false,
description: 'SHA of the design version'
field :designs, Types::DesignManagement::DesignType.connection_type, null: false,
description: 'All designs that were changed in the version'
end
end
end
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