Commit e7086ba6 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'georgekoltsov/add-epic-award-emojis-graphql' into 'master'

Add award emoji to epics in GraphQL

See merge request gitlab-org/gitlab!52922
parents 74374871 5e0bd514
......@@ -1147,6 +1147,41 @@ type AwardEmojiAddPayload {
errors: [String!]!
}
"""
The connection type for AwardEmoji.
"""
type AwardEmojiConnection {
"""
A list of edges.
"""
edges: [AwardEmojiEdge]
"""
A list of nodes.
"""
nodes: [AwardEmoji]
"""
Information to aid in pagination.
"""
pageInfo: PageInfo!
}
"""
An edge in a connection.
"""
type AwardEmojiEdge {
"""
A cursor for use in pagination.
"""
cursor: String!
"""
The item at the end of the edge.
"""
node: AwardEmoji
}
"""
Autogenerated input type of AwardEmojiRemove
"""
......@@ -1540,6 +1575,31 @@ type BoardEpic implements CurrentUserTodos & Noteable {
"""
author: User!
"""
A list of award emojis associated with the epic
"""
awardEmoji(
"""
Returns the elements in the list that come after the specified cursor.
"""
after: String
"""
Returns the elements in the list that come before the specified cursor.
"""
before: String
"""
Returns the first _n_ elements from the list.
"""
first: Int
"""
Returns the last _n_ elements from the list.
"""
last: Int
): AwardEmojiConnection
"""
Children (sub-epics) of the epic
"""
......@@ -8323,6 +8383,31 @@ type Epic implements CurrentUserTodos & Noteable {
"""
author: User!
"""
A list of award emojis associated with the epic
"""
awardEmoji(
"""
Returns the elements in the list that come after the specified cursor.
"""
after: String
"""
Returns the elements in the list that come before the specified cursor.
"""
before: String
"""
Returns the first _n_ elements from the list.
"""
first: Int
"""
Returns the last _n_ elements from the list.
"""
last: Int
): AwardEmojiConnection
"""
Children (sub-epics) of the epic
"""
......
......@@ -2875,6 +2875,118 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "AwardEmojiConnection",
"description": "The connection type for AwardEmoji.",
"fields": [
{
"name": "edges",
"description": "A list of edges.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "AwardEmojiEdge",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "nodes",
"description": "A list of nodes.",
"args": [
],
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "AwardEmoji",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pageInfo",
"description": "Information to aid in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "PageInfo",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "AwardEmojiEdge",
"description": "An edge in a connection.",
"fields": [
{
"name": "cursor",
"description": "A cursor for use in pagination.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "node",
"description": "The item at the end of the edge.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "AwardEmoji",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "INPUT_OBJECT",
"name": "AwardEmojiRemoveInput",
......@@ -4001,6 +4113,59 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "awardEmoji",
"description": "A list of award emojis associated with the epic",
"args": [
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "before",
"description": "Returns the elements in the list that come before the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": "Returns the first _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "last",
"description": "Returns the last _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "AwardEmojiConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "children",
"description": "Children (sub-epics) of the epic",
......@@ -23117,6 +23282,59 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "awardEmoji",
"description": "A list of award emojis associated with the epic",
"args": [
{
"name": "after",
"description": "Returns the elements in the list that come after the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "before",
"description": "Returns the elements in the list that come before the specified cursor.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "first",
"description": "Returns the first _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "last",
"description": "Returns the last _n_ elements from the list.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "AwardEmojiConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "children",
"description": "Children (sub-epics) of the epic",
......@@ -263,6 +263,7 @@ Represents an epic on an issue board.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `author` | User! | Author of the epic |
| `awardEmoji` | AwardEmojiConnection | A list of award emojis associated with the epic |
| `children` | EpicConnection | Children (sub-epics) of the epic |
| `closedAt` | Time | Timestamp of when the epic was closed |
| `confidential` | Boolean | Indicates if the epic is confidential |
......@@ -1381,6 +1382,7 @@ Represents an epic.
| Field | Type | Description |
| ----- | ---- | ----------- |
| `author` | User! | Author of the epic |
| `awardEmoji` | AwardEmojiConnection | A list of award emojis associated with the epic |
| `children` | EpicConnection | Children (sub-epics) of the epic |
| `closedAt` | Time | Timestamp of when the epic was closed |
| `confidential` | Boolean | Indicates if the epic is confidential |
......
......@@ -141,6 +141,11 @@ module Types
field :health_status, Types::EpicHealthStatusType, null: true, complexity: 10,
description: 'Current health status of the epic'
field :award_emoji,
Types::AwardEmojis::AwardEmojiType.connection_type,
null: true,
description: 'A list of award emojis associated with the epic'
def has_children?
Gitlab::Graphql::Aggregations::Epics::LazyEpicAggregate.new(context, object.id, COUNT) do |node, _aggregate_object|
node.children.any?
......
---
title: Add award emoji to epics in GraphQL
merge_request: 52922
author:
type: added
......@@ -13,6 +13,7 @@ RSpec.describe GitlabSchema.types['Epic'] do
notes discussions relative_position subscribed participants
descendant_counts descendant_weight_sum upvotes downvotes
user_notes_count user_discussions_count health_status current_user_todos
award_emoji
]
end
......@@ -29,4 +30,6 @@ RSpec.describe GitlabSchema.types['Epic'] do
it { expect(described_class).to have_graphql_field(:subscribed, complexity: 5) }
it { expect(described_class).to have_graphql_field(:participants, complexity: 5) }
it { expect(described_class).to have_graphql_field(:award_emoji) }
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