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