Commit a34065a9 authored by Brian Kabiro's avatar Brian Kabiro Committed by Jan Provaznik

Remove ExtendedIssueType

- remove the ExtendedIssueType and include all fields in IssueType
- move subscribed field from ExtendedIssueType to IssueType
- add a complexity of 5 to the subscribed field
parent 47f8ad83
# frozen_string_literal: true
module Types
class ExtendedIssueType < IssueType
graphql_name 'ExtendedIssue'
authorize :read_issue
expose_permissions Types::PermissionTypes::Issue
present_using IssuePresenter
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
description: 'Boolean flag for whether the currently logged in user is subscribed to this issue'
end
end
......@@ -68,6 +68,8 @@ module Types
field :participants, Types::UserType.connection_type, null: true, complexity: 5,
description: 'List of participants in the issue'
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
description: 'Boolean flag for whether the currently logged in user is subscribed to this issue'
field :time_estimate, GraphQL::INT_TYPE, null: false,
description: 'Time estimate of the issue'
field :total_time_spent, GraphQL::INT_TYPE, null: false,
......
......@@ -135,7 +135,7 @@ module Types
resolver: Resolvers::IssuesResolver
field :issue,
Types::ExtendedIssueType,
Types::IssueType,
null: true,
description: 'A single issue of the project',
resolver: Resolvers::IssuesResolver.single
......
---
title: Expose subscribed field in issue lists queried with GraphQL
merge_request: 19458
author: briankabiro
type: changed
......@@ -1625,6 +1625,11 @@ type EpicIssue implements Noteable {
"""
state: IssueState!
"""
Boolean flag for whether the currently logged in user is subscribed to this issue
"""
subscribed: Boolean!
"""
Task completion status of the issue
"""
......@@ -1908,276 +1913,6 @@ type EpicTreeReorderPayload {
errors: [String!]!
}
type ExtendedIssue implements Noteable {
"""
Assignees of the issue
"""
assignees(
"""
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
): UserConnection
"""
User that created the issue
"""
author: User!
"""
Timestamp of when the issue was closed
"""
closedAt: Time
"""
Indicates the issue is confidential
"""
confidential: Boolean!
"""
Timestamp of when the issue was created
"""
createdAt: Time!
"""
Description of the issue
"""
description: String
"""
The GitLab Flavored Markdown rendering of `description`
"""
descriptionHtml: String
designCollection: DesignCollection
designs: DesignCollection @deprecated(reason: "use design_collection")
"""
Indicates discussion is locked on the issue
"""
discussionLocked: Boolean!
"""
All discussions on this noteable
"""
discussions(
"""
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
): DiscussionConnection!
"""
Number of downvotes the issue has received
"""
downvotes: Int!
"""
Due date of the issue
"""
dueDate: Time
"""
The epic to which issue belongs
"""
epic: Epic
"""
Internal ID of the issue
"""
iid: ID!
"""
Labels of the issue
"""
labels(
"""
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
): LabelConnection
"""
Milestone of the issue
"""
milestone: Milestone
"""
All notes on this noteable
"""
notes(
"""
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
): NoteConnection!
"""
List of participants in the issue
"""
participants(
"""
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
): UserConnection
"""
Internal reference of the issue. Returned in shortened format by default
"""
reference(
"""
Boolean option specifying whether the reference should be returned in full
"""
full: Boolean = false
): String!
"""
Relative position of the issue (used for positioning in epic tree and issue boards)
"""
relativePosition: Int
"""
State of the issue
"""
state: IssueState!
"""
Boolean flag for whether the currently logged in user is subscribed to this issue
"""
subscribed: Boolean!
"""
Task completion status of the issue
"""
taskCompletionStatus: TaskCompletionStatus!
"""
Time estimate of the issue
"""
timeEstimate: Int!
"""
Title of the issue
"""
title: String!
"""
The GitLab Flavored Markdown rendering of `title`
"""
titleHtml: String
"""
Total time reported as spent on the issue
"""
totalTimeSpent: Int!
"""
Timestamp of when the issue was last updated
"""
updatedAt: Time!
"""
Number of upvotes the issue has received
"""
upvotes: Int!
"""
Number of user notes of the issue
"""
userNotesCount: Int!
"""
Permissions for the current user on the resource
"""
userPermissions: IssuePermissions!
"""
Web path of the issue
"""
webPath: String!
"""
Web URL of the issue
"""
webUrl: String!
weight: Int
}
type Group {
"""
Avatar URL of the group
......@@ -2626,6 +2361,11 @@ type Issue implements Noteable {
"""
state: IssueState!
"""
Boolean flag for whether the currently logged in user is subscribed to this issue
"""
subscribed: Boolean!
"""
Task completion status of the issue
"""
......@@ -4270,7 +4010,7 @@ type Project {
Issues updated before this date
"""
updatedBefore: Time
): ExtendedIssue
): Issue
"""
Issues of the project
......
......@@ -506,7 +506,7 @@
],
"type": {
"kind": "OBJECT",
"name": "ExtendedIssue",
"name": "Issue",
"ofType": null
},
"isDeprecated": false,
......@@ -4359,11 +4359,6 @@
"name": "EpicIssue",
"ofType": null
},
{
"kind": "OBJECT",
"name": "ExtendedIssue",
"ofType": null
},
{
"kind": "OBJECT",
"name": "Issue",
......@@ -7368,6 +7363,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "subscribed",
"description": "Boolean flag for whether the currently logged in user is subscribed to this issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "taskCompletionStatus",
"description": "Task completion status of the issue",
......@@ -8734,6 +8747,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "subscribed",
"description": "Boolean flag for whether the currently logged in user is subscribed to this issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "taskCompletionStatus",
"description": "Task completion status of the issue",
......@@ -13653,801 +13684,6 @@
],
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "ExtendedIssue",
"description": null,
"fields": [
{
"name": "assignees",
"description": "Assignees of the issue",
"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": "UserConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "author",
"description": "User that created the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "User",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "closedAt",
"description": "Timestamp of when the issue was closed",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "confidential",
"description": "Indicates the issue is confidential",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "createdAt",
"description": "Timestamp of when the issue was created",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "description",
"description": "Description of the issue",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "descriptionHtml",
"description": "The GitLab Flavored Markdown rendering of `description`",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "designCollection",
"description": null,
"args": [
],
"type": {
"kind": "OBJECT",
"name": "DesignCollection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "designs",
"description": null,
"args": [
],
"type": {
"kind": "OBJECT",
"name": "DesignCollection",
"ofType": null
},
"isDeprecated": true,
"deprecationReason": "use design_collection"
},
{
"name": "discussionLocked",
"description": "Indicates discussion is locked on the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "discussions",
"description": "All discussions on this noteable",
"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": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "DiscussionConnection",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "downvotes",
"description": "Number of downvotes the issue has received",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "dueDate",
"description": "Due date of the issue",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "epic",
"description": "The epic to which issue belongs",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "Epic",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "iid",
"description": "Internal ID of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "ID",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "labels",
"description": "Labels of the issue",
"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": "LabelConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "milestone",
"description": "Milestone of the issue",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "Milestone",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "notes",
"description": "All notes on this noteable",
"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": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "NoteConnection",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "participants",
"description": "List of participants in the issue",
"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": "UserConnection",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "reference",
"description": "Internal reference of the issue. Returned in shortened format by default",
"args": [
{
"name": "full",
"description": "Boolean option specifying whether the reference should be returned in full",
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"defaultValue": "false"
}
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "relativePosition",
"description": "Relative position of the issue (used for positioning in epic tree and issue boards)",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "state",
"description": "State of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "ENUM",
"name": "IssueState",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "subscribed",
"description": "Boolean flag for whether the currently logged in user is subscribed to this issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "taskCompletionStatus",
"description": "Task completion status of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "TaskCompletionStatus",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "timeEstimate",
"description": "Time estimate of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "title",
"description": "Title of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "titleHtml",
"description": "The GitLab Flavored Markdown rendering of `title`",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "totalTimeSpent",
"description": "Total time reported as spent on the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "updatedAt",
"description": "Timestamp of when the issue was last updated",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Time",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "upvotes",
"description": "Number of upvotes the issue has received",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "userNotesCount",
"description": "Number of user notes of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "userPermissions",
"description": "Permissions for the current user on the resource",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "IssuePermissions",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "webPath",
"description": "Web path of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "webUrl",
"description": "Web URL of the issue",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "weight",
"description": null,
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [
{
"kind": "INTERFACE",
"name": "Noteable",
"ofType": null
}
],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "Metadata",
......
......@@ -254,6 +254,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `webPath` | String! | Web path of the issue |
| `webUrl` | String! | Web URL of the issue |
| `relativePosition` | Int | Relative position of the issue (used for positioning in epic tree and issue boards) |
| `subscribed` | Boolean! | Boolean flag for whether the currently logged in user is subscribed to this issue |
| `timeEstimate` | Int! | Time estimate of the issue |
| `totalTimeSpent` | Int! | Total time reported as spent on the issue |
| `closedAt` | Time | Timestamp of when the issue was closed |
......@@ -296,41 +297,6 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `clientMutationId` | String | A unique identifier for the client performing the mutation. |
| `errors` | String! => Array | Reasons why the mutation failed. |
### ExtendedIssue
| Name | Type | Description |
| --- | ---- | ---------- |
| `userPermissions` | IssuePermissions! | Permissions for the current user on the resource |
| `iid` | ID! | Internal ID of the issue |
| `title` | String! | Title of the issue |
| `titleHtml` | String | The GitLab Flavored Markdown rendering of `title` |
| `description` | String | Description of the issue |
| `descriptionHtml` | String | The GitLab Flavored Markdown rendering of `description` |
| `state` | IssueState! | State of the issue |
| `reference` | String! | Internal reference of the issue. Returned in shortened format by default |
| `author` | User! | User that created the issue |
| `milestone` | Milestone | Milestone of the issue |
| `dueDate` | Time | Due date of the issue |
| `confidential` | Boolean! | Indicates the issue is confidential |
| `discussionLocked` | Boolean! | Indicates discussion is locked on the issue |
| `upvotes` | Int! | Number of upvotes the issue has received |
| `downvotes` | Int! | Number of downvotes the issue has received |
| `userNotesCount` | Int! | Number of user notes of the issue |
| `webPath` | String! | Web path of the issue |
| `webUrl` | String! | Web URL of the issue |
| `relativePosition` | Int | Relative position of the issue (used for positioning in epic tree and issue boards) |
| `timeEstimate` | Int! | Time estimate of the issue |
| `totalTimeSpent` | Int! | Total time reported as spent on the issue |
| `closedAt` | Time | Timestamp of when the issue was closed |
| `createdAt` | Time! | Timestamp of when the issue was created |
| `updatedAt` | Time! | Timestamp of when the issue was last updated |
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `epic` | Epic | The epic to which issue belongs |
| `weight` | Int | |
| `designs` | DesignCollection | |
| `designCollection` | DesignCollection | |
| `subscribed` | Boolean! | Boolean flag for whether the currently logged in user is subscribed to this issue |
### Group
| Name | Type | Description |
......@@ -382,6 +348,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `webPath` | String! | Web path of the issue |
| `webUrl` | String! | Web URL of the issue |
| `relativePosition` | Int | Relative position of the issue (used for positioning in epic tree and issue boards) |
| `subscribed` | Boolean! | Boolean flag for whether the currently logged in user is subscribed to this issue |
| `timeEstimate` | Int! | Time estimate of the issue |
| `totalTimeSpent` | Int! | Total time reported as spent on the issue |
| `closedAt` | Time | Timestamp of when the issue was closed |
......@@ -678,7 +645,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `statistics` | ProjectStatistics | Statistics of the project |
| `repository` | Repository | Git repository of the project |
| `mergeRequest` | MergeRequest | A single merge request of the project |
| `issue` | ExtendedIssue | A single issue of the project |
| `issue` | Issue | A single issue of the project |
### ProjectPermissions
......
# frozen_string_literal: true
require 'spec_helper'
describe GitlabSchema.types['ExtendedIssue'] do
it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Issue) }
it { expect(described_class.graphql_name).to eq('ExtendedIssue') }
it { expect(described_class).to require_graphql_authorizations(:read_issue) }
it { expect(described_class.interfaces).to include(Types::Notes::NoteableType.to_graphql) }
it 'has specific fields' do
fields = Types::IssueType.fields.keys + [:subscribed]
fields.each do |field_name|
expect(described_class).to have_graphql_field(field_name)
end
end
end
......@@ -14,7 +14,7 @@ describe GitlabSchema.types['Issue'] do
it 'has specific fields' do
fields = %i[iid title description state reference author assignees participants labels milestone due_date
confidential discussion_locked upvotes downvotes user_notes_count web_path web_url relative_position
time_estimate total_time_spent closed_at created_at updated_at task_completion_status]
subscribed time_estimate total_time_spent closed_at created_at updated_at task_completion_status]
fields.each do |field_name|
expect(described_class).to have_graphql_field(field_name)
......
......@@ -33,7 +33,7 @@ describe GitlabSchema.types['Project'] do
subject { described_class.fields['issue'] }
it 'returns issue' do
is_expected.to have_graphql_type(Types::ExtendedIssueType)
is_expected.to have_graphql_type(Types::IssueType)
is_expected.to have_graphql_resolver(Resolvers::IssuesResolver.single)
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