Commit 770aa3e0 authored by Evan Read's avatar Evan Read

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

Backfill GraphQL type descriptions (part 3)

See merge request gitlab-org/gitlab!21536
parents da6a63fc fc582ad4
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
module Resolvers module Resolvers
class EchoResolver < BaseResolver class EchoResolver < BaseResolver
argument :text, GraphQL::STRING_TYPE, required: true # rubocop:disable Graphql/Descriptions
description 'Testing endpoint to validate the API with' description 'Testing endpoint to validate the API with'
argument :text, GraphQL::STRING_TYPE, required: true,
description: 'Text to echo back'
def resolve(**args) def resolve(**args)
username = context[:current_user]&.username username = context[:current_user]&.username
......
...@@ -4,17 +4,17 @@ module Resolvers ...@@ -4,17 +4,17 @@ module Resolvers
class IssuesResolver < BaseResolver class IssuesResolver < BaseResolver
argument :iid, GraphQL::STRING_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The IID of the issue, e.g., "1"' description: 'IID of the issue. For example, "1"'
argument :iids, [GraphQL::STRING_TYPE], argument :iids, [GraphQL::STRING_TYPE],
required: false, required: false,
description: 'The list of IIDs of issues, e.g., [1, 2]' description: 'List of IIDs of issues. For example, [1, 2]'
argument :state, Types::IssuableStateEnum, argument :state, Types::IssuableStateEnum,
required: false, required: false,
description: 'Current state of Issue' description: 'Current state of this issue'
argument :label_name, GraphQL::STRING_TYPE.to_list_type, argument :label_name, GraphQL::STRING_TYPE.to_list_type,
required: false, required: false,
description: 'Labels applied to the Issue' description: 'Labels applied to this issue'
argument :created_before, Types::TimeType, argument :created_before, Types::TimeType,
required: false, required: false,
description: 'Issues created before this date' description: 'Issues created before this date'
...@@ -33,8 +33,9 @@ module Resolvers ...@@ -33,8 +33,9 @@ module Resolvers
argument :closed_after, Types::TimeType, argument :closed_after, Types::TimeType,
required: false, required: false,
description: 'Issues closed after this date' description: 'Issues closed after this date'
argument :search, GraphQL::STRING_TYPE, # rubocop:disable Graphql/Descriptions argument :search, GraphQL::STRING_TYPE,
required: false required: false,
description: 'Search query for finding issues by title or description'
argument :sort, Types::IssueSortEnum, argument :sort, Types::IssueSortEnum,
description: 'Sort issues by this criteria', description: 'Sort issues by this criteria',
required: false, required: false,
......
...@@ -6,9 +6,12 @@ module Types ...@@ -6,9 +6,12 @@ module Types
class DiffRefsType < BaseObject class DiffRefsType < BaseObject
graphql_name 'DiffRefs' graphql_name 'DiffRefs'
field :head_sha, GraphQL::STRING_TYPE, null: false, description: 'The sha of the head at the time the comment was made' field :head_sha, GraphQL::STRING_TYPE, null: false,
field :base_sha, GraphQL::STRING_TYPE, null: false, description: 'The merge base of the branch the comment was made on' description: 'SHA of the HEAD at the time the comment was made'
field :start_sha, GraphQL::STRING_TYPE, null: false, description: 'The sha of the branch being compared against' field :base_sha, GraphQL::STRING_TYPE, null: false,
description: 'Merge base of the branch the comment was made on'
field :start_sha, GraphQL::STRING_TYPE, null: false,
description: 'SHA of the branch being compared against'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
...@@ -7,36 +7,38 @@ module Types ...@@ -7,36 +7,38 @@ module Types
class DiffPositionType < BaseObject class DiffPositionType < BaseObject
graphql_name 'DiffPosition' graphql_name 'DiffPosition'
field :diff_refs, Types::DiffRefsType, null: false # rubocop:disable Graphql/Descriptions field :diff_refs, Types::DiffRefsType, null: false,
description: 'Information about the branch, HEAD, and base at the time of commenting'
field :file_path, GraphQL::STRING_TYPE, null: false, field :file_path, GraphQL::STRING_TYPE, null: false,
description: "The 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::STRING_TYPE, null: true,
description: "The 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::STRING_TYPE, null: true,
description: "The 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 # rubocop:disable Graphql/Descriptions field :position_type, Types::Notes::PositionTypeEnum, null: false,
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::INT_TYPE, null: true,
description: "The line on start sha that was changed", description: 'Line on start SHA that was changed',
resolve: -> (position, _args, _ctx) { position.old_line if position.on_text? } resolve: -> (position, _args, _ctx) { position.old_line if position.on_text? }
field :new_line, GraphQL::INT_TYPE, null: true, field :new_line, GraphQL::INT_TYPE, null: true,
description: "The line on head sha that was changed", description: 'Line on HEAD SHA that was changed',
resolve: -> (position, _args, _ctx) { position.new_line if position.on_text? } resolve: -> (position, _args, _ctx) { position.new_line if position.on_text? }
# Fields for image positions # Fields for image positions
field :x, GraphQL::INT_TYPE, null: true, field :x, GraphQL::INT_TYPE, null: true,
description: "The X postion on which the comment was made", description: 'X position on which the comment was made',
resolve: -> (position, _args, _ctx) { position.x if position.on_image? } resolve: -> (position, _args, _ctx) { position.x if position.on_image? }
field :y, GraphQL::INT_TYPE, null: true, field :y, GraphQL::INT_TYPE, null: true,
description: "The Y position on which the comment was made", description: 'Y position on which the comment was made',
resolve: -> (position, _args, _ctx) { position.y if position.on_image? } resolve: -> (position, _args, _ctx) { position.y if position.on_image? }
field :width, GraphQL::INT_TYPE, null: true, field :width, GraphQL::INT_TYPE, null: true,
description: "The total width of the image", description: 'Total width of the image',
resolve: -> (position, _args, _ctx) { position.width if position.on_image? } resolve: -> (position, _args, _ctx) { position.width if position.on_image? }
field :height, GraphQL::INT_TYPE, null: true, field :height, GraphQL::INT_TYPE, null: true,
description: "The total height of the image", description: 'Total height of the image',
resolve: -> (position, _args, _ctx) { position.height if position.on_image? } resolve: -> (position, _args, _ctx) { position.height if position.on_image? }
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
......
...@@ -7,10 +7,14 @@ module Types ...@@ -7,10 +7,14 @@ module Types
authorize :read_note authorize :read_note
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions field :id, GraphQL::ID_TYPE, null: false,
field :reply_id, GraphQL::ID_TYPE, null: false, description: 'The ID used to reply to this discussion' description: "ID of this discussion"
field :created_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions field :reply_id, GraphQL::ID_TYPE, null: false,
field :notes, Types::Notes::NoteType.connection_type, null: false, description: "All notes in the discussion" description: 'ID used to reply to this discussion'
field :created_at, Types::TimeType, null: false,
description: "Timestamp of the discussion's creation"
field :notes, Types::Notes::NoteType.connection_type, null: false,
description: 'All notes in the discussion'
# The gem we use to generate Global IDs is hard-coded to work with # The gem we use to generate Global IDs is hard-coded to work with
# `id` properties. To generate a GID for the `reply_id` property, # `id` properties. To generate a GID for the `reply_id` property,
......
...@@ -9,40 +9,48 @@ module Types ...@@ -9,40 +9,48 @@ module Types
expose_permissions Types::PermissionTypes::Note expose_permissions Types::PermissionTypes::Note
field :id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions field :id, GraphQL::ID_TYPE, null: false,
description: 'ID of the note'
field :project, Types::ProjectType, field :project, Types::ProjectType,
null: true, null: true,
description: "The project this note is associated to", description: 'Project associated with the note',
resolve: -> (note, args, context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, note.project_id).find } resolve: -> (note, args, context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Project, note.project_id).find }
field :author, Types::UserType, field :author, Types::UserType,
null: false, null: false,
description: "The user who wrote this note", description: 'User who wrote this note',
resolve: -> (note, args, context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, note.author_id).find } resolve: -> (note, args, context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, note.author_id).find }
field :resolved_by, Types::UserType, field :resolved_by, Types::UserType,
null: true, null: true,
description: "The user that resolved the discussion", description: 'User that resolved the discussion',
resolve: -> (note, _args, _context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, note.resolved_by_id).find } resolve: -> (note, _args, _context) { Gitlab::Graphql::Loaders::BatchModelLoader.new(User, note.resolved_by_id).find }
field :system, GraphQL::BOOLEAN_TYPE, field :system, GraphQL::BOOLEAN_TYPE,
null: false, null: false,
description: "Whether or not 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 :body, GraphQL::STRING_TYPE, field :body, GraphQL::STRING_TYPE,
null: false, null: false,
method: :note, method: :note,
description: "The content note itself" description: 'Content of the note'
markdown_field :body_html, null: true, method: :note markdown_field :body_html, null: true, method: :note
field :created_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions field :created_at, Types::TimeType, null: false,
field :updated_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions description: 'Timestamp of the note creation'
field :discussion, Types::Notes::DiscussionType, null: true, description: "The discussion this note is a part of" field :updated_at, Types::TimeType, null: false,
field :resolvable, GraphQL::BOOLEAN_TYPE, null: false, method: :resolvable? # rubocop:disable Graphql/Descriptions description: "Timestamp of the note's last activity"
field :resolved_at, Types::TimeType, null: true, description: "The time the discussion was resolved" field :discussion, Types::Notes::DiscussionType, null: true,
field :position, Types::Notes::DiffPositionType, null: true, description: "The position of this note on a diff" description: 'The discussion this note is a part of'
field :resolvable, GraphQL::BOOLEAN_TYPE, null: false,
description: 'Indicates if this note can be resolved. That is, if it is a resolvable discussion or simply a standalone note',
method: :resolvable?
field :resolved_at, Types::TimeType, null: true,
description: "Timestamp of the note's resolution"
field :position, Types::Notes::DiffPositionType, null: true,
description: 'The position of this note on a diff'
end end
end end
end end
...@@ -35,6 +35,8 @@ module Types ...@@ -35,6 +35,8 @@ module Types
resolver: Resolvers::SnippetsResolver, resolver: Resolvers::SnippetsResolver,
description: 'Find Snippets visible to the current user' description: 'Find Snippets visible to the current user'
field :echo, GraphQL::STRING_TYPE, null: false, resolver: Resolvers::EchoResolver # rubocop:disable Graphql/Descriptions field :echo, GraphQL::STRING_TYPE, null: false,
description: 'Text to echo back',
resolver: Resolvers::EchoResolver
end end
end end
...@@ -237,7 +237,7 @@ Autogenerated input type of CreateDiffNote ...@@ -237,7 +237,7 @@ Autogenerated input type of CreateDiffNote
""" """
input CreateDiffNoteInput { input CreateDiffNoteInput {
""" """
The content note itself Content of the note
""" """
body: String! body: String!
...@@ -357,7 +357,7 @@ Autogenerated input type of CreateImageDiffNote ...@@ -357,7 +357,7 @@ Autogenerated input type of CreateImageDiffNote
""" """
input CreateImageDiffNoteInput { input CreateImageDiffNoteInput {
""" """
The content note itself Content of the note
""" """
body: String! body: String!
...@@ -402,7 +402,7 @@ Autogenerated input type of CreateNote ...@@ -402,7 +402,7 @@ Autogenerated input type of CreateNote
""" """
input CreateNoteInput { input CreateNoteInput {
""" """
The content note itself Content of the note
""" """
body: String! body: String!
...@@ -969,17 +969,17 @@ type DetailedStatus { ...@@ -969,17 +969,17 @@ type DetailedStatus {
input DiffImagePositionInput { input DiffImagePositionInput {
""" """
The merge base of the branch the comment was made on Merge base of the branch the comment was made on
""" """
baseSha: String baseSha: String
""" """
The sha of the head at the time the comment was made SHA of the HEAD at the time the comment was made
""" """
headSha: String! headSha: String!
""" """
The total height of the image Total height of the image
""" """
height: Int! height: Int!
...@@ -990,22 +990,22 @@ input DiffImagePositionInput { ...@@ -990,22 +990,22 @@ input DiffImagePositionInput {
paths: DiffPathsInput! paths: DiffPathsInput!
""" """
The sha of the branch being compared against SHA of the branch being compared against
""" """
startSha: String! startSha: String!
""" """
The total width of the image Total width of the image
""" """
width: Int! width: Int!
""" """
The X postion on which the comment was made X position on which the comment was made
""" """
x: Int! x: Int!
""" """
The Y position on which the comment was made Y position on which the comment was made
""" """
y: Int! y: Int!
} }
...@@ -1023,73 +1023,80 @@ input DiffPathsInput { ...@@ -1023,73 +1023,80 @@ input DiffPathsInput {
} }
type DiffPosition { type DiffPosition {
"""
Information about the branch, HEAD, and base at the time of commenting
"""
diffRefs: DiffRefs! diffRefs: DiffRefs!
""" """
The path of the file that was changed Path of the file that was changed
""" """
filePath: String! filePath: String!
""" """
The total height of the image Total height of the image
""" """
height: Int height: Int
""" """
The line on head sha that was changed Line on HEAD SHA that was changed
""" """
newLine: Int newLine: Int
""" """
The path of the file on the head sha. Path of the file on the HEAD SHA
""" """
newPath: String newPath: String
""" """
The line on start sha that was changed Line on start SHA that was changed
""" """
oldLine: Int oldLine: Int
""" """
The path of the file on the start sha. Path of the file on the start SHA
""" """
oldPath: String oldPath: String
"""
Type of file the position refers to
"""
positionType: DiffPositionType! positionType: DiffPositionType!
""" """
The total width of the image Total width of the image
""" """
width: Int width: Int
""" """
The X postion on which the comment was made X position on which the comment was made
""" """
x: Int x: Int
""" """
The Y position on which the comment was made Y position on which the comment was made
""" """
y: Int y: Int
} }
input DiffPositionInput { input DiffPositionInput {
""" """
The merge base of the branch the comment was made on Merge base of the branch the comment was made on
""" """
baseSha: String baseSha: String
""" """
The sha of the head at the time the comment was made SHA of the HEAD at the time the comment was made
""" """
headSha: String! headSha: String!
""" """
The line on head sha that was changed Line on HEAD SHA that was changed
""" """
newLine: Int! newLine: Int!
""" """
The line on start sha that was changed Line on start SHA that was changed
""" """
oldLine: Int oldLine: Int
...@@ -1100,7 +1107,7 @@ input DiffPositionInput { ...@@ -1100,7 +1107,7 @@ input DiffPositionInput {
paths: DiffPathsInput! paths: DiffPathsInput!
""" """
The sha of the branch being compared against SHA of the branch being compared against
""" """
startSha: String! startSha: String!
} }
...@@ -1115,23 +1122,30 @@ enum DiffPositionType { ...@@ -1115,23 +1122,30 @@ enum DiffPositionType {
type DiffRefs { type DiffRefs {
""" """
The merge base of the branch the comment was made on Merge base of the branch the comment was made on
""" """
baseSha: String! baseSha: String!
""" """
The sha of the head at the time the comment was made SHA of the HEAD at the time the comment was made
""" """
headSha: String! headSha: String!
""" """
The sha of the branch being compared against SHA of the branch being compared against
""" """
startSha: String! startSha: String!
} }
type Discussion { type Discussion {
"""
Timestamp of the discussion's creation
"""
createdAt: Time! createdAt: Time!
"""
ID of this discussion
"""
id: ID! id: ID!
""" """
...@@ -1160,7 +1174,7 @@ type Discussion { ...@@ -1160,7 +1174,7 @@ type Discussion {
): NoteConnection! ): NoteConnection!
""" """
The ID used to reply to this discussion ID used to reply to this discussion
""" """
replyId: ID! replyId: ID!
} }
...@@ -1259,12 +1273,12 @@ type Epic implements Noteable { ...@@ -1259,12 +1273,12 @@ type Epic implements Noteable {
first: Int first: Int
""" """
The IID of the epic, e.g., "1" IID of the epic, e.g., "1"
""" """
iid: ID iid: ID
""" """
The list of IIDs of epics, e.g., [1, 2] List of IIDs of epics, e.g., [1, 2]
""" """
iids: [ID!] iids: [ID!]
...@@ -1672,7 +1686,15 @@ type EpicIssue implements Noteable { ...@@ -1672,7 +1686,15 @@ type EpicIssue implements Noteable {
The GitLab Flavored Markdown rendering of `description` The GitLab Flavored Markdown rendering of `description`
""" """
descriptionHtml: String descriptionHtml: String
"""
Collection of design images associated with this issue
"""
designCollection: DesignCollection designCollection: DesignCollection
"""
Deprecated. Use `design_collection`.
"""
designs: DesignCollection @deprecated(reason: "use design_collection") designs: DesignCollection @deprecated(reason: "use design_collection")
""" """
...@@ -1716,13 +1738,17 @@ type EpicIssue implements Noteable { ...@@ -1716,13 +1738,17 @@ type EpicIssue implements Noteable {
dueDate: Time dueDate: Time
""" """
The epic to which issue belongs Epic to which this issue belongs
""" """
epic: Epic epic: Epic
"""
ID of the epic-issue relation
"""
epicIssueId: ID! epicIssueId: ID!
""" """
The global id of the epic-issue relation Global ID of the epic-issue relation
""" """
id: ID id: ID
...@@ -1820,6 +1846,10 @@ type EpicIssue implements Noteable { ...@@ -1820,6 +1846,10 @@ type EpicIssue implements Noteable {
""" """
full: Boolean = false full: Boolean = false
): String! ): String!
"""
URI path of the epic-issue relation
"""
relationPath: String relationPath: String
""" """
...@@ -1891,6 +1921,10 @@ type EpicIssue implements Noteable { ...@@ -1891,6 +1921,10 @@ type EpicIssue implements Noteable {
Web URL of the issue Web URL of the issue
""" """
webUrl: String! webUrl: String!
"""
Weight of the issue
"""
weight: Int weight: Int
} }
...@@ -2135,6 +2169,10 @@ type Group { ...@@ -2135,6 +2169,10 @@ type Group {
The GitLab Flavored Markdown rendering of `description` The GitLab Flavored Markdown rendering of `description`
""" """
descriptionHtml: String descriptionHtml: String
"""
Find a single epic
"""
epic( epic(
""" """
Filter epics by author Filter epics by author
...@@ -2148,12 +2186,12 @@ type Group { ...@@ -2148,12 +2186,12 @@ type Group {
endDate: Time endDate: Time
""" """
The IID of the epic, e.g., "1" IID of the epic, e.g., "1"
""" """
iid: ID iid: ID
""" """
The list of IIDs of epics, e.g., [1, 2] List of IIDs of epics, e.g., [1, 2]
""" """
iids: [ID!] iids: [ID!]
...@@ -2183,6 +2221,10 @@ type Group { ...@@ -2183,6 +2221,10 @@ type Group {
""" """
state: EpicState state: EpicState
): Epic ): Epic
"""
Find epics
"""
epics( epics(
""" """
Returns the elements in the list that come after the specified cursor. Returns the elements in the list that come after the specified cursor.
...@@ -2211,12 +2253,12 @@ type Group { ...@@ -2211,12 +2253,12 @@ type Group {
first: Int first: Int
""" """
The IID of the epic, e.g., "1" IID of the epic, e.g., "1"
""" """
iid: ID iid: ID
""" """
The list of IIDs of epics, e.g., [1, 2] List of IIDs of epics, e.g., [1, 2]
""" """
iids: [ID!] iids: [ID!]
...@@ -2459,7 +2501,15 @@ type Issue implements Noteable { ...@@ -2459,7 +2501,15 @@ type Issue implements Noteable {
The GitLab Flavored Markdown rendering of `description` The GitLab Flavored Markdown rendering of `description`
""" """
descriptionHtml: String descriptionHtml: String
"""
Collection of design images associated with this issue
"""
designCollection: DesignCollection designCollection: DesignCollection
"""
Deprecated. Use `design_collection`.
"""
designs: DesignCollection @deprecated(reason: "use design_collection") designs: DesignCollection @deprecated(reason: "use design_collection")
""" """
...@@ -2503,7 +2553,7 @@ type Issue implements Noteable { ...@@ -2503,7 +2553,7 @@ type Issue implements Noteable {
dueDate: Time dueDate: Time
""" """
The epic to which issue belongs Epic to which this issue belongs
""" """
epic: Epic epic: Epic
...@@ -2671,6 +2721,10 @@ type Issue implements Noteable { ...@@ -2671,6 +2721,10 @@ type Issue implements Noteable {
Web URL of the issue Web URL of the issue
""" """
webUrl: String! webUrl: String!
"""
Weight of the issue
"""
weight: Int weight: Int
} }
...@@ -3966,12 +4020,12 @@ type Namespace { ...@@ -3966,12 +4020,12 @@ type Namespace {
type Note { type Note {
""" """
The user who wrote this note User who wrote this note
""" """
author: User! author: User!
""" """
The content note itself Content of the note
""" """
body: String! body: String!
...@@ -3979,12 +4033,20 @@ type Note { ...@@ -3979,12 +4033,20 @@ type Note {
The GitLab Flavored Markdown rendering of `note` The GitLab Flavored Markdown rendering of `note`
""" """
bodyHtml: String bodyHtml: String
"""
Timestamp of the note creation
"""
createdAt: Time! createdAt: Time!
""" """
The discussion this note is a part of The discussion this note is a part of
""" """
discussion: Discussion discussion: Discussion
"""
ID of the note
"""
id: ID! id: ID!
""" """
...@@ -3993,25 +4055,33 @@ type Note { ...@@ -3993,25 +4055,33 @@ type Note {
position: DiffPosition position: DiffPosition
""" """
The project this note is associated to Project associated with the note
""" """
project: Project project: Project
"""
Indicates if this note can be resolved. That is, if it is a resolvable discussion or simply a standalone note
"""
resolvable: Boolean! resolvable: Boolean!
""" """
The time the discussion was resolved Timestamp of the note's resolution
""" """
resolvedAt: Time resolvedAt: Time
""" """
The user that resolved the discussion User that resolved the discussion
""" """
resolvedBy: User resolvedBy: User
""" """
Whether or not this note was created by the system or by a user Indicates whether this note was created by the system or by a user
""" """
system: Boolean! system: Boolean!
"""
Timestamp of the note's last activity
"""
updatedAt: Time! updatedAt: Time!
""" """
...@@ -4339,19 +4409,23 @@ type Project { ...@@ -4339,19 +4409,23 @@ type Project {
createdBefore: Time createdBefore: Time
""" """
The IID of the issue, e.g., "1" IID of the issue. For example, "1"
""" """
iid: String iid: String
""" """
The list of IIDs of issues, e.g., [1, 2] List of IIDs of issues. For example, [1, 2]
""" """
iids: [String!] iids: [String!]
""" """
Labels applied to the Issue Labels applied to this issue
""" """
labelName: [String] labelName: [String]
"""
Search query for finding issues by title or description
"""
search: String search: String
""" """
...@@ -4360,7 +4434,7 @@ type Project { ...@@ -4360,7 +4434,7 @@ type Project {
sort: IssueSort = created_desc sort: IssueSort = created_desc
""" """
Current state of Issue Current state of this issue
""" """
state: IssuableState state: IssuableState
...@@ -4415,17 +4489,17 @@ type Project { ...@@ -4415,17 +4489,17 @@ type Project {
first: Int first: Int
""" """
The IID of the issue, e.g., "1" IID of the issue. For example, "1"
""" """
iid: String iid: String
""" """
The list of IIDs of issues, e.g., [1, 2] List of IIDs of issues. For example, [1, 2]
""" """
iids: [String!] iids: [String!]
""" """
Labels applied to the Issue Labels applied to this issue
""" """
labelName: [String] labelName: [String]
...@@ -4433,6 +4507,10 @@ type Project { ...@@ -4433,6 +4507,10 @@ type Project {
Returns the last _n_ elements from the list. Returns the last _n_ elements from the list.
""" """
last: Int last: Int
"""
Search query for finding issues by title or description
"""
search: String search: String
""" """
...@@ -4441,7 +4519,7 @@ type Project { ...@@ -4441,7 +4519,7 @@ type Project {
sort: IssueSort = created_desc sort: IssueSort = created_desc
""" """
Current state of Issue Current state of this issue
""" """
state: IssuableState state: IssuableState
...@@ -5031,9 +5109,14 @@ type Query { ...@@ -5031,9 +5109,14 @@ type Query {
currentUser: User currentUser: User
""" """
Testing endpoint to validate the API with Text to echo back
""" """
echo(text: String!): String! echo(
"""
Text to echo back
"""
text: String!
): String!
""" """
Find a group Find a group
...@@ -6183,7 +6266,7 @@ Autogenerated input type of UpdateNote ...@@ -6183,7 +6266,7 @@ Autogenerated input type of UpdateNote
""" """
input UpdateNoteInput { input UpdateNoteInput {
""" """
The content note itself Content of the note
""" """
body: String! body: String!
......
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
}, },
{ {
"name": "echo", "name": "echo",
"description": "Testing endpoint to validate the API with", "description": "Text to echo back",
"args": [ "args": [
{ {
"name": "text", "name": "text",
"description": null, "description": "Text to echo back",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -494,7 +494,7 @@ ...@@ -494,7 +494,7 @@
"args": [ "args": [
{ {
"name": "iid", "name": "iid",
"description": "The IID of the issue, e.g., \"1\"", "description": "IID of the issue. For example, \"1\"",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
...@@ -504,7 +504,7 @@ ...@@ -504,7 +504,7 @@
}, },
{ {
"name": "iids", "name": "iids",
"description": "The list of IIDs of issues, e.g., [1, 2]", "description": "List of IIDs of issues. For example, [1, 2]",
"type": { "type": {
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
...@@ -522,7 +522,7 @@ ...@@ -522,7 +522,7 @@
}, },
{ {
"name": "state", "name": "state",
"description": "Current state of Issue", "description": "Current state of this issue",
"type": { "type": {
"kind": "ENUM", "kind": "ENUM",
"name": "IssuableState", "name": "IssuableState",
...@@ -532,7 +532,7 @@ ...@@ -532,7 +532,7 @@
}, },
{ {
"name": "labelName", "name": "labelName",
"description": "Labels applied to the Issue", "description": "Labels applied to this issue",
"type": { "type": {
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
...@@ -606,7 +606,7 @@ ...@@ -606,7 +606,7 @@
}, },
{ {
"name": "search", "name": "search",
"description": null, "description": "Search query for finding issues by title or description",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
...@@ -639,7 +639,7 @@ ...@@ -639,7 +639,7 @@
"args": [ "args": [
{ {
"name": "iid", "name": "iid",
"description": "The IID of the issue, e.g., \"1\"", "description": "IID of the issue. For example, \"1\"",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
...@@ -649,7 +649,7 @@ ...@@ -649,7 +649,7 @@
}, },
{ {
"name": "iids", "name": "iids",
"description": "The list of IIDs of issues, e.g., [1, 2]", "description": "List of IIDs of issues. For example, [1, 2]",
"type": { "type": {
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
...@@ -667,7 +667,7 @@ ...@@ -667,7 +667,7 @@
}, },
{ {
"name": "state", "name": "state",
"description": "Current state of Issue", "description": "Current state of this issue",
"type": { "type": {
"kind": "ENUM", "kind": "ENUM",
"name": "IssuableState", "name": "IssuableState",
...@@ -677,7 +677,7 @@ ...@@ -677,7 +677,7 @@
}, },
{ {
"name": "labelName", "name": "labelName",
"description": "Labels applied to the Issue", "description": "Labels applied to this issue",
"type": { "type": {
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
...@@ -751,7 +751,7 @@ ...@@ -751,7 +751,7 @@
}, },
{ {
"name": "search", "name": "search",
"description": null, "description": "Search query for finding issues by title or description",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
...@@ -2973,11 +2973,11 @@ ...@@ -2973,11 +2973,11 @@
}, },
{ {
"name": "epic", "name": "epic",
"description": null, "description": "Find a single epic",
"args": [ "args": [
{ {
"name": "iid", "name": "iid",
"description": "The IID of the epic, e.g., \"1\"", "description": "IID of the epic, e.g., \"1\"",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "ID", "name": "ID",
...@@ -2987,7 +2987,7 @@ ...@@ -2987,7 +2987,7 @@
}, },
{ {
"name": "iids", "name": "iids",
"description": "The list of IIDs of epics, e.g., [1, 2]", "description": "List of IIDs of epics, e.g., [1, 2]",
"type": { "type": {
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
...@@ -3092,11 +3092,11 @@ ...@@ -3092,11 +3092,11 @@
}, },
{ {
"name": "epics", "name": "epics",
"description": null, "description": "Find epics",
"args": [ "args": [
{ {
"name": "iid", "name": "iid",
"description": "The IID of the epic, e.g., \"1\"", "description": "IID of the epic, e.g., \"1\"",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "ID", "name": "ID",
...@@ -3106,7 +3106,7 @@ ...@@ -3106,7 +3106,7 @@
}, },
{ {
"name": "iids", "name": "iids",
"description": "The list of IIDs of epics, e.g., [1, 2]", "description": "List of IIDs of epics, e.g., [1, 2]",
"type": { "type": {
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
...@@ -3693,7 +3693,7 @@ ...@@ -3693,7 +3693,7 @@
"args": [ "args": [
{ {
"name": "iid", "name": "iid",
"description": "The IID of the epic, e.g., \"1\"", "description": "IID of the epic, e.g., \"1\"",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "ID", "name": "ID",
...@@ -3703,7 +3703,7 @@ ...@@ -3703,7 +3703,7 @@
}, },
{ {
"name": "iids", "name": "iids",
"description": "The list of IIDs of epics, e.g., [1, 2]", "description": "List of IIDs of epics, e.g., [1, 2]",
"type": { "type": {
"kind": "LIST", "kind": "LIST",
"name": null, "name": null,
...@@ -4887,7 +4887,7 @@ ...@@ -4887,7 +4887,7 @@
"fields": [ "fields": [
{ {
"name": "author", "name": "author",
"description": "The user who wrote this note", "description": "User who wrote this note",
"args": [ "args": [
], ],
...@@ -4905,7 +4905,7 @@ ...@@ -4905,7 +4905,7 @@
}, },
{ {
"name": "body", "name": "body",
"description": "The content note itself", "description": "Content of the note",
"args": [ "args": [
], ],
...@@ -4937,7 +4937,7 @@ ...@@ -4937,7 +4937,7 @@
}, },
{ {
"name": "createdAt", "name": "createdAt",
"description": null, "description": "Timestamp of the note creation",
"args": [ "args": [
], ],
...@@ -4969,7 +4969,7 @@ ...@@ -4969,7 +4969,7 @@
}, },
{ {
"name": "id", "name": "id",
"description": null, "description": "ID of the note",
"args": [ "args": [
], ],
...@@ -5001,7 +5001,7 @@ ...@@ -5001,7 +5001,7 @@
}, },
{ {
"name": "project", "name": "project",
"description": "The project this note is associated to", "description": "Project associated with the note",
"args": [ "args": [
], ],
...@@ -5015,7 +5015,7 @@ ...@@ -5015,7 +5015,7 @@
}, },
{ {
"name": "resolvable", "name": "resolvable",
"description": null, "description": "Indicates if this note can be resolved. That is, if it is a resolvable discussion or simply a standalone note",
"args": [ "args": [
], ],
...@@ -5033,7 +5033,7 @@ ...@@ -5033,7 +5033,7 @@
}, },
{ {
"name": "resolvedAt", "name": "resolvedAt",
"description": "The time the discussion was resolved", "description": "Timestamp of the note's resolution",
"args": [ "args": [
], ],
...@@ -5047,7 +5047,7 @@ ...@@ -5047,7 +5047,7 @@
}, },
{ {
"name": "resolvedBy", "name": "resolvedBy",
"description": "The user that resolved the discussion", "description": "User that resolved the discussion",
"args": [ "args": [
], ],
...@@ -5061,7 +5061,7 @@ ...@@ -5061,7 +5061,7 @@
}, },
{ {
"name": "system", "name": "system",
"description": "Whether or not 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",
"args": [ "args": [
], ],
...@@ -5079,7 +5079,7 @@ ...@@ -5079,7 +5079,7 @@
}, },
{ {
"name": "updatedAt", "name": "updatedAt",
"description": null, "description": "Timestamp of the note's last activity",
"args": [ "args": [
], ],
...@@ -6608,7 +6608,7 @@ ...@@ -6608,7 +6608,7 @@
"fields": [ "fields": [
{ {
"name": "createdAt", "name": "createdAt",
"description": null, "description": "Timestamp of the discussion's creation",
"args": [ "args": [
], ],
...@@ -6626,7 +6626,7 @@ ...@@ -6626,7 +6626,7 @@
}, },
{ {
"name": "id", "name": "id",
"description": null, "description": "ID of this discussion",
"args": [ "args": [
], ],
...@@ -6701,7 +6701,7 @@ ...@@ -6701,7 +6701,7 @@
}, },
{ {
"name": "replyId", "name": "replyId",
"description": "The ID used to reply to this discussion", "description": "ID used to reply to this discussion",
"args": [ "args": [
], ],
...@@ -6916,7 +6916,7 @@ ...@@ -6916,7 +6916,7 @@
"fields": [ "fields": [
{ {
"name": "diffRefs", "name": "diffRefs",
"description": null, "description": "Information about the branch, HEAD, and base at the time of commenting",
"args": [ "args": [
], ],
...@@ -6934,7 +6934,7 @@ ...@@ -6934,7 +6934,7 @@
}, },
{ {
"name": "filePath", "name": "filePath",
"description": "The path of the file that was changed", "description": "Path of the file that was changed",
"args": [ "args": [
], ],
...@@ -6952,7 +6952,7 @@ ...@@ -6952,7 +6952,7 @@
}, },
{ {
"name": "height", "name": "height",
"description": "The total height of the image", "description": "Total height of the image",
"args": [ "args": [
], ],
...@@ -6966,7 +6966,7 @@ ...@@ -6966,7 +6966,7 @@
}, },
{ {
"name": "newLine", "name": "newLine",
"description": "The line on head sha that was changed", "description": "Line on HEAD SHA that was changed",
"args": [ "args": [
], ],
...@@ -6980,7 +6980,7 @@ ...@@ -6980,7 +6980,7 @@
}, },
{ {
"name": "newPath", "name": "newPath",
"description": "The path of the file on the head sha.", "description": "Path of the file on the HEAD SHA",
"args": [ "args": [
], ],
...@@ -6994,7 +6994,7 @@ ...@@ -6994,7 +6994,7 @@
}, },
{ {
"name": "oldLine", "name": "oldLine",
"description": "The line on start sha that was changed", "description": "Line on start SHA that was changed",
"args": [ "args": [
], ],
...@@ -7008,7 +7008,7 @@ ...@@ -7008,7 +7008,7 @@
}, },
{ {
"name": "oldPath", "name": "oldPath",
"description": "The path of the file on the start sha.", "description": "Path of the file on the start SHA",
"args": [ "args": [
], ],
...@@ -7022,7 +7022,7 @@ ...@@ -7022,7 +7022,7 @@
}, },
{ {
"name": "positionType", "name": "positionType",
"description": null, "description": "Type of file the position refers to",
"args": [ "args": [
], ],
...@@ -7040,7 +7040,7 @@ ...@@ -7040,7 +7040,7 @@
}, },
{ {
"name": "width", "name": "width",
"description": "The total width of the image", "description": "Total width of the image",
"args": [ "args": [
], ],
...@@ -7054,7 +7054,7 @@ ...@@ -7054,7 +7054,7 @@
}, },
{ {
"name": "x", "name": "x",
"description": "The X postion on which the comment was made", "description": "X position on which the comment was made",
"args": [ "args": [
], ],
...@@ -7068,7 +7068,7 @@ ...@@ -7068,7 +7068,7 @@
}, },
{ {
"name": "y", "name": "y",
"description": "The Y position on which the comment was made", "description": "Y position on which the comment was made",
"args": [ "args": [
], ],
...@@ -7095,7 +7095,7 @@ ...@@ -7095,7 +7095,7 @@
"fields": [ "fields": [
{ {
"name": "baseSha", "name": "baseSha",
"description": "The merge base of the branch the comment was made on", "description": "Merge base of the branch the comment was made on",
"args": [ "args": [
], ],
...@@ -7113,7 +7113,7 @@ ...@@ -7113,7 +7113,7 @@
}, },
{ {
"name": "headSha", "name": "headSha",
"description": "The sha of the head at the time the comment was made", "description": "SHA of the HEAD at the time the comment was made",
"args": [ "args": [
], ],
...@@ -7131,7 +7131,7 @@ ...@@ -7131,7 +7131,7 @@
}, },
{ {
"name": "startSha", "name": "startSha",
"description": "The sha of the branch being compared against", "description": "SHA of the branch being compared against",
"args": [ "args": [
], ],
...@@ -8116,7 +8116,7 @@ ...@@ -8116,7 +8116,7 @@
}, },
{ {
"name": "designCollection", "name": "designCollection",
"description": null, "description": "Collection of design images associated with this issue",
"args": [ "args": [
], ],
...@@ -8130,7 +8130,7 @@ ...@@ -8130,7 +8130,7 @@
}, },
{ {
"name": "designs", "name": "designs",
"description": null, "description": "Deprecated. Use `design_collection`.",
"args": [ "args": [
], ],
...@@ -8251,7 +8251,7 @@ ...@@ -8251,7 +8251,7 @@
}, },
{ {
"name": "epic", "name": "epic",
"description": "The epic to which issue belongs", "description": "Epic to which this issue belongs",
"args": [ "args": [
], ],
...@@ -8265,7 +8265,7 @@ ...@@ -8265,7 +8265,7 @@
}, },
{ {
"name": "epicIssueId", "name": "epicIssueId",
"description": null, "description": "ID of the epic-issue relation",
"args": [ "args": [
], ],
...@@ -8283,7 +8283,7 @@ ...@@ -8283,7 +8283,7 @@
}, },
{ {
"name": "id", "name": "id",
"description": "The global id of the epic-issue relation", "description": "Global ID of the epic-issue relation",
"args": [ "args": [
], ],
...@@ -8519,7 +8519,7 @@ ...@@ -8519,7 +8519,7 @@
}, },
{ {
"name": "relationPath", "name": "relationPath",
"description": null, "description": "URI path of the epic-issue relation",
"args": [ "args": [
], ],
...@@ -8777,7 +8777,7 @@ ...@@ -8777,7 +8777,7 @@
}, },
{ {
"name": "weight", "name": "weight",
"description": null, "description": "Weight of the issue",
"args": [ "args": [
], ],
...@@ -9546,7 +9546,7 @@ ...@@ -9546,7 +9546,7 @@
}, },
{ {
"name": "designCollection", "name": "designCollection",
"description": null, "description": "Collection of design images associated with this issue",
"args": [ "args": [
], ],
...@@ -9560,7 +9560,7 @@ ...@@ -9560,7 +9560,7 @@
}, },
{ {
"name": "designs", "name": "designs",
"description": null, "description": "Deprecated. Use `design_collection`.",
"args": [ "args": [
], ],
...@@ -9681,7 +9681,7 @@ ...@@ -9681,7 +9681,7 @@
}, },
{ {
"name": "epic", "name": "epic",
"description": "The epic to which issue belongs", "description": "Epic to which this issue belongs",
"args": [ "args": [
], ],
...@@ -10161,7 +10161,7 @@ ...@@ -10161,7 +10161,7 @@
}, },
{ {
"name": "weight", "name": "weight",
"description": null, "description": "Weight of the issue",
"args": [ "args": [
], ],
...@@ -18139,7 +18139,7 @@ ...@@ -18139,7 +18139,7 @@
}, },
{ {
"name": "body", "name": "body",
"description": "The content note itself", "description": "Content of the note",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18265,7 +18265,7 @@ ...@@ -18265,7 +18265,7 @@
}, },
{ {
"name": "body", "name": "body",
"description": "The content note itself", "description": "Content of the note",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18314,7 +18314,7 @@ ...@@ -18314,7 +18314,7 @@
"inputFields": [ "inputFields": [
{ {
"name": "headSha", "name": "headSha",
"description": "The sha of the head at the time the comment was made", "description": "SHA of the HEAD at the time the comment was made",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18328,7 +18328,7 @@ ...@@ -18328,7 +18328,7 @@
}, },
{ {
"name": "baseSha", "name": "baseSha",
"description": "The merge base of the branch the comment was made on", "description": "Merge base of the branch the comment was made on",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
...@@ -18338,7 +18338,7 @@ ...@@ -18338,7 +18338,7 @@
}, },
{ {
"name": "startSha", "name": "startSha",
"description": "The sha of the branch being compared against", "description": "SHA of the branch being compared against",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18366,7 +18366,7 @@ ...@@ -18366,7 +18366,7 @@
}, },
{ {
"name": "oldLine", "name": "oldLine",
"description": "The line on start sha that was changed", "description": "Line on start SHA that was changed",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "Int", "name": "Int",
...@@ -18376,7 +18376,7 @@ ...@@ -18376,7 +18376,7 @@
}, },
{ {
"name": "newLine", "name": "newLine",
"description": "The line on head sha that was changed", "description": "Line on HEAD SHA that was changed",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18513,7 +18513,7 @@ ...@@ -18513,7 +18513,7 @@
}, },
{ {
"name": "body", "name": "body",
"description": "The content note itself", "description": "Content of the note",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18562,7 +18562,7 @@ ...@@ -18562,7 +18562,7 @@
"inputFields": [ "inputFields": [
{ {
"name": "headSha", "name": "headSha",
"description": "The sha of the head at the time the comment was made", "description": "SHA of the HEAD at the time the comment was made",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18576,7 +18576,7 @@ ...@@ -18576,7 +18576,7 @@
}, },
{ {
"name": "baseSha", "name": "baseSha",
"description": "The merge base of the branch the comment was made on", "description": "Merge base of the branch the comment was made on",
"type": { "type": {
"kind": "SCALAR", "kind": "SCALAR",
"name": "String", "name": "String",
...@@ -18586,7 +18586,7 @@ ...@@ -18586,7 +18586,7 @@
}, },
{ {
"name": "startSha", "name": "startSha",
"description": "The sha of the branch being compared against", "description": "SHA of the branch being compared against",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18614,7 +18614,7 @@ ...@@ -18614,7 +18614,7 @@
}, },
{ {
"name": "x", "name": "x",
"description": "The X postion on which the comment was made", "description": "X position on which the comment was made",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18628,7 +18628,7 @@ ...@@ -18628,7 +18628,7 @@
}, },
{ {
"name": "y", "name": "y",
"description": "The Y position on which the comment was made", "description": "Y position on which the comment was made",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18642,7 +18642,7 @@ ...@@ -18642,7 +18642,7 @@
}, },
{ {
"name": "width", "name": "width",
"description": "The total width of the image", "description": "Total width of the image",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18656,7 +18656,7 @@ ...@@ -18656,7 +18656,7 @@
}, },
{ {
"name": "height", "name": "height",
"description": "The total height of the image", "description": "Total height of the image",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
...@@ -18762,7 +18762,7 @@ ...@@ -18762,7 +18762,7 @@
}, },
{ {
"name": "body", "name": "body",
"description": "The content note itself", "description": "Content of the note",
"type": { "type": {
"kind": "NON_NULL", "kind": "NON_NULL",
"name": null, "name": null,
......
...@@ -178,33 +178,33 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -178,33 +178,33 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description | | Name | Type | Description |
| --- | ---- | ---------- | | --- | ---- | ---------- |
| `diffRefs` | DiffRefs! | | | `diffRefs` | DiffRefs! | Information about the branch, HEAD, and base at the time of commenting |
| `filePath` | String! | The path of the file that was changed | | `filePath` | String! | Path of the file that was changed |
| `oldPath` | String | The path of the file on the start sha. | | `oldPath` | String | Path of the file on the start SHA |
| `newPath` | String | The path of the file on the head sha. | | `newPath` | String | Path of the file on the HEAD SHA |
| `positionType` | DiffPositionType! | | | `positionType` | DiffPositionType! | Type of file the position refers to |
| `oldLine` | Int | The line on start sha that was changed | | `oldLine` | Int | Line on start SHA that was changed |
| `newLine` | Int | The line on head sha that was changed | | `newLine` | Int | Line on HEAD SHA that was changed |
| `x` | Int | The X postion on which the comment was made | | `x` | Int | X position on which the comment was made |
| `y` | Int | The Y position on which the comment was made | | `y` | Int | Y position on which the comment was made |
| `width` | Int | The total width of the image | | `width` | Int | Total width of the image |
| `height` | Int | The total height of the image | | `height` | Int | Total height of the image |
### DiffRefs ### DiffRefs
| Name | Type | Description | | Name | Type | Description |
| --- | ---- | ---------- | | --- | ---- | ---------- |
| `headSha` | String! | The sha of the head at the time the comment was made | | `headSha` | String! | SHA of the HEAD at the time the comment was made |
| `baseSha` | String! | The merge base of the branch the comment was made on | | `baseSha` | String! | Merge base of the branch the comment was made on |
| `startSha` | String! | The sha of the branch being compared against | | `startSha` | String! | SHA of the branch being compared against |
### Discussion ### Discussion
| Name | Type | Description | | Name | Type | Description |
| --- | ---- | ---------- | | --- | ---- | ---------- |
| `id` | ID! | | | `id` | ID! | ID of this discussion |
| `replyId` | ID! | The ID used to reply to this discussion | | `replyId` | ID! | ID used to reply to this discussion |
| `createdAt` | Time! | | | `createdAt` | Time! | Timestamp of the discussion's creation |
### Epic ### Epic
...@@ -281,13 +281,13 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -281,13 +281,13 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `createdAt` | Time! | Timestamp of when the issue was created | | `createdAt` | Time! | Timestamp of when the issue was created |
| `updatedAt` | Time! | Timestamp of when the issue was last updated | | `updatedAt` | Time! | Timestamp of when the issue was last updated |
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue | | `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `epic` | Epic | The epic to which issue belongs | | `epic` | Epic | Epic to which this issue belongs |
| `weight` | Int | | | `weight` | Int | Weight of the issue |
| `designs` | DesignCollection | | | `designs` | DesignCollection | Deprecated. Use `design_collection`. |
| `designCollection` | DesignCollection | | | `designCollection` | DesignCollection | Collection of design images associated with this issue |
| `epicIssueId` | ID! | | | `epicIssueId` | ID! | ID of the epic-issue relation |
| `relationPath` | String | | | `relationPath` | String | URI path of the epic-issue relation |
| `id` | ID | The global id of the epic-issue relation | | `id` | ID | Global ID of the epic-issue relation |
### EpicPermissions ### EpicPermissions
...@@ -338,7 +338,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -338,7 +338,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `parent` | Group | Parent group | | `parent` | Group | Parent group |
| `epicsEnabled` | Boolean | Indicates if Epics are enabled for namespace | | `epicsEnabled` | Boolean | Indicates if Epics are enabled for namespace |
| `groupTimelogsEnabled` | Boolean | Indicates if Group timelogs are enabled for namespace | | `groupTimelogsEnabled` | Boolean | Indicates if Group timelogs are enabled for namespace |
| `epic` | Epic | | | `epic` | Epic | Find a single epic |
### GroupPermissions ### GroupPermissions
...@@ -376,10 +376,10 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -376,10 +376,10 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `createdAt` | Time! | Timestamp of when the issue was created | | `createdAt` | Time! | Timestamp of when the issue was created |
| `updatedAt` | Time! | Timestamp of when the issue was last updated | | `updatedAt` | Time! | Timestamp of when the issue was last updated |
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue | | `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `epic` | Epic | The epic to which issue belongs | | `epic` | Epic | Epic to which this issue belongs |
| `weight` | Int | | | `weight` | Int | Weight of the issue |
| `designs` | DesignCollection | | | `designs` | DesignCollection | Deprecated. Use `design_collection`. |
| `designCollection` | DesignCollection | | | `designCollection` | DesignCollection | Collection of design images associated with this issue |
### IssuePermissions ### IssuePermissions
...@@ -577,18 +577,18 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph ...@@ -577,18 +577,18 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description | | Name | Type | Description |
| --- | ---- | ---------- | | --- | ---- | ---------- |
| `userPermissions` | NotePermissions! | Permissions for the current user on the resource | | `userPermissions` | NotePermissions! | Permissions for the current user on the resource |
| `id` | ID! | | | `id` | ID! | ID of the note |
| `project` | Project | The project this note is associated to | | `project` | Project | Project associated with the note |
| `author` | User! | The user who wrote this note | | `author` | User! | User who wrote this note |
| `resolvedBy` | User | The user that resolved the discussion | | `resolvedBy` | User | User that resolved the discussion |
| `system` | Boolean! | Whether or not this note was created by the system or by a user | | `system` | Boolean! | Indicates whether this note was created by the system or by a user |
| `body` | String! | The content note itself | | `body` | String! | Content of the note |
| `bodyHtml` | String | The GitLab Flavored Markdown rendering of `note` | | `bodyHtml` | String | The GitLab Flavored Markdown rendering of `note` |
| `createdAt` | Time! | | | `createdAt` | Time! | Timestamp of the note creation |
| `updatedAt` | Time! | | | `updatedAt` | Time! | Timestamp of the note's last activity |
| `discussion` | Discussion | The discussion this note is a part of | | `discussion` | Discussion | The discussion this note is a part of |
| `resolvable` | Boolean! | | | `resolvable` | Boolean! | Indicates if this note can be resolved. That is, if it is a resolvable discussion or simply a standalone note |
| `resolvedAt` | Time | The time the discussion was resolved | | `resolvedAt` | Time | Timestamp of the note's resolution |
| `position` | DiffPosition | The position of this note on a diff | | `position` | DiffPosition | The position of this note on a diff |
### NotePermissions ### NotePermissions
......
...@@ -12,22 +12,19 @@ module EE ...@@ -12,22 +12,19 @@ module EE
end, description: "Indicates if #{feature.to_s.humanize} are enabled for namespace" end, description: "Indicates if #{feature.to_s.humanize} are enabled for namespace"
end end
field :epic, # rubocop:disable Graphql/Descriptions field :epic, ::Types::EpicType, null: true,
::Types::EpicType, description: 'Find a single epic',
null: true,
resolver: ::Resolvers::EpicResolver.single resolver: ::Resolvers::EpicResolver.single
field :epics, # rubocop:disable Graphql/Descriptions field :epics, ::Types::EpicType.connection_type, null: true,
::Types::EpicType.connection_type, description: 'Find epics',
null: true,
max_page_size: 2000, max_page_size: 2000,
resolver: ::Resolvers::EpicResolver resolver: ::Resolvers::EpicResolver
field :timelogs, field :timelogs, ::Types::TimelogType.connection_type, null: false,
::Types::TimelogType.connection_type, description: 'Time logged in issues by group members',
null: false, complexity: 5, complexity: 5,
resolver: ::Resolvers::TimelogResolver, resolver: ::Resolvers::TimelogResolver
description: 'Time logged in issues by group members'
end end
end end
end end
......
...@@ -6,17 +6,20 @@ module EE ...@@ -6,17 +6,20 @@ module EE
extend ActiveSupport::Concern extend ActiveSupport::Concern
prepended do prepended do
field :epic, ::Types::EpicType, null: true, description: 'The epic to which issue belongs' field :epic, ::Types::EpicType, null: true,
description: 'Epic to which this issue belongs'
field :weight, GraphQL::INT_TYPE, # rubocop:disable Graphql/Descriptions field :weight, GraphQL::INT_TYPE, null: true,
null: true, description: 'Weight of the issue',
resolve: -> (obj, _args, _ctx) { obj.supports_weight? ? obj.weight : nil } resolve: -> (obj, _args, _ctx) { obj.supports_weight? ? obj.weight : nil }
field :designs, ::Types::DesignManagement::DesignCollectionType, # rubocop:disable Graphql/Descriptions field :designs, ::Types::DesignManagement::DesignCollectionType, null: true,
null: true, method: :design_collection, description: "Deprecated. Use `design_collection`.",
method: :design_collection,
deprecation_reason: 'use design_collection' deprecation_reason: 'use design_collection'
field :design_collection, ::Types::DesignManagement::DesignCollectionType, null: true # rubocop:disable Graphql/Descriptions field :design_collection, ::Types::DesignManagement::DesignCollectionType, null: true,
description: 'Collection of design images associated with this issue'
end end
end end
end end
......
...@@ -4,11 +4,11 @@ module Resolvers ...@@ -4,11 +4,11 @@ module Resolvers
class EpicResolver < BaseResolver class EpicResolver < BaseResolver
argument :iid, GraphQL::ID_TYPE, argument :iid, GraphQL::ID_TYPE,
required: false, required: false,
description: 'The IID of the epic, e.g., "1"' description: 'IID of the epic, e.g., "1"'
argument :iids, [GraphQL::ID_TYPE], argument :iids, [GraphQL::ID_TYPE],
required: false, required: false,
description: 'The list of IIDs of epics, e.g., [1, 2]' description: 'List of IIDs of epics, e.g., [1, 2]'
argument :state, Types::EpicStateEnum, argument :state, Types::EpicStateEnum,
required: false, required: false,
......
...@@ -8,15 +8,18 @@ module Types ...@@ -8,15 +8,18 @@ module Types
present_using EpicIssuePresenter present_using EpicIssuePresenter
field :epic_issue_id, GraphQL::ID_TYPE, null: false # rubocop:disable Graphql/Descriptions field :epic_issue_id, GraphQL::ID_TYPE, null: false,
description: 'ID of the epic-issue relation'
field :relation_path, GraphQL::STRING_TYPE, null: true, resolve: -> (issue, args, ctx) do # rubocop:disable Graphql/Descriptions field :relation_path, GraphQL::STRING_TYPE, null: true,
description: 'URI path of the epic-issue relation',
resolve: -> (issue, args, ctx) do
issue.group_epic_issue_path(ctx[:current_user]) issue.group_epic_issue_path(ctx[:current_user])
end end
field :id, GraphQL::ID_TYPE, null: true, resolve: -> (issue, args, ctx) do field :id, GraphQL::ID_TYPE, null: true, resolve: -> (issue, args, ctx) do
issue.to_global_id issue.to_global_id
end, description: 'The global id of the epic-issue relation' end, description: 'Global ID of the epic-issue relation'
def epic_issue_id def epic_issue_id
"gid://gitlab/EpicIssue/#{object.epic_issue_id}" "gid://gitlab/EpicIssue/#{object.epic_issue_id}"
......
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