Commit c397b417 authored by Amy Qualls's avatar Amy Qualls

Merge branch 'docs-aqualls-fix-graphql-definitions' into 'master'

API descriptions: revise from 'to[-]dos' to 'to-do items'

See merge request gitlab-org/gitlab!53158
parents ca6cef2e c61cd206
......@@ -21,7 +21,7 @@ module Mutations
field :todo,
Types::TodoType,
null: true,
description: "The todo after mutation."
description: "The to-do item after mutation."
field :issue,
Types::IssueType,
......
......@@ -14,7 +14,7 @@ module Mutations
field :todo, Types::TodoType,
null: true,
description: 'The to-do created.'
description: 'The to-do item created.'
def resolve(target_id:)
id = ::Types::GlobalIDType[Todoable].coerce_isolated_input(target_id)
......
......@@ -10,12 +10,12 @@ module Mutations
field :updated_ids,
[::Types::GlobalIDType[::Todo]],
null: false,
deprecated: { reason: 'Use todos', milestone: '13.2' },
description: 'Ids of the updated todos.'
deprecated: { reason: 'Use to-do items', milestone: '13.2' },
description: 'IDs of the updated to-do items.'
field :todos, [::Types::TodoType],
null: false,
description: 'Updated todos.'
description: 'Updated to-do items.'
def resolve
authorize!(current_user)
......
......@@ -10,11 +10,11 @@ module Mutations
argument :id,
::Types::GlobalIDType[::Todo],
required: true,
description: 'The global ID of the to-do to mark as done.'
description: 'The global ID of the to-do item to mark as done.'
field :todo, Types::TodoType,
null: false,
description: 'The requested to-do.'
description: 'The requested to-do item.'
def resolve(id:)
todo = authorized_find!(id: id)
......
......@@ -10,11 +10,11 @@ module Mutations
argument :id,
::Types::GlobalIDType[::Todo],
required: true,
description: 'The global ID of the to-do to restore.'
description: 'The global ID of the to-do item to restore.'
field :todo, Types::TodoType,
null: false,
description: 'The requested to-do.'
description: 'The requested to-do item.'
def resolve(id:)
todo = authorized_find!(id: id)
......
......@@ -10,16 +10,16 @@ module Mutations
argument :ids,
[::Types::GlobalIDType[::Todo]],
required: true,
description: 'The global IDs of the to-dos to restore (a maximum of 50 is supported at once).'
description: 'The global IDs of the to-do items to restore (a maximum of 50 is supported at once).'
field :updated_ids, [::Types::GlobalIDType[Todo]],
null: false,
description: 'The IDs of the updated to-do items.',
deprecated: { reason: 'Use todos', milestone: '13.2' }
deprecated: { reason: 'Use to-do items', milestone: '13.2' }
field :todos, [::Types::TodoType],
null: false,
description: 'Updated to-dos.'
description: 'Updated to-do items.'
def resolve(ids:)
check_update_amount_limit!(ids)
......@@ -46,7 +46,7 @@ module Mutations
end
def raise_too_many_todos_requested_error
raise Gitlab::Graphql::Errors::ArgumentError, 'Too many to-dos requested.'
raise Gitlab::Graphql::Errors::ArgumentError, 'Too many to-do items requested.'
end
def check_update_amount_limit!(ids)
......
......@@ -112,7 +112,7 @@ module Types
field :todos,
Types::TodoType.connection_type,
null: true,
description: 'To-dos of the current user for the alert.',
description: 'To-do items of the current user for the alert.',
resolver: Resolvers::TodoResolver
field :details_url,
......
......@@ -8,10 +8,10 @@ module Types
field_class Types::BaseField
field :current_user_todos, Types::TodoType.connection_type,
description: 'Todos for the current user.',
description: 'To-do items for the current user.',
null: false do
argument :state, Types::TodoStateEnum,
description: 'State of the todos.',
description: 'State of the to-do items.',
required: false
end
......
......@@ -10,42 +10,42 @@ module Types
authorize :read_todo
field :id, GraphQL::ID_TYPE,
description: 'ID of the to-do',
description: 'ID of the to-do item',
null: false
field :project, Types::ProjectType,
description: 'The project this to-do is associated with',
description: 'The project this to-do item is associated with',
null: true,
authorize: :read_project
field :group, Types::GroupType,
description: 'Group this to-do is associated with',
description: 'Group this to-do item is associated with',
null: true,
authorize: :read_group
field :author, Types::UserType,
description: 'The author of this to-do',
description: 'The author of this to-do item',
null: false
field :action, Types::TodoActionEnum,
description: 'Action of the to-do',
description: 'Action of the to-do item',
null: false
field :target_type, Types::TodoTargetEnum,
description: 'Target type of the to-do',
description: 'Target type of the to-do item',
null: false
field :body, GraphQL::STRING_TYPE,
description: 'Body of the to-do',
description: 'Body of the to-do item',
null: false,
calls_gitaly: true # TODO This is only true when `target_type` is `Commit`. See https://gitlab.com/gitlab-org/gitlab/issues/34757#note_234752665
field :state, Types::TodoStateEnum,
description: 'State of the to-do',
description: 'State of the to-do item',
null: false
field :created_at, Types::TimeType,
description: 'Timestamp this to-do was created',
description: 'Timestamp this to-do item was created',
null: false
def project
......
......@@ -31,7 +31,7 @@ module Types
description: 'Web path of the user'
field :todos, Types::TodoType.connection_type, null: false,
resolver: Resolvers::TodoResolver,
description: 'Todos of the user'
description: 'To-do items of the user'
field :group_memberships, Types::GroupMemberType.connection_type, null: true,
description: 'Group memberships of the user'
field :group_count, GraphQL::INT_TYPE, null: true,
......
......@@ -350,7 +350,7 @@ type AlertManagementAlert implements Noteable {
title: String
"""
To-dos of the current user for the alert.
To-do items of the current user for the alert.
"""
todos(
"""
......@@ -1017,7 +1017,7 @@ type AlertSetAssigneesPayload {
issue: Issue
"""
The todo after mutation.
The to-do item after mutation.
"""
todo: Todo
}
......@@ -1067,7 +1067,7 @@ type AlertTodoCreatePayload {
issue: Issue
"""
The todo after mutation.
The to-do item after mutation.
"""
todo: Todo
}
......@@ -1734,7 +1734,7 @@ type BoardEpic implements CurrentUserTodos & Noteable {
createdAt: Time
"""
Todos for the current user.
To-do items for the current user.
"""
currentUserTodos(
"""
......@@ -1758,7 +1758,7 @@ type BoardEpic implements CurrentUserTodos & Noteable {
last: Int
"""
State of the todos.
State of the to-do items.
"""
state: TodoStateEnum
): TodoConnection!
......@@ -4515,7 +4515,7 @@ type CreateAlertIssuePayload {
issue: Issue
"""
The todo after mutation.
The to-do item after mutation.
"""
todo: Todo
}
......@@ -5480,7 +5480,7 @@ type CreateTestCasePayload {
interface CurrentUserTodos {
"""
Todos for the current user.
To-do items for the current user.
"""
currentUserTodos(
"""
......@@ -5504,7 +5504,7 @@ interface CurrentUserTodos {
last: Int
"""
State of the todos.
State of the to-do items.
"""
state: TodoStateEnum
): TodoConnection!
......@@ -6622,7 +6622,7 @@ A single design
"""
type Design implements CurrentUserTodos & DesignFields & Noteable {
"""
Todos for the current user.
To-do items for the current user.
"""
currentUserTodos(
"""
......@@ -6646,7 +6646,7 @@ type Design implements CurrentUserTodos & DesignFields & Noteable {
last: Int
"""
State of the todos.
State of the to-do items.
"""
state: TodoStateEnum
): TodoConnection!
......@@ -8580,7 +8580,7 @@ type Epic implements CurrentUserTodos & Noteable {
createdAt: Time
"""
Todos for the current user.
To-do items for the current user.
"""
currentUserTodos(
"""
......@@ -8604,7 +8604,7 @@ type Epic implements CurrentUserTodos & Noteable {
last: Int
"""
State of the todos.
State of the to-do items.
"""
state: TodoStateEnum
): TodoConnection!
......@@ -9260,7 +9260,7 @@ type EpicIssue implements CurrentUserTodos & Noteable {
createdAt: Time!
"""
Todos for the current user.
To-do items for the current user.
"""
currentUserTodos(
"""
......@@ -9284,7 +9284,7 @@ type EpicIssue implements CurrentUserTodos & Noteable {
last: Int
"""
State of the todos.
State of the to-do items.
"""
state: TodoStateEnum
): TodoConnection!
......@@ -12471,7 +12471,7 @@ type Issue implements CurrentUserTodos & Noteable {
createdAt: Time!
"""
Todos for the current user.
To-do items for the current user.
"""
currentUserTodos(
"""
......@@ -12495,7 +12495,7 @@ type Issue implements CurrentUserTodos & Noteable {
last: Int
"""
State of the todos.
State of the to-do items.
"""
state: TodoStateEnum
): TodoConnection!
......@@ -14554,7 +14554,7 @@ type MergeRequest implements CurrentUserTodos & Noteable {
createdAt: Time!
"""
Todos for the current user.
To-do items for the current user.
"""
currentUserTodos(
"""
......@@ -14578,7 +14578,7 @@ type MergeRequest implements CurrentUserTodos & Noteable {
last: Int
"""
State of the todos.
State of the to-do items.
"""
state: TodoStateEnum
): TodoConnection!
......@@ -24925,47 +24925,47 @@ Representing a to-do entry
"""
type Todo {
"""
Action of the to-do
Action of the to-do item
"""
action: TodoActionEnum!
"""
The author of this to-do
The author of this to-do item
"""
author: User!
"""
Body of the to-do
Body of the to-do item
"""
body: String!
"""
Timestamp this to-do was created
Timestamp this to-do item was created
"""
createdAt: Time!
"""
Group this to-do is associated with
Group this to-do item is associated with
"""
group: Group
"""
ID of the to-do
ID of the to-do item
"""
id: ID!
"""
The project this to-do is associated with
The project this to-do item is associated with
"""
project: Project
"""
State of the to-do
State of the to-do item
"""
state: TodoStateEnum!
"""
Target type of the to-do
Target type of the to-do item
"""
targetType: TodoTargetEnum!
}
......@@ -25030,7 +25030,7 @@ type TodoCreatePayload {
errors: [String!]!
"""
The to-do created.
The to-do item created.
"""
todo: Todo
}
......@@ -25065,7 +25065,7 @@ input TodoMarkDoneInput {
clientMutationId: String
"""
The global ID of the to-do to mark as done.
The global ID of the to-do item to mark as done.
"""
id: TodoID!
}
......@@ -25085,7 +25085,7 @@ type TodoMarkDonePayload {
errors: [String!]!
"""
The requested to-do.
The requested to-do item.
"""
todo: Todo!
}
......@@ -25100,7 +25100,7 @@ input TodoRestoreInput {
clientMutationId: String
"""
The global ID of the to-do to restore.
The global ID of the to-do item to restore.
"""
id: TodoID!
}
......@@ -25115,7 +25115,7 @@ input TodoRestoreManyInput {
clientMutationId: String
"""
The global IDs of the to-dos to restore (a maximum of 50 is supported at once).
The global IDs of the to-do items to restore (a maximum of 50 is supported at once).
"""
ids: [TodoID!]!
}
......@@ -25135,14 +25135,14 @@ type TodoRestoreManyPayload {
errors: [String!]!
"""
Updated to-dos.
Updated to-do items.
"""
todos: [Todo!]!
"""
The IDs of the updated to-do items. Deprecated in 13.2: Use todos.
The IDs of the updated to-do items. Deprecated in 13.2: Use to-do items.
"""
updatedIds: [TodoID!]! @deprecated(reason: "Use todos. Deprecated in 13.2.")
updatedIds: [TodoID!]! @deprecated(reason: "Use to-do items. Deprecated in 13.2.")
}
"""
......@@ -25160,7 +25160,7 @@ type TodoRestorePayload {
errors: [String!]!
"""
The requested to-do.
The requested to-do item.
"""
todo: Todo!
}
......@@ -25232,14 +25232,14 @@ type TodosMarkAllDonePayload {
errors: [String!]!
"""
Updated todos.
Updated to-do items.
"""
todos: [Todo!]!
"""
Ids of the updated todos. Deprecated in 13.2: Use todos.
IDs of the updated to-do items. Deprecated in 13.2: Use to-do items.
"""
updatedIds: [TodoID!]! @deprecated(reason: "Use todos. Deprecated in 13.2.")
updatedIds: [TodoID!]! @deprecated(reason: "Use to-do items. Deprecated in 13.2.")
}
"""
......@@ -25509,7 +25509,7 @@ type UpdateAlertStatusPayload {
issue: Issue
"""
The todo after mutation.
The to-do item after mutation.
"""
todo: Todo
}
......@@ -26839,7 +26839,7 @@ type User {
status: UserStatus
"""
Todos of the user
To-do items of the user
"""
todos(
"""
......
This diff is collapsed.
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