Commit 0aa8a75d authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch...

Merge branch '326101-require-id-field-for-all-graphql-entities-in-all-queries-and-mutations' into 'master'

Require id field for all GraphQL operations

See merge request gitlab-org/gitlab!74180
parents efb8c564 58b52a50
...@@ -124,9 +124,9 @@ overrides: ...@@ -124,9 +124,9 @@ overrides:
parserOptions: parserOptions:
parser: '@graphql-eslint/eslint-plugin' parser: '@graphql-eslint/eslint-plugin'
operations: operations:
- '{,ee/,jh/}app/**/*.graphql' - '{,ee/,jh/}app/**/*.graphql'
# You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line # You can run `bundle exec rake gitlab:graphql:schema:dump` and then uncomment this line
# schema: './tmp/tests/graphql/gitlab_schema.graphql' # schema: './tmp/tests/graphql/gitlab_schema.graphql'
rules: rules:
filenames/match-regex: off filenames/match-regex: off
spaced-comment: off spaced-comment: off
...@@ -138,3 +138,4 @@ overrides: ...@@ -138,3 +138,4 @@ overrides:
#'@graphql-eslint/known-type-names': error #'@graphql-eslint/known-type-names': error
'@graphql-eslint/no-anonymous-operations': error '@graphql-eslint/no-anonymous-operations': error
'@graphql-eslint/unique-operation-name': error '@graphql-eslint/unique-operation-name': error
# '@graphql-eslint/require-id-when-available': error
query getAlertsCount($searchTerm: String, $projectPath: ID!, $assigneeUsername: String = "") { query getAlertsCount($searchTerm: String, $projectPath: ID!, $assigneeUsername: String = "") {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
alertManagementAlertStatusCounts(search: $searchTerm, assigneeUsername: $assigneeUsername) { alertManagementAlertStatusCounts(search: $searchTerm, assigneeUsername: $assigneeUsername) {
all all
open open
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
mutation createHttpIntegration($projectPath: ID!, $name: String!, $active: Boolean!) { mutation createHttpIntegration($projectPath: ID!, $name: String!, $active: Boolean!) {
httpIntegrationCreate(input: { projectPath: $projectPath, name: $name, active: $active }) { httpIntegrationCreate(input: { projectPath: $projectPath, name: $name, active: $active }) {
errors errors
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
integration { integration {
...HttpIntegrationItem ...HttpIntegrationItem
} }
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
mutation destroyHttpIntegration($id: ID!) { mutation destroyHttpIntegration($id: ID!) {
httpIntegrationDestroy(input: { id: $id }) { httpIntegrationDestroy(input: { id: $id }) {
errors errors
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
integration { integration {
...HttpIntegrationItem ...HttpIntegrationItem
} }
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
mutation resetHttpIntegrationToken($id: ID!) { mutation resetHttpIntegrationToken($id: ID!) {
httpIntegrationResetToken(input: { id: $id }) { httpIntegrationResetToken(input: { id: $id }) {
errors errors
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
integration { integration {
...HttpIntegrationItem ...HttpIntegrationItem
} }
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
mutation updateHttpIntegration($id: ID!, $name: String!, $active: Boolean!) { mutation updateHttpIntegration($id: ID!, $name: String!, $active: Boolean!) {
httpIntegrationUpdate(input: { id: $id, name: $name, active: $active }) { httpIntegrationUpdate(input: { id: $id, name: $name, active: $active }) {
errors errors
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
integration { integration {
...HttpIntegrationItem ...HttpIntegrationItem
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query getHttpIntegration($projectPath: ID!, $id: ID) { query getHttpIntegration($projectPath: ID!, $id: ID) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
alertManagementHttpIntegrations(id: $id) { alertManagementHttpIntegrations(id: $id) {
nodes { nodes {
...HttpIntegrationPayloadData ...HttpIntegrationPayloadData
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query getIntegrations($projectPath: ID!) { query getIntegrations($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
alertManagementIntegrations { alertManagementIntegrations {
nodes { nodes {
...IntegrationItem ...IntegrationItem
......
query parsePayloadFields($projectPath: ID!, $payload: String!) { query parsePayloadFields($projectPath: ID!, $payload: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
alertManagementPayloadFields(payloadExample: $payload) { alertManagementPayloadFields(payloadExample: $payload) {
path path
label label
......
...@@ -5,6 +5,7 @@ query analyticsGetGroupProjects( ...@@ -5,6 +5,7 @@ query analyticsGetGroupProjects(
$includeSubgroups: Boolean = false $includeSubgroups: Boolean = false
) { ) {
group(fullPath: $groupFullPath) { group(fullPath: $groupFullPath) {
id
projects( projects(
search: $search search: $search
first: $first first: $first
......
query getKeepLatestArtifactProjectSetting($fullPath: ID!) { query getKeepLatestArtifactProjectSetting($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
ciCdSettings { ciCdSettings {
keepLatestArtifact keepLatestArtifact
} }
......
...@@ -7,6 +7,7 @@ query BoardLabels( ...@@ -7,6 +7,7 @@ query BoardLabels(
$isProject: Boolean = false $isProject: Boolean = false
) { ) {
group(fullPath: $fullPath) @include(if: $isGroup) { group(fullPath: $fullPath) @include(if: $isGroup) {
id
labels(searchTerm: $searchTerm, onlyGroupLabels: true, includeAncestorGroups: true) { labels(searchTerm: $searchTerm, onlyGroupLabels: true, includeAncestorGroups: true) {
nodes { nodes {
...Label ...Label
...@@ -14,6 +15,7 @@ query BoardLabels( ...@@ -14,6 +15,7 @@ query BoardLabels(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
labels(searchTerm: $searchTerm, includeAncestorGroups: true) { labels(searchTerm: $searchTerm, includeAncestorGroups: true) {
nodes { nodes {
...Label ...Label
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
mutation createBoardList($boardId: BoardID!, $backlog: Boolean, $labelId: LabelID) { mutation createBoardList($boardId: BoardID!, $backlog: Boolean, $labelId: LabelID) {
boardListCreate(input: { boardId: $boardId, backlog: $backlog, labelId: $labelId }) { boardListCreate(input: { boardId: $boardId, backlog: $backlog, labelId: $labelId }) {
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
list { list {
...BoardListFragment ...BoardListFragment
} }
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
mutation UpdateBoardList($listId: ID!, $position: Int, $collapsed: Boolean) { mutation UpdateBoardList($listId: ID!, $position: Int, $collapsed: Boolean) {
updateBoardList(input: { listId: $listId, position: $position, collapsed: $collapsed }) { updateBoardList(input: { listId: $listId, position: $position, collapsed: $collapsed }) {
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
list { list {
...BoardListFragment ...BoardListFragment
} }
......
...@@ -8,9 +8,14 @@ query BoardLists( ...@@ -8,9 +8,14 @@ query BoardLists(
$isProject: Boolean = false $isProject: Boolean = false
) { ) {
group(fullPath: $fullPath) @include(if: $isGroup) { group(fullPath: $fullPath) @include(if: $isGroup) {
id
board(id: $boardId) { board(id: $boardId) {
id
hideBacklogList hideBacklogList
lists(issueFilters: $filters) { lists(issueFilters: $filters) {
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
nodes { nodes {
...BoardListFragment ...BoardListFragment
} }
...@@ -18,9 +23,14 @@ query BoardLists( ...@@ -18,9 +23,14 @@ query BoardLists(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
board(id: $boardId) { board(id: $boardId) {
id
hideBacklogList hideBacklogList
lists(issueFilters: $filters) { lists(issueFilters: $filters) {
# We have ID in a deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
nodes { nodes {
...BoardListFragment ...BoardListFragment
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query GroupBoard($fullPath: ID!, $boardId: ID!) { query GroupBoard($fullPath: ID!, $boardId: ID!) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
id
board(id: $boardId) { board(id: $boardId) {
...BoardScopeFragment ...BoardScopeFragment
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query GroupBoardMembers($fullPath: ID!, $search: String) { query GroupBoardMembers($fullPath: ID!, $search: String) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
assignees: groupMembers(search: $search, relations: [DIRECT, DESCENDANTS, INHERITED]) { assignees: groupMembers(search: $search, relations: [DIRECT, DESCENDANTS, INHERITED]) {
__typename __typename
nodes { nodes {
......
query GroupBoardMilestones($fullPath: ID!, $searchTerm: String) { query GroupBoardMilestones($fullPath: ID!, $searchTerm: String) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
milestones(includeAncestors: true, searchTitle: $searchTerm) { milestones(includeAncestors: true, searchTitle: $searchTerm) {
nodes { nodes {
id id
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query group_boards($fullPath: ID!) { query group_boards($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
boards { boards {
edges { edges {
node { node {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query boardsGetGroupProjects($fullPath: ID!, $search: String, $after: String) { query boardsGetGroupProjects($fullPath: ID!, $search: String, $after: String) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
projects(search: $search, after: $after, first: 100, includeSubgroups: true) { projects(search: $search, after: $after, first: 100, includeSubgroups: true) {
nodes { nodes {
id id
......
mutation issueSetSubscription($input: IssueSetSubscriptionInput!) { mutation issueSetSubscription($input: IssueSetSubscriptionInput!) {
updateIssuableSubscription: issueSetSubscription(input: $input) { updateIssuableSubscription: issueSetSubscription(input: $input) {
issue { issue {
id
subscribed subscribed
} }
errors errors
......
mutation issueSetTitle($input: UpdateIssueInput!) { mutation issueSetTitle($input: UpdateIssueInput!) {
updateIssuableTitle: updateIssue(input: $input) { updateIssuableTitle: updateIssue(input: $input) {
issue { issue {
id
title title
} }
errors errors
......
...@@ -11,7 +11,9 @@ query BoardListEE( ...@@ -11,7 +11,9 @@ query BoardListEE(
$first: Int $first: Int
) { ) {
group(fullPath: $fullPath) @include(if: $isGroup) { group(fullPath: $fullPath) @include(if: $isGroup) {
id
board(id: $boardId) { board(id: $boardId) {
id
lists(id: $id, issueFilters: $filters) { lists(id: $id, issueFilters: $filters) {
nodes { nodes {
id id
...@@ -33,7 +35,9 @@ query BoardListEE( ...@@ -33,7 +35,9 @@ query BoardListEE(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
board(id: $boardId) { board(id: $boardId) {
id
lists(id: $id, issueFilters: $filters) { lists(id: $id, issueFilters: $filters) {
nodes { nodes {
id id
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query ProjectBoard($fullPath: ID!, $boardId: ID!) { query ProjectBoard($fullPath: ID!, $boardId: ID!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
board(id: $boardId) { board(id: $boardId) {
...BoardScopeFragment ...BoardScopeFragment
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query ProjectBoardMembers($fullPath: ID!, $search: String) { query ProjectBoardMembers($fullPath: ID!, $search: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
assignees: projectMembers(search: $search) { assignees: projectMembers(search: $search) {
__typename __typename
nodes { nodes {
......
query ProjectBoardMilestones($fullPath: ID!, $searchTerm: String) { query ProjectBoardMilestones($fullPath: ID!, $searchTerm: String) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
milestones(searchTitle: $searchTerm, includeAncestors: true) { milestones(searchTitle: $searchTerm, includeAncestors: true) {
nodes { nodes {
id id
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query project_boards($fullPath: ID!) { query project_boards($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
boards { boards {
edges { edges {
node { node {
......
...@@ -5,6 +5,7 @@ query boardProjectMilestones( ...@@ -5,6 +5,7 @@ query boardProjectMilestones(
$searchTitle: String $searchTitle: String
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
milestones(state: $state, includeAncestors: $includeAncestors, searchTitle: $searchTitle) { milestones(state: $state, includeAncestors: $includeAncestors, searchTitle: $searchTitle) {
edges { edges {
node { node {
......
...@@ -4,8 +4,8 @@ fragment Token on ClusterAgentToken { ...@@ -4,8 +4,8 @@ fragment Token on ClusterAgentToken {
description description
lastUsedAt lastUsedAt
name name
createdByUser { createdByUser {
id
name name
} }
} }
...@@ -10,11 +10,13 @@ query getClusterAgent( ...@@ -10,11 +10,13 @@ query getClusterAgent(
$beforeToken: String $beforeToken: String
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
clusterAgent(name: $agentName) { clusterAgent(name: $agentName) {
id id
createdAt createdAt
createdByUser { createdByUser {
id
name name
} }
......
...@@ -13,6 +13,7 @@ export function addAgentToStore(store, createClusterAgent, query, variables) { ...@@ -13,6 +13,7 @@ export function addAgentToStore(store, createClusterAgent, query, variables) {
const data = produce(sourceData, (draftData) => { const data = produce(sourceData, (draftData) => {
const configuration = { const configuration = {
id: clusterAgent.id,
name: clusterAgent.name, name: clusterAgent.name,
path: getAgentConfigPath(clusterAgent.name), path: getAgentConfigPath(clusterAgent.name),
webPath: clusterAgent.webPath, webPath: clusterAgent.webPath,
......
...@@ -4,6 +4,7 @@ fragment ClusterAgentFragment on ClusterAgent { ...@@ -4,6 +4,7 @@ fragment ClusterAgentFragment on ClusterAgent {
webPath webPath
tokens { tokens {
nodes { nodes {
id
lastUsedAt lastUsedAt
} }
} }
......
query agentConfigurations($projectPath: ID!) { query agentConfigurations($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
agentConfigurations { agentConfigurations {
nodes { nodes {
agentName agentName
...@@ -8,6 +9,7 @@ query agentConfigurations($projectPath: ID!) { ...@@ -8,6 +9,7 @@ query agentConfigurations($projectPath: ID!) {
clusterAgents { clusterAgents {
nodes { nodes {
id
name name
} }
} }
......
...@@ -12,6 +12,7 @@ query getAgents( ...@@ -12,6 +12,7 @@ query getAgents(
$beforeTree: String $beforeTree: String
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
clusterAgents(first: $first, last: $last, before: $beforeAgent, after: $afterAgent) { clusterAgents(first: $first, last: $last, before: $beforeAgent, after: $afterAgent) {
nodes { nodes {
...ClusterAgentFragment ...ClusterAgentFragment
...@@ -28,6 +29,7 @@ query getAgents( ...@@ -28,6 +29,7 @@ query getAgents(
tree(path: ".gitlab/agents", ref: $defaultBranchName) { tree(path: ".gitlab/agents", ref: $defaultBranchName) {
trees(first: $first, last: $last, after: $afterTree, before: $beforeTree) { trees(first: $first, last: $last, after: $afterTree, before: $beforeTree) {
nodes { nodes {
id
name name
path path
webPath webPath
......
fragment ResolvedStatus on Discussion { fragment ResolvedStatus on Discussion {
id
resolvable resolvable
resolved resolved
resolvedAt resolvedAt
resolvedBy { resolvedBy {
id
name name
webUrl webUrl
} }
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
mutation uploadDesign($files: [Upload!]!, $projectPath: ID!, $iid: ID!) { mutation uploadDesign($files: [Upload!]!, $projectPath: ID!, $iid: ID!) {
designManagementUpload(input: { projectPath: $projectPath, iid: $iid, files: $files }) { designManagementUpload(input: { projectPath: $projectPath, iid: $iid, files: $files }) {
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
designs { designs {
...DesignItem ...DesignItem
versions { versions {
...@@ -14,6 +16,7 @@ mutation uploadDesign($files: [Upload!]!, $projectPath: ID!, $iid: ID!) { ...@@ -14,6 +16,7 @@ mutation uploadDesign($files: [Upload!]!, $projectPath: ID!, $iid: ID!) {
} }
} }
skippedDesigns { skippedDesigns {
id
filename filename
} }
errors errors
......
...@@ -10,8 +10,11 @@ query getDesign( ...@@ -10,8 +10,11 @@ query getDesign(
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id id
issue(iid: $iid) { issue(iid: $iid) {
id
designCollection { designCollection {
designs(atVersion: $atVersion, filenames: $filenames) { designs(atVersion: $atVersion, filenames: $filenames) {
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
nodes { nodes {
...DesignItem ...DesignItem
issue { issue {
......
query errorDetails($fullPath: ID!, $errorId: ID!) { query errorDetails($fullPath: ID!, $errorId: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
sentryErrors { sentryErrors {
detailedError(id: $errorId) { detailedError(id: $errorId) {
id id
......
...@@ -6,6 +6,7 @@ fragment AlertListItem on AlertManagementAlert { ...@@ -6,6 +6,7 @@ fragment AlertListItem on AlertManagementAlert {
startedAt startedAt
eventCount eventCount
issue { issue {
id
iid iid
state state
title title
......
...@@ -12,6 +12,7 @@ fragment AlertDetailItem on AlertManagementAlert { ...@@ -12,6 +12,7 @@ fragment AlertDetailItem on AlertManagementAlert {
endedAt endedAt
hosts hosts
environment { environment {
id
name name
path path
} }
......
fragment TimelogFragment on Timelog { fragment TimelogFragment on Timelog {
timeSpent timeSpent
user { user {
id
name name
} }
spentAt spentAt
note { note {
id
body body
} }
summary summary
......
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
fragment UserAvailability on User { fragment UserAvailability on User {
status { status {
availability availability
......
mutation createMergeRequest($input: MergeRequestCreateInput!) { mutation createMergeRequest($input: MergeRequestCreateInput!) {
mergeRequestCreate(input: $input) { mergeRequestCreate(input: $input) {
mergeRequest { mergeRequest {
id
iid iid
} }
errors errors
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query alertDetails($fullPath: ID!, $alertId: String) { query alertDetails($fullPath: ID!, $alertId: String) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
alertManagementAlerts(iid: $alertId) { alertManagementAlerts(iid: $alertId) {
nodes { nodes {
...AlertDetailItem ...AlertDetailItem
......
...@@ -14,6 +14,7 @@ query getAlerts( ...@@ -14,6 +14,7 @@ query getAlerts(
$domain: AlertManagementDomainFilter = operations $domain: AlertManagementDomainFilter = operations
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
alertManagementAlerts( alertManagementAlerts(
search: $searchTerm search: $searchTerm
assigneeUsername: $assigneeUsername assigneeUsername: $assigneeUsername
......
...@@ -6,6 +6,7 @@ query groupUsersSearch($search: String!, $fullPath: ID!) { ...@@ -6,6 +6,7 @@ query groupUsersSearch($search: String!, $fullPath: ID!) {
id id
users: groupMembers(search: $search, relations: [DIRECT, DESCENDANTS, INHERITED]) { users: groupMembers(search: $search, relations: [DIRECT, DESCENDANTS, INHERITED]) {
nodes { nodes {
id
user { user {
...User ...User
...UserAvailability ...UserAvailability
......
...@@ -3,6 +3,7 @@ query searchProjectMembers($fullPath: ID!, $search: String) { ...@@ -3,6 +3,7 @@ query searchProjectMembers($fullPath: ID!, $search: String) {
id id
projectMembers(search: $search) { projectMembers(search: $search) {
nodes { nodes {
id
user { user {
id id
name name
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
query projectUsersSearch($search: String!, $fullPath: ID!) { query projectUsersSearch($search: String!, $fullPath: ID!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
users: projectMembers(search: $search, relations: [DIRECT, INHERITED, INVITED_GROUPS]) { users: projectMembers(search: $search, relations: [DIRECT, INHERITED, INVITED_GROUPS]) {
nodes { nodes {
id
user { user {
...User ...User
...UserAvailability ...UserAvailability
......
fragment IdeProject on Project { fragment IdeProject on Project {
id
userPermissions { userPermissions {
createMergeRequestIn createMergeRequestIn
readMergeRequest readMergeRequest
......
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
fragment IncidentFields on Issue { fragment IncidentFields on Issue {
severity severity
} }
...@@ -6,6 +6,7 @@ query getIncidentsCountByStatus( ...@@ -6,6 +6,7 @@ query getIncidentsCountByStatus(
$assigneeUsername: String = "" $assigneeUsername: String = ""
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
issueStatusCounts( issueStatusCounts(
search: $searchTerm search: $searchTerm
types: $issueTypes types: $issueTypes
......
...@@ -14,6 +14,7 @@ query getIncidents( ...@@ -14,6 +14,7 @@ query getIncidents(
$assigneeUsername: String = "" $assigneeUsername: String = ""
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
issues( issues(
search: $searchTerm search: $searchTerm
types: $issueTypes types: $issueTypes
...@@ -27,18 +28,21 @@ query getIncidents( ...@@ -27,18 +28,21 @@ query getIncidents(
before: $prevPageCursor before: $prevPageCursor
) { ) {
nodes { nodes {
id
iid iid
title title
createdAt createdAt
state state
labels { labels {
nodes { nodes {
id
title title
color color
} }
} }
assignees { assignees {
nodes { nodes {
id
name name
username username
avatarUrl avatarUrl
......
query issueSuggestion($fullPath: ID!, $search: String) { query issueSuggestion($fullPath: ID!, $search: String) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issues(search: $search, sort: updated_desc, first: 5) { issues(search: $search, sort: updated_desc, first: 5) {
edges { edges {
node { node {
id
iid iid
title title
confidential confidential
...@@ -14,6 +16,7 @@ query issueSuggestion($fullPath: ID!, $search: String) { ...@@ -14,6 +16,7 @@ query issueSuggestion($fullPath: ID!, $search: String) {
createdAt createdAt
updatedAt updatedAt
author { author {
id
name name
username username
avatarUrl avatarUrl
......
query getAlert($iid: String!, $fullPath: ID!) { query getAlert($iid: String!, $fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issue(iid: $iid) { issue(iid: $iid) {
id id
alertManagementAlert { alertManagementAlert {
......
mutation promoteToEpic($input: PromoteToEpicInput!) { mutation promoteToEpic($input: PromoteToEpicInput!) {
promoteToEpic(input: $input) { promoteToEpic(input: $input) {
epic { epic {
id
webPath webPath
} }
errors errors
......
...@@ -26,6 +26,7 @@ query getIssues( ...@@ -26,6 +26,7 @@ query getIssues(
$lastPageSize: Int $lastPageSize: Int
) { ) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
issues( issues(
includeSubgroups: true includeSubgroups: true
search: $search search: $search
...@@ -56,6 +57,7 @@ query getIssues( ...@@ -56,6 +57,7 @@ query getIssues(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
issues( issues(
search: $search search: $search
sort: $sort sort: $sort
......
...@@ -16,6 +16,7 @@ query getIssuesCount( ...@@ -16,6 +16,7 @@ query getIssuesCount(
$not: NegatedIssueFilterInput $not: NegatedIssueFilterInput
) { ) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
openedIssues: issues( openedIssues: issues(
includeSubgroups: true includeSubgroups: true
state: opened state: opened
...@@ -69,6 +70,7 @@ query getIssuesCount( ...@@ -69,6 +70,7 @@ query getIssuesCount(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
openedIssues: issues( openedIssues: issues(
state: opened state: opened
search: $search search: $search
......
query getIssuesListDetails($fullPath: ID!) { query getIssuesListDetails($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issues { issues {
nodes { nodes {
id
labels { labels {
nodes { nodes {
id
title title
color color
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query searchLabels($fullPath: ID!, $search: String, $isProject: Boolean = false) { query searchLabels($fullPath: ID!, $search: String, $isProject: Boolean = false) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
labels(searchTerm: $search, includeAncestorGroups: true, includeDescendantGroups: true) { labels(searchTerm: $search, includeAncestorGroups: true, includeDescendantGroups: true) {
nodes { nodes {
...Label ...Label
...@@ -9,6 +10,7 @@ query searchLabels($fullPath: ID!, $search: String, $isProject: Boolean = false) ...@@ -9,6 +10,7 @@ query searchLabels($fullPath: ID!, $search: String, $isProject: Boolean = false)
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
labels(searchTerm: $search, includeAncestorGroups: true) { labels(searchTerm: $search, includeAncestorGroups: true) {
nodes { nodes {
...Label ...Label
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = false) { query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = false) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
milestones(searchTitle: $search, includeAncestors: true, includeDescendants: true) { milestones(searchTitle: $search, includeAncestors: true, includeDescendants: true) {
nodes { nodes {
...Milestone ...Milestone
...@@ -9,6 +10,7 @@ query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = fa ...@@ -9,6 +10,7 @@ query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = fa
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
milestones(searchTitle: $search, includeAncestors: true) { milestones(searchTitle: $search, includeAncestors: true) {
nodes { nodes {
...Milestone ...Milestone
......
query searchProjects($fullPath: ID!, $search: String) { query searchProjects($fullPath: ID!, $search: String) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
projects(search: $search, includeSubgroups: true) { projects(search: $search, includeSubgroups: true) {
nodes { nodes {
id id
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
query searchUsers($fullPath: ID!, $search: String, $isProject: Boolean = false) { query searchUsers($fullPath: ID!, $search: String, $isProject: Boolean = false) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
groupMembers(search: $search) { groupMembers(search: $search) {
nodes { nodes {
id
user { user {
...User ...User
} }
...@@ -11,8 +13,10 @@ query searchUsers($fullPath: ID!, $search: String, $isProject: Boolean = false) ...@@ -11,8 +13,10 @@ query searchUsers($fullPath: ID!, $search: String, $isProject: Boolean = false)
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
projectMembers(search: $search) { projectMembers(search: $search) {
nodes { nodes {
id
user { user {
...User ...User
} }
......
...@@ -5,6 +5,7 @@ query getProject( ...@@ -5,6 +5,7 @@ query getProject(
$branchNamesSearchPattern: String! $branchNamesSearchPattern: String!
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
repository { repository {
branchNames( branchNames(
limit: $branchNamesLimit limit: $branchNamesLimit
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query getJiraImportDetails($fullPath: ID!) { query getJiraImportDetails($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
jiraImportStatus jiraImportStatus
jiraImports { jiraImports {
nodes { nodes {
......
...@@ -2,6 +2,7 @@ fragment JiraImport on JiraImport { ...@@ -2,6 +2,7 @@ fragment JiraImport on JiraImport {
jiraProjectKey jiraProjectKey
scheduledAt scheduledAt
scheduledBy { scheduledBy {
id
name name
} }
} }
query jiraSearchProjectMembers($fullPath: ID!, $search: String) { query jiraSearchProjectMembers($fullPath: ID!, $search: String) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
projectMembers(search: $search) { projectMembers(search: $search) {
nodes { nodes {
id
user { user {
id id
name name
......
...@@ -7,6 +7,7 @@ query getJobs( ...@@ -7,6 +7,7 @@ query getJobs(
$statuses: [CiJobStatus!] $statuses: [CiJobStatus!]
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
jobs(after: $after, before: $before, first: $first, last: $last, statuses: $statuses) { jobs(after: $after, before: $before, first: $first, last: $last, statuses: $statuses) {
pageInfo { pageInfo {
endCursor endCursor
...@@ -27,6 +28,7 @@ query getJobs( ...@@ -27,6 +28,7 @@ query getJobs(
triggered triggered
createdByTag createdByTag
detailedStatus { detailedStatus {
id
detailsPath detailsPath
group group
icon icon
...@@ -34,6 +36,7 @@ query getJobs( ...@@ -34,6 +36,7 @@ query getJobs(
text text
tooltip tooltip
action { action {
id
buttonTitle buttonTitle
icon icon
method method
...@@ -51,11 +54,13 @@ query getJobs( ...@@ -51,11 +54,13 @@ query getJobs(
id id
path path
user { user {
id
webPath webPath
avatarUrl avatarUrl
} }
} }
stage { stage {
id
name name
} }
name name
......
...@@ -7,6 +7,7 @@ query getDashboardValidationWarnings( ...@@ -7,6 +7,7 @@ query getDashboardValidationWarnings(
id id
environments(name: $environmentName) { environments(name: $environmentName) {
nodes { nodes {
id
name name
metricsDashboard(path: $dashboardPath) { metricsDashboard(path: $dashboardPath) {
path path
......
query mergeRequest($projectPath: ID!, $mergeRequestIID: String!) { query mergeRequest($projectPath: ID!, $mergeRequestIID: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $mergeRequestIID) { mergeRequest(iid: $mergeRequestIID) {
id
title title
createdAt createdAt
state state
headPipeline { headPipeline {
id
detailedStatus { detailedStatus {
id
icon icon
group group
} }
......
...@@ -9,6 +9,7 @@ query getContainerRepositoriesDetails( ...@@ -9,6 +9,7 @@ query getContainerRepositoriesDetails(
$sort: ContainerRepositorySort $sort: ContainerRepositorySort
) { ) {
project(fullPath: $fullPath) @skip(if: $isGroupPage) { project(fullPath: $fullPath) @skip(if: $isGroupPage) {
id
containerRepositories( containerRepositories(
name: $name name: $name
after: $after after: $after
...@@ -24,6 +25,7 @@ query getContainerRepositoriesDetails( ...@@ -24,6 +25,7 @@ query getContainerRepositoriesDetails(
} }
} }
group(fullPath: $fullPath) @include(if: $isGroupPage) { group(fullPath: $fullPath) @include(if: $isGroupPage) {
id
containerRepositories( containerRepositories(
name: $name name: $name
after: $after after: $after
......
...@@ -11,6 +11,7 @@ query getContainerRepositoryDetails($id: ID!) { ...@@ -11,6 +11,7 @@ query getContainerRepositoryDetails($id: ID!) {
expirationPolicyStartedAt expirationPolicyStartedAt
expirationPolicyCleanupStatus expirationPolicyCleanupStatus
project { project {
id
visibility visibility
path path
containerExpirationPolicy { containerExpirationPolicy {
......
...@@ -8,6 +8,7 @@ query getDependencyProxyDetails( ...@@ -8,6 +8,7 @@ query getDependencyProxyDetails(
$before: String $before: String
) { ) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
dependencyProxyBlobCount dependencyProxyBlobCount
dependencyProxyTotalSize dependencyProxyTotalSize
dependencyProxyImagePrefix dependencyProxyImagePrefix
...@@ -16,6 +17,7 @@ query getDependencyProxyDetails( ...@@ -16,6 +17,7 @@ query getDependencyProxyDetails(
} }
dependencyProxyManifests(after: $after, before: $before, first: $first, last: $last) { dependencyProxyManifests(after: $after, before: $before, first: $first, last: $last) {
nodes { nodes {
id
createdAt createdAt
imageName imageName
} }
......
...@@ -7,20 +7,24 @@ fragment PackageData on Package { ...@@ -7,20 +7,24 @@ fragment PackageData on Package {
status status
tags { tags {
nodes { nodes {
id
name name
} }
} }
pipelines(last: 1) { pipelines(last: 1) {
nodes { nodes {
id
sha sha
ref ref
commitPath commitPath
user { user {
id
name name
} }
} }
} }
project { project {
id
fullPath fullPath
webUrl webUrl
} }
......
...@@ -8,6 +8,7 @@ query getPackageDetails($id: ID!) { ...@@ -8,6 +8,7 @@ query getPackageDetails($id: ID!) {
updatedAt updatedAt
status status
project { project {
id
path path
} }
tags(first: 10) { tags(first: 10) {
...@@ -25,9 +26,11 @@ query getPackageDetails($id: ID!) { ...@@ -25,9 +26,11 @@ query getPackageDetails($id: ID!) {
commitPath commitPath
path path
user { user {
id
name name
} }
project { project {
id
name name
webUrl webUrl
} }
...@@ -86,15 +89,18 @@ query getPackageDetails($id: ID!) { ...@@ -86,15 +89,18 @@ query getPackageDetails($id: ID!) {
} }
} }
... on PypiMetadata { ... on PypiMetadata {
id
requiredPython requiredPython
} }
... on ConanMetadata { ... on ConanMetadata {
id
packageChannel packageChannel
packageUsername packageUsername
recipe recipe
recipePath recipePath
} }
... on MavenMetadata { ... on MavenMetadata {
id
appName appName
appGroup appGroup
appVersion appVersion
...@@ -102,6 +108,7 @@ query getPackageDetails($id: ID!) { ...@@ -102,6 +108,7 @@ query getPackageDetails($id: ID!) {
} }
... on NugetMetadata { ... on NugetMetadata {
id
iconUrl iconUrl
licenseUrl licenseUrl
projectUrl projectUrl
......
...@@ -14,6 +14,7 @@ query getPackages( ...@@ -14,6 +14,7 @@ query getPackages(
$before: String $before: String
) { ) {
project(fullPath: $fullPath) @skip(if: $isGroupPage) { project(fullPath: $fullPath) @skip(if: $isGroupPage) {
id
packages( packages(
sort: $sort sort: $sort
packageName: $packageName packageName: $packageName
...@@ -33,6 +34,7 @@ query getPackages( ...@@ -33,6 +34,7 @@ query getPackages(
} }
} }
group(fullPath: $fullPath) @include(if: $isGroupPage) { group(fullPath: $fullPath) @include(if: $isGroupPage) {
id
packages( packages(
sort: $groupSort sort: $groupSort
packageName: $packageName packageName: $packageName
......
query getGroupPackagesSettings($fullPath: ID!) { query getGroupPackagesSettings($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
dependencyProxySetting { dependencyProxySetting {
enabled enabled
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query getProjectExpirationPolicy($projectPath: ID!) { query getProjectExpirationPolicy($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
containerExpirationPolicy { containerExpirationPolicy {
...ContainerExpirationPolicyFields ...ContainerExpirationPolicyFields
} }
......
query getMergeRequestState($projectPath: ID!, $iid: String!) { query getMergeRequestState($projectPath: ID!, $iid: String!) {
workspace: project(fullPath: $projectPath) { workspace: project(fullPath: $projectPath) {
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
id
state state
} }
} }
......
...@@ -22,6 +22,7 @@ mutation commitCIFile( ...@@ -22,6 +22,7 @@ mutation commitCIFile(
__typename __typename
commit { commit {
__typename __typename
id
sha sha
} }
commitPipelinePath commitPipelinePath
......
...@@ -5,6 +5,7 @@ query getAvailableBranches( ...@@ -5,6 +5,7 @@ query getAvailableBranches(
$searchPattern: String! $searchPattern: String!
) { ) {
project(fullPath: $projectFullPath) { project(fullPath: $projectFullPath) {
id
repository { repository {
branchNames(limit: $limit, offset: $offset, searchPattern: $searchPattern) branchNames(limit: $limit, offset: $offset, searchPattern: $searchPattern)
} }
......
query getBlobContent($projectPath: ID!, $path: String!, $ref: String) { query getBlobContent($projectPath: ID!, $path: String!, $ref: String) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
repository { repository {
blobs(paths: [$path], ref: $ref) { blobs(paths: [$path], ref: $ref) {
nodes { nodes {
id
rawBlob rawBlob
} }
} }
......
query getPipeline($fullPath: ID!, $sha: String!) { query getPipeline($fullPath: ID!, $sha: String!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
pipeline(sha: $sha) { pipeline(sha: $sha) {
id id
iid iid
status status
commit { commit {
id
title title
webPath webPath
} }
detailedStatus { detailedStatus {
id
detailsPath detailsPath
icon icon
group group
......
query getTemplate($projectPath: ID!, $templateName: String!) { query getTemplate($projectPath: ID!, $templateName: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
ciTemplate(name: $templateName) { ciTemplate(name: $templateName) {
content content
} }
......
query getLatestCommitSha($projectPath: ID!, $ref: String) { query getLatestCommitSha($projectPath: ID!, $ref: String) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
repository { repository {
tree(ref: $ref) { tree(ref: $ref) {
lastCommit { lastCommit {
id
sha sha
} }
} }
......
query getDagVisData($projectPath: ID!, $iid: ID!) { query getDagVisData($projectPath: ID!, $iid: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
pipeline(iid: $iid) { pipeline(iid: $iid) {
id id
stages { stages {
nodes { nodes {
id
name name
groups { groups {
nodes { nodes {
id
name name
size size
jobs { jobs {
nodes { nodes {
id
name name
needs { needs {
nodes { nodes {
id
name name
} }
} }
......
query getPipelineHeaderData($fullPath: ID!, $iid: ID!) { query getPipelineHeaderData($fullPath: ID!, $iid: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
pipeline(iid: $iid) { pipeline(iid: $iid) {
id id
iid iid
...@@ -11,6 +12,7 @@ query getPipelineHeaderData($fullPath: ID!, $iid: ID!) { ...@@ -11,6 +12,7 @@ query getPipelineHeaderData($fullPath: ID!, $iid: ID!) {
updatePipeline updatePipeline
} }
detailedStatus { detailedStatus {
id
detailsPath detailsPath
icon icon
group group
......
query getLinkedPipelines($fullPath: ID!, $iid: ID!) { query getLinkedPipelines($fullPath: ID!, $iid: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
pipeline(iid: $iid) { pipeline(iid: $iid) {
id
path path
downstream { downstream {
nodes { nodes {
id id
path path
project { project {
id
name name
} }
detailedStatus { detailedStatus {
id
group group
icon icon
label label
...@@ -20,9 +24,11 @@ query getLinkedPipelines($fullPath: ID!, $iid: ID!) { ...@@ -20,9 +24,11 @@ query getLinkedPipelines($fullPath: ID!, $iid: ID!) {
id id
path path
project { project {
id
name name
} }
detailedStatus { detailedStatus {
id
group group
icon icon
label label
......
query searchNamespacesWhereUserCanCreateProjects($search: String) { query searchNamespacesWhereUserCanCreateProjects($search: String) {
currentUser { currentUser {
id
groups(permissionScope: CREATE_PROJECTS, search: $search) { groups(permissionScope: CREATE_PROJECTS, search: $search) {
nodes { nodes {
id id
......
query getPipelineCountByStatus($projectPath: ID!) { query getPipelineCountByStatus($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
totalPipelines: pipelines { totalPipelines: pipelines {
count count
} }
......
query getProjectPipelineStatistics($projectPath: ID!) { query getProjectPipelineStatistics($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
pipelineAnalytics { pipelineAnalytics {
weekPipelinesTotals weekPipelinesTotals
weekPipelinesLabels weekPipelinesLabels
......
...@@ -35,6 +35,7 @@ fragment Release on Release { ...@@ -35,6 +35,7 @@ fragment Release on Release {
__typename __typename
nodes { nodes {
__typename __typename
id
filepath filepath
collectedAt collectedAt
sha sha
...@@ -52,12 +53,14 @@ fragment Release on Release { ...@@ -52,12 +53,14 @@ fragment Release on Release {
} }
commit { commit {
__typename __typename
id
sha sha
webUrl webUrl
title title
} }
author { author {
__typename __typename
id
webUrl webUrl
avatarUrl avatarUrl
username username
......
...@@ -18,6 +18,7 @@ fragment ReleaseForEditing on Release { ...@@ -18,6 +18,7 @@ fragment ReleaseForEditing on Release {
} }
milestones { milestones {
nodes { nodes {
id
title title
} }
} }
......
...@@ -16,6 +16,7 @@ query allReleasesDeprecated( ...@@ -16,6 +16,7 @@ query allReleasesDeprecated(
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
__typename __typename
id
releases(first: $first, last: $last, before: $before, after: $after, sort: $sort) { releases(first: $first, last: $last, before: $before, after: $after, sort: $sort) {
__typename __typename
nodes { nodes {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query oneRelease($fullPath: ID!, $tagName: String!) { query oneRelease($fullPath: ID!, $tagName: String!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
release(tagName: $tagName) { release(tagName: $tagName) {
...Release ...Release
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query oneReleaseForEditing($fullPath: ID!, $tagName: String!) { query oneReleaseForEditing($fullPath: ID!, $tagName: String!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
release(tagName: $tagName) { release(tagName: $tagName) {
...ReleaseForEditing ...ReleaseForEditing
} }
......
...@@ -4,6 +4,7 @@ mutation toggleLock($projectPath: ID!, $filePath: String!, $lock: Boolean!) { ...@@ -4,6 +4,7 @@ mutation toggleLock($projectPath: ID!, $filePath: String!, $lock: Boolean!) {
id id
pathLocks { pathLocks {
nodes { nodes {
id
path path
} }
} }
......
...@@ -9,6 +9,7 @@ query getBlobInfo($projectPath: ID!, $filePath: String!, $ref: String!) { ...@@ -9,6 +9,7 @@ query getBlobInfo($projectPath: ID!, $filePath: String!, $ref: String!) {
} }
pathLocks { pathLocks {
nodes { nodes {
id
path path
} }
} }
...@@ -16,6 +17,7 @@ query getBlobInfo($projectPath: ID!, $filePath: String!, $ref: String!) { ...@@ -16,6 +17,7 @@ query getBlobInfo($projectPath: ID!, $filePath: String!, $ref: String!) {
empty empty
blobs(paths: [$filePath], ref: $ref) { blobs(paths: [$filePath], ref: $ref) {
nodes { nodes {
id
webPath webPath
name name
size size
......
...@@ -13,6 +13,7 @@ query getGroupRunners( ...@@ -13,6 +13,7 @@ query getGroupRunners(
$sort: CiRunnerSort $sort: CiRunnerSort
) { ) {
group(fullPath: $groupFullPath) { group(fullPath: $groupFullPath) {
id
runners( runners(
membership: DESCENDANTS membership: DESCENDANTS
before: $before before: $before
......
#import "ee_else_ce/runner/graphql/runner_details.fragment.graphql" #import "ee_else_ce/runner/graphql/runner_details.fragment.graphql"
query getRunner($id: CiRunnerID!) { query getRunner($id: CiRunnerID!) {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
runner(id: $id) { runner(id: $id) {
...RunnerDetails ...RunnerDetails
} }
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
mutation runnerUpdate($input: RunnerUpdateInput!) { mutation runnerUpdate($input: RunnerUpdateInput!) {
runnerUpdate(input: $input) { runnerUpdate(input: $input) {
# We have an id in deep nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
runner { runner {
...RunnerDetails ...RunnerDetails
} }
......
mutation updateIssueLocked($input: IssueSetLockedInput!) { mutation updateIssueLocked($input: IssueSetLockedInput!) {
issueSetLocked(input: $input) { issueSetLocked(input: $input) {
issue { issue {
id
discussionLocked discussionLocked
} }
errors errors
......
mutation updateMergeRequestLocked($input: MergeRequestSetLockedInput!) { mutation updateMergeRequestLocked($input: MergeRequestSetLockedInput!) {
mergeRequestSetLocked(input: $input) { mergeRequestSetLocked(input: $input) {
mergeRequest { mergeRequest {
id
discussionLocked discussionLocked
} }
errors errors
......
...@@ -3,6 +3,7 @@ mutation updateIssuableSeverity($projectPath: ID!, $severity: IssuableSeverity!, ...@@ -3,6 +3,7 @@ mutation updateIssuableSeverity($projectPath: ID!, $severity: IssuableSeverity!,
errors errors
issue { issue {
iid iid
id
severity severity
} }
} }
......
query epicConfidential($fullPath: ID!, $iid: ID) { query epicConfidential($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
id id
......
query epicDueDate($fullPath: ID!, $iid: ID) { query epicDueDate($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
id id
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
query epicParticipants($fullPath: ID!, $iid: ID) { query epicParticipants($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
id id
......
query epicReference($fullPath: ID!, $iid: ID) { query epicReference($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
id id
......
query epicStartDate($fullPath: ID!, $iid: ID) { query epicStartDate($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
id id
......
query epicSubscribed($fullPath: ID!, $iid: ID) { query epicSubscribed($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
emailsDisabled emailsDisabled
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
......
query epicTodos($fullPath: ID!, $iid: ID) { query epicTodos($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
id id
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
subscription issuableAssigneesUpdated($issuableId: IssuableID!) { subscription issuableAssigneesUpdated($issuableId: IssuableID!) {
issuableAssigneesUpdated(issuableId: $issuableId) { issuableAssigneesUpdated(issuableId: $issuableId) {
... on Issue { ... on Issue {
id
assignees { assignees {
nodes { nodes {
...User ...User
......
query issueConfidential($fullPath: ID!, $iid: String) { query issueConfidential($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
query issueDueDate($fullPath: ID!, $iid: String) { query issueDueDate($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
query issueReference($fullPath: ID!, $iid: String) { query issueReference($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
__typename __typename
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
......
query issueSubscribed($fullPath: ID!, $iid: String) { query issueSubscribed($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
query issueTimeTracking($fullPath: ID!, $iid: String) { query issueTimeTracking($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
query issueTodos($fullPath: ID!, $iid: String!) { query issueTodos($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query mergeRequestMilestone($fullPath: ID!, $iid: String!) { query mergeRequestMilestone($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
__typename __typename
id id
......
query mergeRequestReference($fullPath: ID!, $iid: String!) { query mergeRequestReference($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
__typename __typename
id id
......
query mergeRequestSubscribed($fullPath: ID!, $iid: String!) { query mergeRequestSubscribed($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
__typename __typename
id id
......
query mergeRequestTimeTracking($fullPath: ID!, $iid: String!) { query mergeRequestTimeTracking($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
__typename __typename
id id
......
query mergeRequestTodos($fullPath: ID!, $iid: String!) { query mergeRequestTodos($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
__typename __typename
id id
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query projectIssueMilestone($fullPath: ID!, $iid: String!) { query projectIssueMilestone($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query projectMilestones($fullPath: ID!, $title: String, $state: MilestoneStateEnum) { query projectMilestones($fullPath: ID!, $title: String, $state: MilestoneStateEnum) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
attributes: milestones( attributes: milestones(
searchTitle: $title searchTitle: $title
state: $state state: $state
......
query sidebarDetails($fullPath: ID!, $iid: String!) { query sidebarDetails($fullPath: ID!, $iid: String!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issue(iid: $iid) { issue(iid: $iid) {
id
iid iid
} }
} }
......
query mergeRequestSidebarDetails($fullPath: ID!, $iid: String!) { query mergeRequestSidebarDetails($fullPath: ID!, $iid: String!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
iid # currently unused. iid # currently unused.
} }
} }
......
mutation updateEpicTitle($input: UpdateEpicInput!) { mutation updateEpicTitle($input: UpdateEpicInput!) {
updateIssuableTitle: updateEpic(input: $input) { updateIssuableTitle: updateEpic(input: $input) {
epic { epic {
id
title title
} }
errors errors
......
fragment SnippetProject on Snippet {
project {
fullPath
webUrl
}
}
...@@ -2,6 +2,7 @@ mutation CreateSnippet($input: CreateSnippetInput!) { ...@@ -2,6 +2,7 @@ mutation CreateSnippet($input: CreateSnippetInput!) {
createSnippet(input: $input) { createSnippet(input: $input) {
errors errors
snippet { snippet {
id
webUrl webUrl
} }
} }
......
...@@ -2,6 +2,7 @@ mutation UpdateSnippet($input: UpdateSnippetInput!) { ...@@ -2,6 +2,7 @@ mutation UpdateSnippet($input: UpdateSnippetInput!) {
updateSnippet(input: $input) { updateSnippet(input: $input) {
errors errors
snippet { snippet {
id
webUrl webUrl
} }
} }
......
query sourceContent($project: ID!, $sourcePath: String!) { query sourceContent($project: ID!, $sourcePath: String!) {
project(fullPath: $project) { project(fullPath: $project) {
id
fullPath fullPath
file(path: $sourcePath) @client { file(path: $sourcePath) @client {
title title
......
#import "~/graphql_shared/fragments/user.fragment.graphql" #import "~/graphql_shared/fragments/user.fragment.graphql"
fragment StateVersion on TerraformStateVersion { fragment StateVersion on TerraformStateVersion {
id
downloadPath downloadPath
serial serial
updatedAt updatedAt
createdByUser { createdByUser {
...User ...User
} }
job { job {
id
detailedStatus { detailedStatus {
id
detailsPath detailsPath
group group
icon icon
label label
text text
} }
pipeline { pipeline {
id id
path path
......
...@@ -3,13 +3,12 @@ ...@@ -3,13 +3,12 @@
query getStates($projectPath: ID!, $first: Int, $last: Int, $before: String, $after: String) { query getStates($projectPath: ID!, $first: Int, $last: Int, $before: String, $after: String) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
terraformStates(first: $first, last: $last, before: $before, after: $after) { terraformStates(first: $first, last: $last, before: $before, after: $after) {
count count
nodes { nodes {
...State ...State
} }
pageInfo { pageInfo {
...PageInfo ...PageInfo
} }
......
query getCIJobTokenScope($fullPath: ID!) { query getCIJobTokenScope($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
ciCdSettings { ciCdSettings {
jobTokenScopeEnabled jobTokenScopeEnabled
} }
......
query getProjectsWithCIJobTokenScope($fullPath: ID!) { query getProjectsWithCIJobTokenScope($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
ciJobTokenScope { ciJobTokenScope {
projects { projects {
nodes { nodes {
id
name name
fullPath fullPath
} }
......
query getAllIssues($projectPath: ID!) { query getAllIssues($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
issues { issues {
nodes { nodes {
id id
......
query getProjectIssues($projectPath: ID!) { query getProjectIssues($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
issues { issues {
count count
} }
......
query getState($projectPath: ID!, $iid: String!) { query getState($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
archived archived
onlyAllowMergeIfPipelineSucceeds onlyAllowMergeIfPipelineSucceeds
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
autoMergeEnabled autoMergeEnabled
commitCount commitCount
conflicts conflicts
......
query userPermissionsQuery($projectPath: ID!, $iid: String!) { query userPermissionsQuery($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
userPermissions { userPermissions {
canMerge canMerge
pushToSourceBranch pushToSourceBranch
......
fragment autoMergeEnabled on MergeRequest { fragment autoMergeEnabled on MergeRequest {
id
autoMergeStrategy autoMergeStrategy
mergeUser { mergeUser {
id id
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query autoMergeEnabled($projectPath: ID!, $iid: String!) { query autoMergeEnabled($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
...autoMergeEnabled ...autoMergeEnabled
} }
......
query autoMergeFailedQuery($projectPath: ID!, $iid: String!) { query autoMergeFailedQuery($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
mergeError mergeError
} }
} }
......
query workInProgress($projectPath: ID!, $iid: String!) { query workInProgress($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
shouldBeRebased shouldBeRebased
sourceBranchProtected sourceBranchProtected
} }
......
query mrUserPermission($projectPath: ID!, $iid: String!) { query mrUserPermission($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
userPermissions { userPermissions {
updateMergeRequest updateMergeRequest
} }
......
query missingBranchQuery($projectPath: ID!, $iid: String!) { query missingBranchQuery($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
sourceBranchExists sourceBranchExists
} }
} }
......
query getReadyToMergeStatus($projectPath: ID!, $iid: String!) { query getReadyToMergeStatus($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
userPermissions { userPermissions {
canMerge canMerge
} }
......
fragment ReadyToMerge on Project { fragment ReadyToMerge on Project {
id
onlyAllowMergeIfPipelineSucceeds onlyAllowMergeIfPipelineSucceeds
mergeRequestsFfOnlyEnabled mergeRequestsFfOnlyEnabled
squashReadOnly squashReadOnly
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
autoMergeEnabled autoMergeEnabled
shouldRemoveSourceBranch shouldRemoveSourceBranch
forceRemoveSourceBranch forceRemoveSourceBranch
...@@ -26,6 +28,7 @@ fragment ReadyToMerge on Project { ...@@ -26,6 +28,7 @@ fragment ReadyToMerge on Project {
mergeError mergeError
commitsWithoutMergeCommits { commitsWithoutMergeCommits {
nodes { nodes {
id
sha sha
shortId shortId
title title
......
query rebaseQuery($projectPath: ID!, $iid: String!) { query rebaseQuery($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
rebaseInProgress rebaseInProgress
targetBranch targetBranch
userPermissions { userPermissions {
......
mutation toggleDraftStatus($projectPath: ID!, $iid: String!, $draft: Boolean!) { mutation toggleDraftStatus($projectPath: ID!, $iid: String!, $draft: Boolean!) {
mergeRequestSetDraft(input: { projectPath: $projectPath, iid: $iid, draft: $draft }) { mergeRequestSetDraft(input: { projectPath: $projectPath, iid: $iid, draft: $draft }) {
mergeRequest { mergeRequest {
id
mergeableDiscussionsState mergeableDiscussionsState
title title
draft draft
......
...@@ -2,6 +2,7 @@ mutation createAlertIssue($projectPath: ID!, $iid: String!) { ...@@ -2,6 +2,7 @@ mutation createAlertIssue($projectPath: ID!, $iid: String!) {
createAlertIssue(input: { iid: $iid, projectPath: $projectPath }) { createAlertIssue(input: { iid: $iid, projectPath: $projectPath }) {
errors errors
issue { issue {
id
iid iid
webUrl webUrl
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query alertDetailsAssignees($fullPath: ID!, $alertId: String) { query alertDetailsAssignees($fullPath: ID!, $alertId: String) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
alertManagementAlerts(iid: $alertId) { alertManagementAlerts(iid: $alertId) {
nodes { nodes {
...AlertDetailItem ...AlertDetailItem
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query epicLabels($fullPath: ID!, $iid: ID) { query epicLabels($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
id id
labels { labels {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query issueLabels($fullPath: ID!, $iid: String) { query issueLabels($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
id id
labels { labels {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query mergeRequestLabels($fullPath: ID!, $iid: String!) { query mergeRequestLabels($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
id id
labels { labels {
......
...@@ -7,6 +7,7 @@ query alertAssignees( ...@@ -7,6 +7,7 @@ query alertAssignees(
$iid: String! $iid: String!
) { ) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
issuable: alertManagementAlert(domain: $domain, iid: $iid) { issuable: alertManagementAlert(domain: $domain, iid: $iid) {
iid iid
assignees { assignees {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
query issueAssignees($fullPath: ID!, $iid: String!) { query issueAssignees($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
query issueParticipants($fullPath: ID!, $iid: String!) { query issueParticipants($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query getMrAssignees($fullPath: ID!, $iid: String!) { query getMrAssignees($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
id id
assignees { assignees {
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query getMrParticipants($fullPath: ID!, $iid: String!) { query getMrParticipants($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
issuable: mergeRequest(iid: $iid) { issuable: mergeRequest(iid: $iid) {
id id
participants { participants {
......
fragment JobArtifacts on Pipeline { fragment JobArtifacts on Pipeline {
id
jobs(securityReportTypes: $reportTypes) { jobs(securityReportTypes: $reportTypes) {
nodes { nodes {
id
name name
artifacts { artifacts {
nodes { nodes {
......
...@@ -4,11 +4,14 @@ query securityReportDownloadPaths( ...@@ -4,11 +4,14 @@ query securityReportDownloadPaths(
$reportTypes: [SecurityReportTypeEnum!] $reportTypes: [SecurityReportTypeEnum!]
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
headPipeline { headPipeline {
id id
jobs(securityReportTypes: $reportTypes) { jobs(securityReportTypes: $reportTypes) {
nodes { nodes {
id
name name
artifacts { artifacts {
nodes { nodes {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
query getPipelineCorpuses($projectPath: ID!, $iid: ID, $reportTypes: [SecurityReportTypeEnum!]) { query getPipelineCorpuses($projectPath: ID!, $iid: ID, $reportTypes: [SecurityReportTypeEnum!]) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
pipeline(iid: $iid) { pipeline(iid: $iid) {
id
...JobArtifacts ...JobArtifacts
} }
} }
......
...@@ -10,6 +10,7 @@ query getProjectContainerRepositories( ...@@ -10,6 +10,7 @@ query getProjectContainerRepositories(
) { ) {
project(fullPath: $fullPath) @skip(if: $isGroupPage) { project(fullPath: $fullPath) @skip(if: $isGroupPage) {
__typename __typename
id
containerRepositoriesCount containerRepositoriesCount
containerRepositories( containerRepositories(
name: $name name: $name
...@@ -43,6 +44,7 @@ query getProjectContainerRepositories( ...@@ -43,6 +44,7 @@ query getProjectContainerRepositories(
} }
group(fullPath: $fullPath) @include(if: $isGroupPage) { group(fullPath: $fullPath) @include(if: $isGroupPage) {
__typename __typename
id
containerRepositoriesCount containerRepositoriesCount
containerRepositories( containerRepositories(
name: $name name: $name
......
...@@ -4,6 +4,7 @@ query permissions($fullPath: ID!, $iid: String!) { ...@@ -4,6 +4,7 @@ query permissions($fullPath: ID!, $iid: String!) {
id id
issue(iid: $iid) { issue(iid: $iid) {
__typename __typename
id
userPermissions { userPermissions {
__typename __typename
createDesign createDesign
......
...@@ -4,6 +4,7 @@ query getDesignList($fullPath: ID!, $iid: String!, $atVersion: ID) { ...@@ -4,6 +4,7 @@ query getDesignList($fullPath: ID!, $iid: String!, $atVersion: ID) {
id id
issue(iid: $iid) { issue(iid: $iid) {
__typename __typename
id
designCollection { designCollection {
__typename __typename
copyState copyState
......
...@@ -47,6 +47,7 @@ fragment EpicNode on Epic { ...@@ -47,6 +47,7 @@ fragment EpicNode on Epic {
hasIssues hasIssues
group { group {
__typename __typename
id
fullPath fullPath
} }
} }
...@@ -70,6 +71,9 @@ query childItems( ...@@ -70,6 +71,9 @@ query childItems(
__typename __typename
edges { edges {
__typename __typename
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
node { node {
__typename __typename
...EpicNode ...EpicNode
...@@ -86,6 +90,7 @@ query childItems( ...@@ -86,6 +90,7 @@ query childItems(
__typename __typename
node { node {
__typename __typename
id
iid iid
epicIssueId epicIssueId
title title
...@@ -106,6 +111,7 @@ query childItems( ...@@ -106,6 +111,7 @@ query childItems(
__typename __typename
node { node {
__typename __typename
id
webUrl webUrl
name name
username username
...@@ -115,6 +121,7 @@ query childItems( ...@@ -115,6 +121,7 @@ query childItems(
} }
milestone { milestone {
__typename __typename
id
title title
startDate startDate
dueDate dueDate
......
query epicDetails($fullPath: ID!, $iid: ID!) { query epicDetails($fullPath: ID!, $iid: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
__typename __typename
id
epic(iid: $iid) { epic(iid: $iid) {
__typename __typename
id
participants { participants {
__typename __typename
edges { edges {
__typename __typename
node { node {
__typename __typename
id
name name
avatarUrl avatarUrl
webUrl webUrl
......
...@@ -5,16 +5,19 @@ fragment LinkedPipelineData on Pipeline { ...@@ -5,16 +5,19 @@ fragment LinkedPipelineData on Pipeline {
path path
status: detailedStatus { status: detailedStatus {
__typename __typename
id
group group
label label
icon icon
} }
sourceJob { sourceJob {
__typename __typename
id
name name
} }
project { project {
__typename __typename
id
name name
fullPath fullPath
} }
...@@ -23,6 +26,7 @@ fragment LinkedPipelineData on Pipeline { ...@@ -23,6 +26,7 @@ fragment LinkedPipelineData on Pipeline {
query getPipelineDetails($projectPath: ID!, $iid: ID!) { query getPipelineDetails($projectPath: ID!, $iid: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
__typename __typename
id
pipeline(iid: $iid) { pipeline(iid: $iid) {
__typename __typename
id id
...@@ -45,11 +49,14 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) { ...@@ -45,11 +49,14 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) {
__typename __typename
nodes { nodes {
__typename __typename
id
name name
status: detailedStatus { status: detailedStatus {
__typename __typename
id
action { action {
__typename __typename
id
icon icon
path path
title title
...@@ -59,8 +66,10 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) { ...@@ -59,8 +66,10 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) {
__typename __typename
nodes { nodes {
__typename __typename
id
status: detailedStatus { status: detailedStatus {
__typename __typename
id
label label
group group
icon icon
...@@ -71,17 +80,20 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) { ...@@ -71,17 +80,20 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) {
__typename __typename
nodes { nodes {
__typename __typename
id
name name
scheduledAt scheduledAt
needs { needs {
__typename __typename
nodes { nodes {
__typename __typename
id
name name
} }
} }
status: detailedStatus { status: detailedStatus {
__typename __typename
id
icon icon
tooltip tooltip
hasDetails hasDetails
...@@ -89,6 +101,7 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) { ...@@ -89,6 +101,7 @@ query getPipelineDetails($projectPath: ID!, $iid: ID!) {
group group
action { action {
__typename __typename
id
buttonTitle buttonTitle
icon icon
path path
......
...@@ -11,6 +11,7 @@ query allReleases( ...@@ -11,6 +11,7 @@ query allReleases(
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
__typename __typename
id
releases(first: $first, last: $last, before: $before, after: $after, sort: $sort) { releases(first: $first, last: $last, before: $before, after: $after, sort: $sort) {
__typename __typename
nodes { nodes {
...@@ -50,6 +51,7 @@ query allReleases( ...@@ -50,6 +51,7 @@ query allReleases(
__typename __typename
nodes { nodes {
__typename __typename
id
filepath filepath
collectedAt collectedAt
sha sha
...@@ -67,12 +69,14 @@ query allReleases( ...@@ -67,12 +69,14 @@ query allReleases(
} }
commit { commit {
__typename __typename
id
sha sha
webUrl webUrl
title title
} }
author { author {
__typename __typename
id
webUrl webUrl
avatarUrl avatarUrl
username username
......
query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) { query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
__typename __typename
id
repository { repository {
__typename __typename
tree(path: $path, ref: $ref) { tree(path: $path, ref: $ref) {
__typename __typename
lastCommit { lastCommit {
__typename __typename
id
sha sha
title title
titleHtml titleHtml
...@@ -19,6 +20,7 @@ query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) { ...@@ -19,6 +20,7 @@ query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) {
authorGravatar authorGravatar
author { author {
__typename __typename
id
name name
avatarUrl avatarUrl
webPath webPath
...@@ -30,8 +32,10 @@ query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) { ...@@ -30,8 +32,10 @@ query pathLastCommit($projectPath: ID!, $path: String, $ref: String!) {
__typename __typename
node { node {
__typename __typename
id
detailedStatus { detailedStatus {
__typename __typename
id
detailsPath detailsPath
icon icon
tooltip tooltip
......
query CanCreateProjectSnippet($fullPath: ID!) { query CanCreateProjectSnippet($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
__typename __typename
id
userPermissions { userPermissions {
__typename __typename
createSnippet createSnippet
......
...@@ -49,6 +49,7 @@ query GetSnippetQuery($ids: [SnippetID!]) { ...@@ -49,6 +49,7 @@ query GetSnippetQuery($ids: [SnippetID!]) {
} }
project { project {
__typename __typename
id
fullPath fullPath
webUrl webUrl
} }
......
query CanCreatePersonalSnippet { query CanCreatePersonalSnippet {
currentUser { currentUser {
__typename __typename
id
userPermissions { userPermissions {
__typename __typename
createSnippet createSnippet
......
...@@ -17,6 +17,9 @@ mutation createHttpIntegrationEE( ...@@ -17,6 +17,9 @@ mutation createHttpIntegrationEE(
} }
) { ) {
errors errors
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
integration { integration {
...HttpIntegrationItem ...HttpIntegrationItem
} }
......
...@@ -17,6 +17,9 @@ mutation updateHttpIntegrationEE( ...@@ -17,6 +17,9 @@ mutation updateHttpIntegrationEE(
} }
) { ) {
errors errors
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
integration { integration {
...HttpIntegrationItem ...HttpIntegrationItem
} }
......
query GroupReleaseStats($fullPath: ID!) { query GroupReleaseStats($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
stats { stats {
releaseStats { releaseStats {
releasesCount releasesCount
......
...@@ -18,6 +18,7 @@ query getThroughputTableData( ...@@ -18,6 +18,7 @@ query getThroughputTableData(
$notMilestoneTitle: String $notMilestoneTitle: String
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
mergeRequests( mergeRequests(
first: $firstPageSize first: $firstPageSize
last: $lastPageSize last: $lastPageSize
...@@ -38,16 +39,19 @@ query getThroughputTableData( ...@@ -38,16 +39,19 @@ query getThroughputTableData(
...PageInfo ...PageInfo
} }
nodes { nodes {
id
iid iid
title title
createdAt createdAt
mergedAt mergedAt
webUrl webUrl
milestone { milestone {
id
title title
} }
assignees { assignees {
nodes { nodes {
id
avatarUrl avatarUrl
name name
webUrl webUrl
...@@ -62,7 +66,9 @@ query getThroughputTableData( ...@@ -62,7 +66,9 @@ query getThroughputTableData(
} }
pipelines { pipelines {
nodes { nodes {
id
detailedStatus { detailedStatus {
id
icon icon
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query repoAnalyticsGetGroupProjects($groupFullPath: ID!, $after: String) { query repoAnalyticsGetGroupProjects($groupFullPath: ID!, $after: String) {
group(fullPath: $groupFullPath) { group(fullPath: $groupFullPath) {
id
projects(hasCodeCoverage: true, after: $after, first: 100) { projects(hasCodeCoverage: true, after: $after, first: 100) {
nodes { nodes {
name name
......
query getGroupTestCoverage($groupFullPath: ID!, $startDate: Date!) { query getGroupTestCoverage($groupFullPath: ID!, $startDate: Date!) {
group(fullPath: $groupFullPath) { group(fullPath: $groupFullPath) {
id
codeCoverageActivities(startDate: $startDate) { codeCoverageActivities(startDate: $startDate) {
nodes { nodes {
projectCount projectCount
......
query getProjectsTestCoverage($groupFullPath: ID!, $projectIds: [ID!]) { query getProjectsTestCoverage($groupFullPath: ID!, $projectIds: [ID!]) {
group(fullPath: $groupFullPath) { group(fullPath: $groupFullPath) {
id
projects(hasCodeCoverage: true, ids: $projectIds) { projects(hasCodeCoverage: true, ids: $projectIds) {
nodes { nodes {
fullPath fullPath
......
...@@ -18,6 +18,9 @@ mutation createBoardListEE( ...@@ -18,6 +18,9 @@ mutation createBoardListEE(
assigneeId: $assigneeId assigneeId: $assigneeId
} }
) { ) {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
list { list {
...BoardListFragment ...BoardListFragment
} }
......
...@@ -8,9 +8,14 @@ query ListIssues( ...@@ -8,9 +8,14 @@ query ListIssues(
$isProject: Boolean = false $isProject: Boolean = false
) { ) {
group(fullPath: $fullPath) @include(if: $isGroup) { group(fullPath: $fullPath) @include(if: $isGroup) {
id
board(id: $boardId) { board(id: $boardId) {
id
hideBacklogList hideBacklogList
lists(issueFilters: $filters) { lists(issueFilters: $filters) {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
nodes { nodes {
...BoardListFragment ...BoardListFragment
} }
...@@ -18,9 +23,14 @@ query ListIssues( ...@@ -18,9 +23,14 @@ query ListIssues(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
board(id: $boardId) { board(id: $boardId) {
id
hideBacklogList hideBacklogList
lists(issueFilters: $filters) { lists(issueFilters: $filters) {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
nodes { nodes {
...BoardListFragment ...BoardListFragment
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query EpicBoard($fullPath: ID!, $boardId: BoardsEpicBoardID!) { query EpicBoard($fullPath: ID!, $boardId: BoardsEpicBoardID!) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
id
board: epicBoard(id: $boardId) { board: epicBoard(id: $boardId) {
id id
name name
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
query boardListEpics($fullPath: ID!, $boardId: BoardsEpicBoardID!, $filters: EpicFilters) { query boardListEpics($fullPath: ID!, $boardId: BoardsEpicBoardID!, $filters: EpicFilters) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
board: epicBoard(id: $boardId) { board: epicBoard(id: $boardId) {
id
lists(epicFilters: $filters) { lists(epicFilters: $filters) {
nodes { nodes {
...EpicBoardListFragment ...EpicBoardListFragment
......
query EpicBoards($fullPath: ID!) { query EpicBoards($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
epicBoards { epicBoards {
nodes { nodes {
id id
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
mutation CreateEpic($input: CreateEpicInput!) { mutation CreateEpic($input: CreateEpicInput!) {
createEpic(input: $input) { createEpic(input: $input) {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
epic { epic {
...EpicNode ...EpicNode
labels { labels {
......
...@@ -9,7 +9,9 @@ query BoardEE( ...@@ -9,7 +9,9 @@ query BoardEE(
$after: String $after: String
) { ) {
group(fullPath: $fullPath) @include(if: $isGroup) { group(fullPath: $fullPath) @include(if: $isGroup) {
id
board(id: $boardId) { board(id: $boardId) {
id
epics(first: 10, issueFilters: $issueFilters, after: $after) { epics(first: 10, issueFilters: $issueFilters, after: $after) {
edges { edges {
node { node {
...@@ -27,7 +29,9 @@ query BoardEE( ...@@ -27,7 +29,9 @@ query BoardEE(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
board(id: $boardId) { board(id: $boardId) {
id
epics(first: 10, issueFilters: $issueFilters, after: $after) { epics(first: 10, issueFilters: $issueFilters, after: $after) {
edges { edges {
node { node {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query GroupBoardIterations($fullPath: ID!, $title: String) { query GroupBoardIterations($fullPath: ID!, $title: String) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
iterations(includeAncestors: true, title: $title) { iterations(includeAncestors: true, title: $title) {
nodes { nodes {
...IterationFragment ...IterationFragment
......
query EpicLabels($fullPath: ID!, $search: String) { query EpicLabels($fullPath: ID!, $search: String) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
labels( labels(
includeAncestorGroups: true includeAncestorGroups: true
includeDescendantGroups: true includeDescendantGroups: true
......
query EpicUsers($fullPath: ID!, $search: String) { query EpicUsers($fullPath: ID!, $search: String) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
groupMembers(relations: [DIRECT, DESCENDANTS, INHERITED], search: $search) { groupMembers(relations: [DIRECT, DESCENDANTS, INHERITED], search: $search) {
nodes { nodes {
id
user { user {
id id
name name
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
mutation boardListUpdateLimitMetrics($input: BoardListUpdateLimitMetricsInput!) { mutation boardListUpdateLimitMetrics($input: BoardListUpdateLimitMetricsInput!) {
boardListUpdateLimitMetrics(input: $input) { boardListUpdateLimitMetrics(input: $input) {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
list { list {
...BoardListFragment ...BoardListFragment
} }
......
...@@ -10,12 +10,17 @@ query epicBoardListEpics( ...@@ -10,12 +10,17 @@ query epicBoardListEpics(
$first: Int $first: Int
) { ) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
epicBoard(id: $boardId) { epicBoard(id: $boardId) {
id
lists(id: $id) { lists(id: $id) {
nodes { nodes {
id id
epics(first: $first, after: $after, filters: $filters) { epics(first: $first, after: $after, filters: $filters) {
edges { edges {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
node { node {
...EpicNode ...EpicNode
relativePosition relativePosition
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query ProjectBoardIterations($fullPath: ID!, $title: String) { query ProjectBoardIterations($fullPath: ID!, $title: String) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
iterations(includeAncestors: true, title: $title) { iterations(includeAncestors: true, title: $title) {
nodes { nodes {
...IterationFragment ...IterationFragment
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
query getCodeQualityViolations($projectPath: ID!, $iid: ID!, $first: Int, $after: String) { query getCodeQualityViolations($projectPath: ID!, $iid: ID!, $first: Int, $after: String) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
pipeline(iid: $iid) { pipeline(iid: $iid) {
id
codeQualityReports(first: $first, after: $after) { codeQualityReports(first: $first, after: $after) {
count count
nodes { nodes {
......
query environment($fullPath: ID!, $environmentName: String) { query environment($fullPath: ID!, $environmentName: String) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
environment(name: $environmentName) { environment(name: $environmentName) {
id
latestOpenedMostSevereAlert { latestOpenedMostSevereAlert {
title title
severity severity
detailsUrl detailsUrl
startedAt startedAt
prometheusAlert { prometheusAlert {
id
humanizedText humanizedText
} }
} }
......
mutation createEpic($input: CreateEpicInput!) { mutation createEpic($input: CreateEpicInput!) {
createEpic(input: $input) { createEpic(input: $input) {
epic { epic {
id
webUrl webUrl
} }
errors errors
......
...@@ -19,6 +19,7 @@ query groupEpics( ...@@ -19,6 +19,7 @@ query groupEpics(
$isSignedIn: Boolean = false $isSignedIn: Boolean = false
) { ) {
group(fullPath: $groupPath) { group(fullPath: $groupPath) {
id
epics( epics(
state: $state state: $state
authorUsername: $authorUsername authorUsername: $authorUsername
...@@ -45,6 +46,7 @@ query groupEpics( ...@@ -45,6 +46,7 @@ query groupEpics(
userDiscussionsCount @include(if: $isSignedIn) userDiscussionsCount @include(if: $isSignedIn)
confidential confidential
group { group {
id
fullPath fullPath
} }
author { author {
......
...@@ -11,6 +11,7 @@ fragment EscalationPolicy on EscalationPolicyType { ...@@ -11,6 +11,7 @@ fragment EscalationPolicy on EscalationPolicyType {
name name
} }
user { user {
id
username username
name name
avatarUrl avatarUrl
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query getEscalationPolicies($projectPath: ID!) { query getEscalationPolicies($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
incidentManagementEscalationPolicies { incidentManagementEscalationPolicies {
nodes { nodes {
...EscalationPolicy ...EscalationPolicy
......
query getOncallSchedules($projectPath: ID!) { query getOncallSchedules($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
incidentManagementOncallSchedules { incidentManagementOncallSchedules {
nodes { nodes {
iid iid
......
...@@ -2,6 +2,7 @@ fragment EpicNode on Epic { ...@@ -2,6 +2,7 @@ fragment EpicNode on Epic {
id id
iid iid
group { group {
id
fullPath fullPath
} }
title title
......
query getIncidentState($iid: String!, $fullPath: ID!) { query getIncidentState($iid: String!, $fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issue(iid: $iid) { issue(iid: $iid) {
id id
state state
......
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
fragment IncidentFields on Issue { fragment IncidentFields on Issue {
severity severity
statusPagePublishedIncident statusPagePublishedIncident
......
fragment JiraLabel on Label { fragment JiraLabel on Label {
id
title title
name name
color color
......
fragment JiraUser on UserCore { fragment JiraUser on UserCore {
id
avatarUrl avatarUrl
name name
webUrl webUrl
......
fragment ZentaoLabel on Label { fragment ZentaoLabel on Label {
id
title title
name name
color color
......
fragment ZentaoUser on UserCore { fragment ZentaoUser on UserCore {
id
avatarUrl avatarUrl
name name
webUrl webUrl
......
query getSlaDueAt($iid: String!, $fullPath: ID!) { query getSlaDueAt($iid: String!, $fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issue(iid: $iid) { issue(iid: $iid) {
id id
slaDueAt slaDueAt
......
...@@ -30,6 +30,7 @@ query getIssuesEE( ...@@ -30,6 +30,7 @@ query getIssuesEE(
$lastPageSize: Int $lastPageSize: Int
) { ) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
issues( issues(
includeSubepics: true includeSubepics: true
includeSubgroups: true includeSubgroups: true
...@@ -68,6 +69,7 @@ query getIssuesEE( ...@@ -68,6 +69,7 @@ query getIssuesEE(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
issues( issues(
includeSubepics: true includeSubepics: true
search: $search search: $search
......
...@@ -20,6 +20,7 @@ query getIssuesCountEE( ...@@ -20,6 +20,7 @@ query getIssuesCountEE(
$not: NegatedIssueFilterInput $not: NegatedIssueFilterInput
) { ) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
openedIssues: issues( openedIssues: issues(
includeSubepics: true includeSubepics: true
includeSubgroups: true includeSubgroups: true
...@@ -88,6 +89,7 @@ query getIssuesCountEE( ...@@ -88,6 +89,7 @@ query getIssuesCountEE(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
openedIssues: issues( openedIssues: issues(
includeSubepics: true includeSubepics: true
state: opened state: opened
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query searchIterations($fullPath: ID!, $search: String, $id: ID, $isProject: Boolean = false) { query searchIterations($fullPath: ID!, $search: String, $id: ID, $isProject: Boolean = false) {
group(fullPath: $fullPath) @skip(if: $isProject) { group(fullPath: $fullPath) @skip(if: $isProject) {
id
iterations(title: $search, id: $id, includeAncestors: true) { iterations(title: $search, id: $id, includeAncestors: true) {
nodes { nodes {
...Iteration ...Iteration
...@@ -9,6 +10,7 @@ query searchIterations($fullPath: ID!, $search: String, $id: ID, $isProject: Boo ...@@ -9,6 +10,7 @@ query searchIterations($fullPath: ID!, $search: String, $id: ID, $isProject: Boo
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
iterations(title: $search, id: $id, includeAncestors: true) { iterations(title: $search, id: $id, includeAncestors: true) {
nodes { nodes {
...Iteration ...Iteration
......
mutation createIteration($input: CreateIterationInput!) { mutation createIteration($input: CreateIterationInput!) {
createIteration(input: $input) { createIteration(input: $input) {
iteration { iteration {
id
title title
description description
descriptionHtml descriptionHtml
......
...@@ -7,6 +7,7 @@ fragment IterationIssues on IssueConnection { ...@@ -7,6 +7,7 @@ fragment IterationIssues on IssueConnection {
...PageInfo ...PageInfo
} }
nodes { nodes {
id
iid iid
title title
webUrl webUrl
......
...@@ -8,6 +8,7 @@ fragment IterationIssuesWithLabels on IssueConnection { ...@@ -8,6 +8,7 @@ fragment IterationIssuesWithLabels on IssueConnection {
...PageInfo ...PageInfo
} }
nodes { nodes {
id
iid iid
labels { labels {
nodes { nodes {
......
...@@ -4,16 +4,19 @@ query onDemandScanCounts( ...@@ -4,16 +4,19 @@ query onDemandScanCounts(
$finishedScope: PipelineScopeEnum $finishedScope: PipelineScopeEnum
) { ) {
all: project(fullPath: $fullPath) { all: project(fullPath: $fullPath) {
id
pipelines(source: "ondemand_dast_scan") { pipelines(source: "ondemand_dast_scan") {
count count
} }
} }
running: project(fullPath: $fullPath) { running: project(fullPath: $fullPath) {
id
pipelines(source: "ondemand_dast_scan", scope: $runningScope) { pipelines(source: "ondemand_dast_scan", scope: $runningScope) {
count count
} }
} }
finished: project(fullPath: $fullPath) { finished: project(fullPath: $fullPath) {
id
pipelines(source: "ondemand_dast_scan", scope: $finishedScope) { pipelines(source: "ondemand_dast_scan", scope: $finishedScope) {
count count
} }
......
...@@ -9,6 +9,7 @@ query onDemandScans( ...@@ -9,6 +9,7 @@ query onDemandScans(
$before: String $before: String
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
pipelines( pipelines(
source: "ondemand_dast_scan" source: "ondemand_dast_scan"
scope: $scope scope: $scope
...@@ -25,14 +26,17 @@ query onDemandScans( ...@@ -25,14 +26,17 @@ query onDemandScans(
path path
createdAt createdAt
detailedStatus { detailedStatus {
id
detailsPath detailsPath
text text
group group
icon icon
} }
dastProfile { dastProfile {
id
name name
dastSiteProfile { dastSiteProfile {
id
targetUrl targetUrl
} }
} }
......
mutation dastProfileCreate($input: DastProfileCreateInput!) { mutation dastProfileCreate($input: DastProfileCreateInput!) {
dastProfileCreate(input: $input) { dastProfileCreate(input: $input) {
dastProfile { dastProfile {
id
editPath editPath
} }
pipelineUrl pipelineUrl
......
mutation dastProfileUpdate($input: DastProfileUpdateInput!) { mutation dastProfileUpdate($input: DastProfileUpdateInput!) {
dastProfileUpdate(input: $input) { dastProfileUpdate(input: $input) {
dastProfile { dastProfile {
id
editPath editPath
} }
pipelineUrl pipelineUrl
......
fragment OnCallParticipant on OncallParticipantType { fragment OnCallParticipant on OncallParticipantType {
id
user { user {
id id
name name
......
query getOncallSchedulesWithRotations($projectPath: ID!) { query getOncallSchedulesWithRotations($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
incidentManagementOncallSchedules { incidentManagementOncallSchedules {
nodes { nodes {
iid iid
......
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
query getShiftsForRotations($projectPath: ID!, $startsAt: Time!, $endsAt: Time!, $iids: [ID!]) { query getShiftsForRotations($projectPath: ID!, $startsAt: Time!, $endsAt: Time!, $iids: [ID!]) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
incidentManagementOncallSchedules(iids: $iids) { incidentManagementOncallSchedules(iids: $iids) {
nodes { nodes {
rotations { rotations {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
nodes { nodes {
...OnCallRotationWithShifts ...OnCallRotationWithShifts
} }
......
...@@ -3,6 +3,7 @@ mutation createRequirement($createRequirementInput: CreateRequirementInput!) { ...@@ -3,6 +3,7 @@ mutation createRequirement($createRequirementInput: CreateRequirementInput!) {
clientMutationId clientMutationId
errors errors
requirement { requirement {
id
iid iid
} }
} }
......
...@@ -14,6 +14,7 @@ query projectRequirementsEE( ...@@ -14,6 +14,7 @@ query projectRequirementsEE(
$sortBy: Sort = CREATED_DESC $sortBy: Sort = CREATED_DESC
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
requirements( requirements(
first: $firstPageSize first: $firstPageSize
last: $lastPageSize last: $lastPageSize
......
query projectRequirements($projectPath: ID!) { query projectRequirements($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
requirementStatesCount { requirementStatesCount {
opened opened
archived archived
......
#import "~/graphql_shared/fragments/author.fragment.graphql" #import "~/graphql_shared/fragments/author.fragment.graphql"
fragment Requirement on Requirement { fragment Requirement on Requirement {
id
iid iid
title title
titleHtml titleHtml
......
query apiFuzzingCiConfiguration($fullPath: ID!) { query apiFuzzingCiConfiguration($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
apiFuzzingCiConfiguration { apiFuzzingCiConfiguration {
scanModes scanModes
scanProfiles { scanProfiles {
......
query DastFailedSiteValidations($fullPath: ID!) { query DastFailedSiteValidations($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
validations: dastSiteValidations(status: FAILED_VALIDATION) { validations: dastSiteValidations(status: FAILED_VALIDATION) {
nodes { nodes {
id
normalizedTargetUrl normalizedTargetUrl
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query DastProfiles($fullPath: ID!, $after: String, $before: String, $first: Int, $last: Int) { query DastProfiles($fullPath: ID!, $after: String, $before: String, $first: Int, $last: Int) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
dastProfiles(after: $after, before: $before, first: $first, last: $last) { dastProfiles(after: $after, before: $before, first: $first, last: $last) {
pageInfo { pageInfo {
...PageInfo ...PageInfo
......
...@@ -8,6 +8,7 @@ query DastScannerProfiles( ...@@ -8,6 +8,7 @@ query DastScannerProfiles(
$last: Int $last: Int
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
scannerProfiles: dastScannerProfiles( scannerProfiles: dastScannerProfiles(
after: $after after: $after
before: $before before: $before
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first: Int, $last: Int) { query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first: Int, $last: Int) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
siteProfiles: dastSiteProfiles(after: $after, before: $before, first: $first, last: $last) siteProfiles: dastSiteProfiles(after: $after, before: $before, first: $first, last: $last)
@connection(key: "dastSiteProfiles") { @connection(key: "dastSiteProfiles") {
pageInfo { pageInfo {
......
query project($fullPath: ID!, $urls: [String!]) { query project($fullPath: ID!, $urls: [String!]) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
validations: dastSiteValidations(normalizedTargetUrls: $urls) { validations: dastSiteValidations(normalizedTargetUrls: $urls) {
nodes { nodes {
id
normalizedTargetUrl normalizedTargetUrl
status status
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query sastCiConfiguration($fullPath: ID!) { query sastCiConfiguration($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
sastCiConfiguration { sastCiConfiguration {
global { global {
nodes { nodes {
......
#import "ee/security_dashboard/graphql/fragments/vulnerability_severities_count.fragment.graphql" #import "ee/security_dashboard/graphql/fragments/vulnerability_severities_count.fragment.graphql"
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
fragment ProjectVulnerabilitySeveritiesCount on Project { fragment ProjectVulnerabilitySeveritiesCount on Project {
vulnerabilitySeveritiesCount(state: [DETECTED, CONFIRMED]) { vulnerabilitySeveritiesCount(state: [DETECTED, CONFIRMED]) {
...VulnerabilitySeveritiesCount ...VulnerabilitySeveritiesCount
......
...@@ -12,7 +12,9 @@ fragment VulnerabilityFragment on Vulnerability { ...@@ -12,7 +12,9 @@ fragment VulnerabilityFragment on Vulnerability {
falsePositive @include(if: $vetEnabled) falsePositive @include(if: $vetEnabled)
issueLinks { issueLinks {
nodes { nodes {
id
issue { issue {
id
iid iid
webUrl webUrl
webPath webPath
...@@ -29,10 +31,12 @@ fragment VulnerabilityFragment on Vulnerability { ...@@ -29,10 +31,12 @@ fragment VulnerabilityFragment on Vulnerability {
...VulnerabilityLocation ...VulnerabilityLocation
} }
project { project {
id
nameWithNamespace nameWithNamespace
} }
reportType reportType
scanner { scanner {
id
vendor vendor
} }
} }
fragment VulnerabilityScanner on VulnerabilityScanner { fragment VulnerabilityScanner on VulnerabilityScanner {
id
externalId externalId
name name
reportType reportType
......
query vulnerability($id: VulnerabilityID!) { query vulnerability($id: VulnerabilityID!) {
vulnerability(id: $id) { vulnerability(id: $id) {
id
state state
confirmedAt confirmedAt
detectedAt detectedAt
......
query groupProjects($fullPath: ID!, $ids: [ID!], $search: String, $pageSize: Int) { query groupProjects($fullPath: ID!, $ids: [ID!], $search: String, $pageSize: Int) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
projects(includeSubgroups: true, ids: $ids, search: $search, first: $pageSize) { projects(includeSubgroups: true, ids: $ids, search: $search, first: $pageSize) {
nodes { nodes {
id id
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query groupSpecificScanners($fullPath: ID!) { query groupSpecificScanners($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
vulnerabilityScanners { vulnerabilityScanners {
nodes { nodes {
...VulnerabilityScanner ...VulnerabilityScanner
......
...@@ -16,6 +16,7 @@ query groupVulnerabilities( ...@@ -16,6 +16,7 @@ query groupVulnerabilities(
$vetEnabled: Boolean = false $vetEnabled: Boolean = false
) { ) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
vulnerabilities( vulnerabilities(
after: $after after: $after
first: $first first: $first
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query groupVulnerabilityGrades($fullPath: ID!) { query groupVulnerabilityGrades($fullPath: ID!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
vulnerabilityGrades(includeSubgroups: true) { vulnerabilityGrades(includeSubgroups: true) {
grade grade
projects { projects {
......
query groupVulnerabilityHistory($fullPath: ID!, $startDate: ISO8601Date!, $endDate: ISO8601Date!) { query groupVulnerabilityHistory($fullPath: ID!, $startDate: ISO8601Date!, $endDate: ISO8601Date!) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
vulnerabilitiesCountByDay(startDate: $startDate, endDate: $endDate) { vulnerabilitiesCountByDay(startDate: $startDate, endDate: $endDate) {
nodes { nodes {
date date
......
...@@ -13,6 +13,7 @@ query pipelineFindings( ...@@ -13,6 +13,7 @@ query pipelineFindings(
$vetEnabled: Boolean = false $vetEnabled: Boolean = false
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
pipeline(iid: $pipelineId) { pipeline(iid: $pipelineId) {
id id
securityReportFindings( securityReportFindings(
...@@ -35,6 +36,7 @@ query pipelineFindings( ...@@ -35,6 +36,7 @@ query pipelineFindings(
} }
reportType reportType
scanner { scanner {
id
vendor vendor
} }
state state
......
...@@ -7,6 +7,7 @@ query pipelineSecuritySummary( ...@@ -7,6 +7,7 @@ query pipelineSecuritySummary(
$reportTypes: [SecurityReportTypeEnum!] $reportTypes: [SecurityReportTypeEnum!]
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
pipeline(iid: $pipelineIid) { pipeline(iid: $pipelineIid) {
id id
...JobArtifacts ...JobArtifacts
......
query autoFixMrsCount($fullPath: ID!) { query autoFixMrsCount($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
mergeRequests(labels: "GitLab-auto-fix", state: opened) { mergeRequests(labels: "GitLab-auto-fix", state: opened) {
count count
} }
......
query securityScanners($fullPath: ID!) { query securityScanners($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
securityScanners { securityScanners {
available available
enabled enabled
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query projectSpecificScanners($fullPath: ID!) { query projectSpecificScanners($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
vulnerabilityScanners { vulnerabilityScanners {
nodes { nodes {
...VulnerabilityScanner ...VulnerabilityScanner
......
...@@ -17,6 +17,7 @@ query projectVulnerabilities( ...@@ -17,6 +17,7 @@ query projectVulnerabilities(
$vetEnabled: Boolean = false $vetEnabled: Boolean = false
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
vulnerabilities( vulnerabilities(
after: $after after: $after
first: $first first: $first
...@@ -33,6 +34,7 @@ query projectVulnerabilities( ...@@ -33,6 +34,7 @@ query projectVulnerabilities(
...VulnerabilityFragment ...VulnerabilityFragment
externalIssueLinks @include(if: $includeExternalIssueLinks) { externalIssueLinks @include(if: $includeExternalIssueLinks) {
nodes { nodes {
id
issue: externalIssue { issue: externalIssue {
externalTracker externalTracker
webUrl webUrl
...@@ -43,6 +45,7 @@ query projectVulnerabilities( ...@@ -43,6 +45,7 @@ query projectVulnerabilities(
} }
hasSolutions hasSolutions
mergeRequest { mergeRequest {
id
webUrl webUrl
state state
securityAutoFix securityAutoFix
......
...@@ -4,6 +4,7 @@ query projectVulnerabilitiesCount( ...@@ -4,6 +4,7 @@ query projectVulnerabilitiesCount(
$endDate: ISO8601Date! $endDate: ISO8601Date!
) { ) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
vulnerabilitiesCountByDay(startDate: $startDate, endDate: $endDate) { vulnerabilitiesCountByDay(startDate: $startDate, endDate: $endDate) {
nodes { nodes {
date date
......
...@@ -29,6 +29,7 @@ query vulnerabilitySeveritiesCount( ...@@ -29,6 +29,7 @@ query vulnerabilitySeveritiesCount(
} }
} }
group(fullPath: $fullPath) @include(if: $isGroup) { group(fullPath: $fullPath) @include(if: $isGroup) {
id
vulnerabilitySeveritiesCount( vulnerabilitySeveritiesCount(
projectId: $projectId projectId: $projectId
severity: $severity severity: $severity
...@@ -43,6 +44,7 @@ query vulnerabilitySeveritiesCount( ...@@ -43,6 +44,7 @@ query vulnerabilitySeveritiesCount(
} }
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id
vulnerabilitySeveritiesCount( vulnerabilitySeveritiesCount(
severity: $severity severity: $severity
reportType: $reportType reportType: $reportType
......
query epicAncestors($fullPath: ID!, $iid: ID) { query epicAncestors($fullPath: ID!, $iid: ID) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
issuable: epic(iid: $iid) { issuable: epic(iid: $iid) {
__typename __typename
id id
......
...@@ -8,6 +8,7 @@ query issueEpics( ...@@ -8,6 +8,7 @@ query issueEpics(
$iidStartsWith: String $iidStartsWith: String
) { ) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
id
attributes: epics( attributes: epics(
search: $title search: $title
in: $in in: $in
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query issueIterationsAliased($fullPath: ID!, $title: String, $state: IterationState) { query issueIterationsAliased($fullPath: ID!, $title: String, $state: IterationState) {
workspace: group(fullPath: $fullPath) { workspace: group(fullPath: $fullPath) {
__typename __typename
id
attributes: iterations(title: $title, state: $state) { attributes: iterations(title: $title, state: $state) {
nodes { nodes {
...IterationFragment ...IterationFragment
......
query issueHealthStatus($fullPath: ID!, $iid: String) { query issueHealthStatus($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
query issueSprint($fullPath: ID!, $iid: String!) { query issueSprint($fullPath: ID!, $iid: String!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issue(iid: $iid) { issue(iid: $iid) {
id id
iteration { iteration {
......
query issueWeight($fullPath: ID!, $iid: String) { query issueWeight($fullPath: ID!, $iid: String) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
id
__typename __typename
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query issueIterations($fullPath: ID!, $title: String, $state: IterationState) { query issueIterations($fullPath: ID!, $title: String, $state: IterationState) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
iterations(title: $title, state: $state) { iterations(title: $title, state: $state) {
nodes { nodes {
...IterationFragment ...IterationFragment
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query projectIssueEpic($fullPath: ID!, $iid: String!) { query projectIssueEpic($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
query projectIssueIteration($fullPath: ID!, $iid: String!) { query projectIssueIteration($fullPath: ID!, $iid: String!) {
workspace: project(fullPath: $fullPath) { workspace: project(fullPath: $fullPath) {
__typename __typename
id
issuable: issue(iid: $iid) { issuable: issue(iid: $iid) {
__typename __typename
id id
......
query getIssueHealthStatus($fullPath: ID!, $iid: String!) { query getIssueHealthStatus($fullPath: ID!, $iid: String!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
issue(iid: $iid) { issue(iid: $iid) {
id
healthStatus healthStatus
} }
} }
......
...@@ -16,6 +16,7 @@ query projectIssues( ...@@ -16,6 +16,7 @@ query projectIssues(
$nextPageCursor: String = "" $nextPageCursor: String = ""
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
name name
issueStatusCounts( issueStatusCounts(
types: $types types: $types
...@@ -40,6 +41,7 @@ query projectIssues( ...@@ -40,6 +41,7 @@ query projectIssues(
before: $prevPageCursor before: $prevPageCursor
) { ) {
nodes { nodes {
id
iid iid
title title
description description
......
...@@ -3,6 +3,7 @@ mutation moveTestCase($moveTestCaseInput: IssueMoveInput!) { ...@@ -3,6 +3,7 @@ mutation moveTestCase($moveTestCaseInput: IssueMoveInput!) {
errors errors
clientMutationId clientMutationId
issue { issue {
id
webUrl webUrl
} }
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query projectTestCase($projectPath: ID!, $testCaseId: String) { query projectTestCase($projectPath: ID!, $testCaseId: String) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
name name
issue(iid: $testCaseId) { issue(iid: $testCaseId) {
...TestCase ...TestCase
......
...@@ -19,6 +19,7 @@ fragment TestCase on Issue { ...@@ -19,6 +19,7 @@ fragment TestCase on Issue {
confidential confidential
moved moved
movedTo { movedTo {
id
webUrl webUrl
} }
author { author {
......
query projectTestCaseTaskList($projectPath: ID!, $testCaseId: String) { query projectTestCaseTaskList($projectPath: ID!, $testCaseId: String) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
__typename __typename
id
issue(iid: $testCaseId) { issue(iid: $testCaseId) {
__typename __typename
id id
......
fragment Environments on NetworkPolicy { fragment Environments on NetworkPolicy {
environments { environments {
nodes { nodes {
id
name name
} }
} }
......
query getAgentCount($projectPath: ID!) { query getAgentCount($projectPath: ID!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
clusterAgents { clusterAgents {
count count
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query networkPolicies($fullPath: ID!, $environmentId: EnvironmentID) { query networkPolicies($fullPath: ID!, $environmentId: EnvironmentID) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
networkPolicies(environmentId: $environmentId) { networkPolicies(environmentId: $environmentId) {
nodes { nodes {
name name
......
query scanExecutionPolicies($fullPath: ID!) { query scanExecutionPolicies($fullPath: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
scanExecutionPolicies { scanExecutionPolicies {
nodes { nodes {
name name
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
query autoMergeEnabledEE($projectPath: ID!, $iid: String!) { query autoMergeEnabledEE($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
id
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
...autoMergeEnabled ...autoMergeEnabled
mergeTrainsCount mergeTrainsCount
......
...@@ -4,6 +4,7 @@ query readyToMergeEE($projectPath: ID!, $iid: String!) { ...@@ -4,6 +4,7 @@ query readyToMergeEE($projectPath: ID!, $iid: String!) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
...ReadyToMerge ...ReadyToMerge
mergeRequest(iid: $iid) { mergeRequest(iid: $iid) {
id
mergeTrainsCount mergeTrainsCount
} }
} }
......
...@@ -2,6 +2,7 @@ fragment EpicNode on Epic { ...@@ -2,6 +2,7 @@ fragment EpicNode on Epic {
id id
iid iid
group { group {
id
fullPath fullPath
} }
title title
......
...@@ -2,12 +2,16 @@ ...@@ -2,12 +2,16 @@
query searchEpics($fullPath: ID!, $search: String, $state: EpicState) { query searchEpics($fullPath: ID!, $search: String, $state: EpicState) {
group(fullPath: $fullPath) { group(fullPath: $fullPath) {
id
epics( epics(
search: $search search: $search
state: $state state: $state
includeAncestorGroups: true includeAncestorGroups: true
includeDescendantGroups: false includeDescendantGroups: false
) { ) {
# We have an id in deeply nested fragment
# TODO: Uncomment next line when https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75220 is merged and the rule is enabled
# # eslint-disable-next-line @graphql-eslint/require-id-when-available
nodes { nodes {
...EpicNode ...EpicNode
} }
......
query getSecurityReportSummary($fullPath: ID!, $pipelineIid: ID!) { query getSecurityReportSummary($fullPath: ID!, $pipelineIid: ID!) {
project(fullPath: $fullPath) { project(fullPath: $fullPath) {
id
pipeline(iid: $pipelineIid) { pipeline(iid: $pipelineIid) {
id
securityReportSummary { securityReportSummary {
dast { dast {
scannedResourcesCsvPath scannedResourcesCsvPath
......
...@@ -2,6 +2,7 @@ mutation vulnerabilityExternalIssueLinkCreate($input: VulnerabilityExternalIssue ...@@ -2,6 +2,7 @@ mutation vulnerabilityExternalIssueLinkCreate($input: VulnerabilityExternalIssue
vulnerabilityExternalIssueLinkCreate(input: $input) { vulnerabilityExternalIssueLinkCreate(input: $input) {
errors errors
externalIssueLink { externalIssueLink {
id
externalIssue { externalIssue {
webUrl webUrl
} }
......
export const groupReleaseStatsQueryResponse = { export const groupReleaseStatsQueryResponse = {
data: { data: {
group: { group: {
id: '1',
stats: { stats: {
releaseStats: { releaseStats: {
releasesCount: 2811, releasesCount: 2811,
......
...@@ -66,7 +66,7 @@ describe('Test coverage table component', () => { ...@@ -66,7 +66,7 @@ describe('Test coverage table component', () => {
beforeEach(() => { beforeEach(() => {
getProjectsTestCoverageSpy = jest.fn().mockResolvedValue({ getProjectsTestCoverageSpy = jest.fn().mockResolvedValue({
data: { group: { projects: { nodes: projects } } }, data: { group: { id: '1', projects: { nodes: projects } } },
}); });
}); });
...@@ -118,6 +118,7 @@ describe('Test coverage table component', () => { ...@@ -118,6 +118,7 @@ describe('Test coverage table component', () => {
getProjectsTestCoverageSpy = jest.fn().mockResolvedValue({ getProjectsTestCoverageSpy = jest.fn().mockResolvedValue({
data: { data: {
group: { group: {
id: '1',
projects: { projects: {
nodes: [ nodes: [
{ {
......
...@@ -108,7 +108,9 @@ describe('Codequality report app', () => { ...@@ -108,7 +108,9 @@ describe('Codequality report app', () => {
const emptyResponse = { const emptyResponse = {
data: { data: {
project: { project: {
id: '1',
pipeline: { pipeline: {
id: 'pipeline-1',
codeQualityReports: { codeQualityReports: {
...codeQualityViolations, ...codeQualityViolations,
nodes: [], nodes: [],
......
export const mockDownstreamQueryResponse = { export const mockDownstreamQueryResponse = {
data: { data: {
project: { project: {
id: '1',
pipeline: { pipeline: {
path: '/root/ci-project/-/pipelines/790', path: '/root/ci-project/-/pipelines/790',
id: 'pipeline-1',
downstream: { downstream: {
nodes: [ nodes: [
{ {
id: 'gid://gitlab/Ci::Pipeline/612', id: 'gid://gitlab/Ci::Pipeline/612',
path: '/root/job-log-sections/-/pipelines/612', path: '/root/job-log-sections/-/pipelines/612',
project: { name: 'job-log-sections', __typename: 'Project' }, project: { id: '1', name: 'job-log-sections', __typename: 'Project' },
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
label: 'passed', label: 'passed',
...@@ -30,7 +33,9 @@ export const mockDownstreamQueryResponse = { ...@@ -30,7 +33,9 @@ export const mockDownstreamQueryResponse = {
export const mockUpstreamQueryResponse = { export const mockUpstreamQueryResponse = {
data: { data: {
project: { project: {
id: '1',
pipeline: { pipeline: {
id: 'pipeline-1',
path: '/root/ci-project/-/pipelines/790', path: '/root/ci-project/-/pipelines/790',
downstream: { downstream: {
nodes: [], nodes: [],
...@@ -39,8 +44,9 @@ export const mockUpstreamQueryResponse = { ...@@ -39,8 +44,9 @@ export const mockUpstreamQueryResponse = {
upstream: { upstream: {
id: 'gid://gitlab/Ci::Pipeline/610', id: 'gid://gitlab/Ci::Pipeline/610',
path: '/root/trigger-downstream/-/pipelines/610', path: '/root/trigger-downstream/-/pipelines/610',
project: { name: 'trigger-downstream', __typename: 'Project' }, project: { id: '1', name: 'trigger-downstream', __typename: 'Project' },
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
label: 'passed', label: 'passed',
...@@ -57,15 +63,18 @@ export const mockUpstreamQueryResponse = { ...@@ -57,15 +63,18 @@ export const mockUpstreamQueryResponse = {
export const mockUpstreamDownstreamQueryResponse = { export const mockUpstreamDownstreamQueryResponse = {
data: { data: {
project: { project: {
id: '1',
pipeline: { pipeline: {
id: 'pipeline-1',
path: '/root/ci-project/-/pipelines/790', path: '/root/ci-project/-/pipelines/790',
downstream: { downstream: {
nodes: [ nodes: [
{ {
id: 'gid://gitlab/Ci::Pipeline/612', id: 'gid://gitlab/Ci::Pipeline/612',
path: '/root/job-log-sections/-/pipelines/612', path: '/root/job-log-sections/-/pipelines/612',
project: { name: 'job-log-sections', __typename: 'Project' }, project: { id: '1', name: 'job-log-sections', __typename: 'Project' },
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
label: 'passed', label: 'passed',
...@@ -79,8 +88,9 @@ export const mockUpstreamDownstreamQueryResponse = { ...@@ -79,8 +88,9 @@ export const mockUpstreamDownstreamQueryResponse = {
upstream: { upstream: {
id: 'gid://gitlab/Ci::Pipeline/610', id: 'gid://gitlab/Ci::Pipeline/610',
path: '/root/trigger-downstream/-/pipelines/610', path: '/root/trigger-downstream/-/pipelines/610',
project: { name: 'trigger-downstream', __typename: 'Project' }, project: { id: '1', name: 'trigger-downstream', __typename: 'Project' },
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
label: 'passed', label: 'passed',
...@@ -96,9 +106,11 @@ export const mockUpstreamDownstreamQueryResponse = { ...@@ -96,9 +106,11 @@ export const mockUpstreamDownstreamQueryResponse = {
export const mockStages = [ export const mockStages = [
{ {
id: 'stage-1',
name: 'build', name: 'build',
title: 'build: passed', title: 'build: passed',
status: { status: {
id: 'status-1',
icon: 'status_success', icon: 'status_success',
text: 'passed', text: 'passed',
label: 'passed', label: 'passed',
...@@ -114,9 +126,11 @@ export const mockStages = [ ...@@ -114,9 +126,11 @@ export const mockStages = [
dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=build', dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=build',
}, },
{ {
id: 'stage-2',
name: 'test', name: 'test',
title: 'test: passed', title: 'test: passed',
status: { status: {
id: 'status-2',
icon: 'status_success', icon: 'status_success',
text: 'passed', text: 'passed',
label: 'passed', label: 'passed',
...@@ -132,9 +146,11 @@ export const mockStages = [ ...@@ -132,9 +146,11 @@ export const mockStages = [
dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=test', dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=test',
}, },
{ {
id: 'stage-3',
name: 'test_two', name: 'test_two',
title: 'test_two: passed', title: 'test_two: passed',
status: { status: {
id: 'status-3',
icon: 'status_success', icon: 'status_success',
text: 'passed', text: 'passed',
label: 'passed', label: 'passed',
...@@ -150,9 +166,11 @@ export const mockStages = [ ...@@ -150,9 +166,11 @@ export const mockStages = [
dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=test_two', dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=test_two',
}, },
{ {
id: 'stage-4',
name: 'manual', name: 'manual',
title: 'manual: skipped', title: 'manual: skipped',
status: { status: {
id: 'status-4',
icon: 'status_skipped', icon: 'status_skipped',
text: 'skipped', text: 'skipped',
label: 'skipped', label: 'skipped',
...@@ -164,6 +182,7 @@ export const mockStages = [ ...@@ -164,6 +182,7 @@ export const mockStages = [
favicon: favicon:
'/assets/ci_favicons/favicon_status_skipped-0b9c5e543588945e8c4ca57786bbf2d0c56631959c9f853300392d0315be829b.png', '/assets/ci_favicons/favicon_status_skipped-0b9c5e543588945e8c4ca57786bbf2d0c56631959c9f853300392d0315be829b.png',
action: { action: {
id: 'action-4',
icon: 'play', icon: 'play',
title: 'Play all manual', title: 'Play all manual',
path: '/root/ci-project/-/pipelines/611/stages/manual/play_manual', path: '/root/ci-project/-/pipelines/611/stages/manual/play_manual',
...@@ -175,9 +194,11 @@ export const mockStages = [ ...@@ -175,9 +194,11 @@ export const mockStages = [
dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=manual', dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=manual',
}, },
{ {
id: 'stage-5',
name: 'deploy', name: 'deploy',
title: 'deploy: passed', title: 'deploy: passed',
status: { status: {
id: 'status-5',
icon: 'status_success', icon: 'status_success',
text: 'passed', text: 'passed',
label: 'passed', label: 'passed',
...@@ -193,9 +214,11 @@ export const mockStages = [ ...@@ -193,9 +214,11 @@ export const mockStages = [
dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=deploy', dropdown_path: '/root/ci-project/-/pipelines/611/stage.json?stage=deploy',
}, },
{ {
id: 'stage-6',
name: 'qa', name: 'qa',
title: 'qa: passed', title: 'qa: passed',
status: { status: {
id: 'status-6',
icon: 'status_success', icon: 'status_success',
text: 'passed', text: 'passed',
label: 'passed', label: 'passed',
......
export const getEscalationPoliciesQueryResponse = { export const getEscalationPoliciesQueryResponse = {
data: { data: {
project: { project: {
id: '1',
incidentManagementEscalationPolicies: { incidentManagementEscalationPolicies: {
nodes: [ nodes: [
{ {
......
...@@ -25,12 +25,14 @@ Object { ...@@ -25,12 +25,14 @@ Object {
"assignees": Array [ "assignees": Array [
Object { Object {
"avatarUrl": null, "avatarUrl": null,
"id": "user-2",
"name": "Kushal Pandya", "name": "Kushal Pandya",
"webUrl": "https://gitlab-jira.atlassian.net/people/1920938475", "webUrl": "https://gitlab-jira.atlassian.net/people/1920938475",
}, },
], ],
"author": Object { "author": Object {
"avatarUrl": null, "avatarUrl": null,
"id": 0,
"name": "jhope", "name": "jhope",
"webUrl": "https://gitlab-jira.atlassian.net/people/5e32f803e127810e82875bc1", "webUrl": "https://gitlab-jira.atlassian.net/people/5e32f803e127810e82875bc1",
}, },
...@@ -42,6 +44,7 @@ Object { ...@@ -42,6 +44,7 @@ Object {
"labels": Array [ "labels": Array [
Object { Object {
"color": "#0052CC", "color": "#0052CC",
"id": "label-1",
"name": "backend", "name": "backend",
"textColor": "#FFFFFF", "textColor": "#FFFFFF",
"title": "backend", "title": "backend",
...@@ -60,6 +63,7 @@ Object { ...@@ -60,6 +63,7 @@ Object {
"assignees": Array [], "assignees": Array [],
"author": Object { "author": Object {
"avatarUrl": null, "avatarUrl": null,
"id": 1,
"name": "Gabe Weaver", "name": "Gabe Weaver",
"webUrl": "https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde", "webUrl": "https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde",
}, },
...@@ -82,6 +86,7 @@ Object { ...@@ -82,6 +86,7 @@ Object {
"assignees": Array [], "assignees": Array [],
"author": Object { "author": Object {
"avatarUrl": null, "avatarUrl": null,
"id": 2,
"name": "Gabe Weaver", "name": "Gabe Weaver",
"webUrl": "https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde", "webUrl": "https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde",
}, },
......
...@@ -29,6 +29,7 @@ export const mockJiraIssue1 = { ...@@ -29,6 +29,7 @@ export const mockJiraIssue1 = {
status: 'Selected for Development', status: 'Selected for Development',
labels: [ labels: [
{ {
id: 'label-1',
title: 'backend', title: 'backend',
name: 'backend', name: 'backend',
color: '#0052CC', color: '#0052CC',
...@@ -36,12 +37,14 @@ export const mockJiraIssue1 = { ...@@ -36,12 +37,14 @@ export const mockJiraIssue1 = {
}, },
], ],
author: { author: {
id: 'user-1',
name: 'jhope', name: 'jhope',
web_url: 'https://gitlab-jira.atlassian.net/people/5e32f803e127810e82875bc1', web_url: 'https://gitlab-jira.atlassian.net/people/5e32f803e127810e82875bc1',
avatar_url: null, avatar_url: null,
}, },
assignees: [ assignees: [
{ {
id: 'user-2',
name: 'Kushal Pandya', name: 'Kushal Pandya',
web_url: 'https://gitlab-jira.atlassian.net/people/1920938475', web_url: 'https://gitlab-jira.atlassian.net/people/1920938475',
avatar_url: null, avatar_url: null,
...@@ -64,6 +67,7 @@ export const mockJiraIssue2 = { ...@@ -64,6 +67,7 @@ export const mockJiraIssue2 = {
status: 'Backlog', status: 'Backlog',
labels: [], labels: [],
author: { author: {
id: 'user-3',
name: 'Gabe Weaver', name: 'Gabe Weaver',
web_url: 'https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde', web_url: 'https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde',
avatar_url: null, avatar_url: null,
...@@ -86,6 +90,7 @@ export const mockJiraIssue3 = { ...@@ -86,6 +90,7 @@ export const mockJiraIssue3 = {
status: 'Backlog', status: 'Backlog',
labels: [], labels: [],
author: { author: {
id: 'user-3',
name: 'Gabe Weaver', name: 'Gabe Weaver',
web_url: 'https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde', web_url: 'https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde',
avatar_url: null, avatar_url: null,
...@@ -109,6 +114,7 @@ export const mockJiraIssue4 = { ...@@ -109,6 +114,7 @@ export const mockJiraIssue4 = {
status: 'Backlog', status: 'Backlog',
labels: [], labels: [],
author: { author: {
id: 'user-3',
name: 'Gabe Weaver', name: 'Gabe Weaver',
web_url: 'https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde', web_url: 'https://gitlab-jira.atlassian.net/people/5e320a31fe03e20c9d1dccde',
avatar_url: null, avatar_url: null,
......
...@@ -8,6 +8,7 @@ export const mockZentaoIssue1 = { ...@@ -8,6 +8,7 @@ export const mockZentaoIssue1 = {
status: 'Selected for Development', status: 'Selected for Development',
labels: [ labels: [
{ {
id: 'label-1',
title: 'backend', title: 'backend',
name: 'backend', name: 'backend',
color: '#0052CC', color: '#0052CC',
...@@ -15,12 +16,14 @@ export const mockZentaoIssue1 = { ...@@ -15,12 +16,14 @@ export const mockZentaoIssue1 = {
}, },
], ],
author: { author: {
id: 0,
name: 'jhope', name: 'jhope',
web_url: 'https://gitlab-zentao.atlassian.net/people/5e32f803e127810e82875bc1', web_url: 'https://gitlab-zentao.atlassian.net/people/5e32f803e127810e82875bc1',
avatar_url: null, avatar_url: null,
}, },
assignees: [ assignees: [
{ {
id: 'user-2',
name: 'Kushal Pandya', name: 'Kushal Pandya',
web_url: 'https://gitlab-zentao.atlassian.net/people/1920938475', web_url: 'https://gitlab-zentao.atlassian.net/people/1920938475',
avatar_url: null, avatar_url: null,
...@@ -40,6 +43,7 @@ export const mockZentaoIssue2 = { ...@@ -40,6 +43,7 @@ export const mockZentaoIssue2 = {
status: 'Backlog', status: 'Backlog',
labels: [], labels: [],
author: { author: {
id: 1,
name: 'Gabe Weaver', name: 'Gabe Weaver',
web_url: 'https://gitlab-zentao.atlassian.net/people/5e320a31fe03e20c9d1dccde', web_url: 'https://gitlab-zentao.atlassian.net/people/5e320a31fe03e20c9d1dccde',
avatar_url: null, avatar_url: null,
...@@ -59,6 +63,7 @@ export const mockZentaoIssue3 = { ...@@ -59,6 +63,7 @@ export const mockZentaoIssue3 = {
status: 'Backlog', status: 'Backlog',
labels: [], labels: [],
author: { author: {
id: 2,
name: 'Gabe Weaver', name: 'Gabe Weaver',
web_url: 'https://gitlab-zentao.atlassian.net/people/5e320a31fe03e20c9d1dccde', web_url: 'https://gitlab-zentao.atlassian.net/people/5e320a31fe03e20c9d1dccde',
avatar_url: null, avatar_url: null,
......
...@@ -12,6 +12,7 @@ const defaults = { ...@@ -12,6 +12,7 @@ const defaults = {
export const dastScannerProfiles = (profiles = scannerProfiles) => ({ export const dastScannerProfiles = (profiles = scannerProfiles) => ({
data: { data: {
project: { project: {
id: '1',
scannerProfiles: { scannerProfiles: {
...defaults, ...defaults,
edges: profiles.map((profile) => ({ edges: profiles.map((profile) => ({
...@@ -26,6 +27,7 @@ export const dastScannerProfiles = (profiles = scannerProfiles) => ({ ...@@ -26,6 +27,7 @@ export const dastScannerProfiles = (profiles = scannerProfiles) => ({
export const dastSiteProfiles = (profiles = siteProfiles) => ({ export const dastSiteProfiles = (profiles = siteProfiles) => ({
data: { data: {
project: { project: {
id: '1',
siteProfiles: { siteProfiles: {
...defaults, ...defaults,
edges: profiles.map((profile) => ({ edges: profiles.map((profile) => ({
......
...@@ -31,6 +31,7 @@ export const errorMsg = 'Something went wrong'; ...@@ -31,6 +31,7 @@ export const errorMsg = 'Something went wrong';
export const getOncallSchedulesQueryResponse = { export const getOncallSchedulesQueryResponse = {
data: { data: {
project: { project: {
id: 'project-1',
incidentManagementOncallSchedules: { incidentManagementOncallSchedules: {
nodes: [ nodes: [
{ {
...@@ -153,6 +154,7 @@ export const createRotationResponse = { ...@@ -153,6 +154,7 @@ export const createRotationResponse = {
participants: { participants: {
nodes: [ nodes: [
{ {
id: '50',
user: { user: {
id: 'gid://gitlab/User/50', id: 'gid://gitlab/User/50',
username: 'project_1_bot3', username: 'project_1_bot3',
...@@ -192,6 +194,7 @@ export const createRotationResponseWithErrors = { ...@@ -192,6 +194,7 @@ export const createRotationResponseWithErrors = {
participants: { participants: {
nodes: [ nodes: [
{ {
id: '50',
user: { user: {
id: 'gid://gitlab/User/50', id: 'gid://gitlab/User/50',
username: 'project_1_bot3', username: 'project_1_bot3',
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"participants": { "participants": {
"nodes": [ "nodes": [
{ {
"id": "49",
"user": { "user": {
"id": "gid://gitlab/IncidentManagement::OncallParticipant/49", "id": "gid://gitlab/IncidentManagement::OncallParticipant/49",
"username": "nora.schaden", "username": "nora.schaden",
...@@ -27,6 +28,7 @@ ...@@ -27,6 +28,7 @@
"nodes": [ "nodes": [
{ {
"participant": { "participant": {
"id": "1",
"colorWeight": "500", "colorWeight": "500",
"colorPalette": "blue", "colorPalette": "blue",
"user": { "user": {
...@@ -41,6 +43,7 @@ ...@@ -41,6 +43,7 @@
}, },
{ {
"participant": { "participant": {
"id": "2",
"colorWeight": "500", "colorWeight": "500",
"colorPalette": "orange", "colorPalette": "orange",
"user": { "user": {
...@@ -70,6 +73,7 @@ ...@@ -70,6 +73,7 @@
"participants": { "participants": {
"nodes": [ "nodes": [
{ {
"id": "99",
"user": { "user": {
"id": "gid://gitlab/IncidentManagement::OncallParticipant/99", "id": "gid://gitlab/IncidentManagement::OncallParticipant/99",
"username": "david.oregan", "username": "david.oregan",
...@@ -85,6 +89,7 @@ ...@@ -85,6 +89,7 @@
"nodes": [ "nodes": [
{ {
"participant": { "participant": {
"id": "38",
"colorWeight": "500", "colorWeight": "500",
"colorPalette": "aqua", "colorPalette": "aqua",
"user": { "user": {
...@@ -99,6 +104,7 @@ ...@@ -99,6 +104,7 @@
}, },
{ {
"participant": { "participant": {
"id": "39",
"colorWeight": "500", "colorWeight": "500",
"colorPalette": "green", "colorPalette": "green",
"user": { "user": {
...@@ -128,6 +134,7 @@ ...@@ -128,6 +134,7 @@
"participants": { "participants": {
"nodes": [ "nodes": [
{ {
"id": "48",
"user": { "user": {
"id": "gid://gitlab/IncidentManagement::OncallParticipant/48", "id": "gid://gitlab/IncidentManagement::OncallParticipant/48",
"username": "root", "username": "root",
...@@ -143,6 +150,7 @@ ...@@ -143,6 +150,7 @@
"nodes": [ "nodes": [
{ {
"participant": { "participant": {
"id": "40",
"colorWeight": "500", "colorWeight": "500",
"colorPalette": "magenta", "colorPalette": "magenta",
"user": { "user": {
...@@ -157,6 +165,7 @@ ...@@ -157,6 +165,7 @@
}, },
{ {
"participant": { "participant": {
"id": "41",
"colorWeight": "600", "colorWeight": "600",
"colorPalette": "blue", "colorPalette": "blue",
"user": { "user": {
...@@ -186,6 +195,7 @@ ...@@ -186,6 +195,7 @@
"participants": { "participants": {
"nodes": [ "nodes": [
{ {
"id": "51",
"user": { "user": {
"id": "gid://gitlab/IncidentManagement::OncallParticipant/51", "id": "gid://gitlab/IncidentManagement::OncallParticipant/51",
"username": "oregand", "username": "oregand",
...@@ -201,6 +211,7 @@ ...@@ -201,6 +211,7 @@
"nodes": [ "nodes": [
{ {
"participant": { "participant": {
"id": "43",
"colorWeight": "600", "colorWeight": "600",
"colorPalette": "orange", "colorPalette": "orange",
"user": { "user": {
...@@ -215,6 +226,7 @@ ...@@ -215,6 +226,7 @@
}, },
{ {
"participant": { "participant": {
"id": "44",
"colorWeight": "600", "colorWeight": "600",
"colorPalette": "aqua", "colorPalette": "aqua",
"user": { "user": {
......
...@@ -158,6 +158,7 @@ describe('On-call schedule wrapper', () => { ...@@ -158,6 +158,7 @@ describe('On-call schedule wrapper', () => {
getOncallSchedulesQuerySpy = jest.fn().mockResolvedValue({ getOncallSchedulesQuerySpy = jest.fn().mockResolvedValue({
data: { data: {
project: { project: {
id: 'project-1',
incidentManagementOncallSchedules: { incidentManagementOncallSchedules: {
nodes: [preExistingSchedule, newlyCreatedSchedule], nodes: [preExistingSchedule, newlyCreatedSchedule],
}, },
......
...@@ -16,8 +16,9 @@ export const mockLinkedPipelines = ({ hasDownstream = true, hasUpstream = true } ...@@ -16,8 +16,9 @@ export const mockLinkedPipelines = ({ hasDownstream = true, hasUpstream = true }
{ {
id: 'gid://gitlab/Ci::Pipeline/612', id: 'gid://gitlab/Ci::Pipeline/612',
path: '/root/job-log-sections/-/pipelines/612', path: '/root/job-log-sections/-/pipelines/612',
project: { name: 'job-log-sections', __typename: 'Project' }, project: { id: '1', name: 'job-log-sections', __typename: 'Project' },
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
label: 'passed', label: 'passed',
...@@ -34,8 +35,9 @@ export const mockLinkedPipelines = ({ hasDownstream = true, hasUpstream = true } ...@@ -34,8 +35,9 @@ export const mockLinkedPipelines = ({ hasDownstream = true, hasUpstream = true }
upstream = { upstream = {
id: 'gid://gitlab/Ci::Pipeline/610', id: 'gid://gitlab/Ci::Pipeline/610',
path: '/root/trigger-downstream/-/pipelines/610', path: '/root/trigger-downstream/-/pipelines/610',
project: { name: 'trigger-downstream', __typename: 'Project' }, project: { id: '1', name: 'trigger-downstream', __typename: 'Project' },
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
label: 'passed', label: 'passed',
...@@ -48,7 +50,9 @@ export const mockLinkedPipelines = ({ hasDownstream = true, hasUpstream = true } ...@@ -48,7 +50,9 @@ export const mockLinkedPipelines = ({ hasDownstream = true, hasUpstream = true }
return { return {
data: { data: {
project: { project: {
id: '1',
pipeline: { pipeline: {
id: 'pipeline-1',
path: '/root/ci-project/-/pipelines/790', path: '/root/ci-project/-/pipelines/790',
downstream, downstream,
upstream, upstream,
......
...@@ -8,6 +8,7 @@ export const mockUserPermissions = { ...@@ -8,6 +8,7 @@ export const mockUserPermissions = {
}; };
export const mockAuthor = { export const mockAuthor = {
id: 'user-1',
name: 'Administrator', name: 'Administrator',
username: 'root', username: 'root',
avatarUrl: 'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', avatarUrl: 'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
...@@ -36,6 +37,7 @@ export const mockTestReportMissing = { ...@@ -36,6 +37,7 @@ export const mockTestReportMissing = {
}; };
export const requirement1 = { export const requirement1 = {
id: 'req-1',
iid: '1', iid: '1',
title: 'Virtutis, magnitudinis animi, patientiae, fortitudinis fomentis dolor mitigari solet.', title: 'Virtutis, magnitudinis animi, patientiae, fortitudinis fomentis dolor mitigari solet.',
titleHtml: titleHtml:
...@@ -56,6 +58,7 @@ export const requirement1 = { ...@@ -56,6 +58,7 @@ export const requirement1 = {
}; };
export const requirement2 = { export const requirement2 = {
id: 'req-2',
iid: '2', iid: '2',
title: 'Est autem officium, quod ita factum est, ut eius facti probabilis ratio reddi possit.', title: 'Est autem officium, quod ita factum est, ut eius facti probabilis ratio reddi possit.',
titleHtml: titleHtml:
...@@ -76,6 +79,7 @@ export const requirement2 = { ...@@ -76,6 +79,7 @@ export const requirement2 = {
}; };
export const requirement3 = { export const requirement3 = {
id: 'req-3',
iid: '3', iid: '3',
title: 'Non modo carum sibi quemque, verum etiam vehementer carum esse', title: 'Non modo carum sibi quemque, verum etiam vehementer carum esse',
titleHtml: 'Non modo carum sibi quemque, verum etiam vehementer carum esse', titleHtml: 'Non modo carum sibi quemque, verum etiam vehementer carum esse',
...@@ -95,6 +99,7 @@ export const requirement3 = { ...@@ -95,6 +99,7 @@ export const requirement3 = {
}; };
export const requirementArchived = { export const requirementArchived = {
id: 'req-arch',
iid: '23', iid: '23',
title: 'Cuius quidem, quoniam Stoicus fuit', title: 'Cuius quidem, quoniam Stoicus fuit',
titleHtml: 'Cuius quidem, quoniam Stoicus fuit', titleHtml: 'Cuius quidem, quoniam Stoicus fuit',
...@@ -189,6 +194,7 @@ export const mockInitialRequirementCounts = { ...@@ -189,6 +194,7 @@ export const mockInitialRequirementCounts = {
export const mockProjectRequirementCounts = { export const mockProjectRequirementCounts = {
data: { data: {
project: { project: {
id: '1',
requirementStatesCount: { requirementStatesCount: {
opened: mockInitialRequirementCounts.OPENED, opened: mockInitialRequirementCounts.OPENED,
archived: mockInitialRequirementCounts.ARCHIVED, archived: mockInitialRequirementCounts.ARCHIVED,
...@@ -222,6 +228,7 @@ export const mockEmptyTestReportConnection = { ...@@ -222,6 +228,7 @@ export const mockEmptyTestReportConnection = {
const projectRequirementBase = { const projectRequirementBase = {
__typename: 'Requirement', __typename: 'Requirement',
id: 'req-2',
iid: '1', iid: '1',
title: 'Requirement 1', title: 'Requirement 1',
titleHtml: 'Requirement 1', titleHtml: 'Requirement 1',
...@@ -300,6 +307,7 @@ const mockRequirementConnection = { ...@@ -300,6 +307,7 @@ const mockRequirementConnection = {
export const mockProjectRequirements = { export const mockProjectRequirements = {
data: { data: {
project: { project: {
id: '1',
requirements: { requirements: {
...mockRequirementConnection, ...mockRequirementConnection,
nodes: [{ ...mockProjectRequirementPassed }], nodes: [{ ...mockProjectRequirementPassed }],
......
export const apiFuzzingConfigurationQueryResponse = { export const apiFuzzingConfigurationQueryResponse = {
data: { data: {
project: { project: {
id: '1',
apiFuzzingCiConfiguration: { apiFuzzingCiConfiguration: {
scanModes: ['HAR', 'OPENAPI'], scanModes: ['HAR', 'OPENAPI'],
scanProfiles: [ scanProfiles: [
......
export const dastSiteValidations = (nodes = []) => ({ export const dastSiteValidations = (nodes = []) => ({
data: { data: {
project: { project: {
id: '1',
validations: { validations: {
nodes, nodes,
}, },
......
...@@ -106,9 +106,11 @@ export const savedScans = [ ...@@ -106,9 +106,11 @@ export const savedScans = [
export const failedSiteValidations = [ export const failedSiteValidations = [
{ {
id: '1',
normalizedTargetUrl: 'http://example.com:80', normalizedTargetUrl: 'http://example.com:80',
}, },
{ {
id: '2',
normalizedTargetUrl: 'https://example.com:443', normalizedTargetUrl: 'https://example.com:443',
}, },
]; ];
...@@ -3,6 +3,7 @@ import { makeEntities } from '../helpers'; ...@@ -3,6 +3,7 @@ import { makeEntities } from '../helpers';
export const sastCiConfigurationQueryResponse = { export const sastCiConfigurationQueryResponse = {
data: { data: {
project: { project: {
id: '1',
sastCiConfiguration: { sastCiConfiguration: {
global: { global: {
nodes: makeEntities(2, { __typename: 'SastCiConfigurationEntity' }), nodes: makeEntities(2, { __typename: 'SastCiConfigurationEntity' }),
......
...@@ -210,6 +210,7 @@ describe('Group Security Dashboard Vulnerabilities Component', () => { ...@@ -210,6 +210,7 @@ describe('Group Security Dashboard Vulnerabilities Component', () => {
const mockQuery = jest.fn().mockResolvedValue({ const mockQuery = jest.fn().mockResolvedValue({
data: { data: {
group: { group: {
id: 'group-1',
vulnerabilities: { vulnerabilities: {
nodes: [], nodes: [],
pageInfo: { endCursor: '', hasNextPage: '' }, pageInfo: { endCursor: '', hasNextPage: '' },
......
...@@ -4,6 +4,7 @@ export const generateVulnerabilities = () => [ ...@@ -4,6 +4,7 @@ export const generateVulnerabilities = () => [
detectedAt: '2020-07-29T15:36:54Z', detectedAt: '2020-07-29T15:36:54Z',
hasSolutions: true, hasSolutions: true,
mergeRequest: { mergeRequest: {
id: 'mr-1',
webUrl: 'www.testmr.com/1', webUrl: 'www.testmr.com/1',
state: 'status_warning', state: 'status_warning',
securityAutoFix: true, securityAutoFix: true,
...@@ -29,16 +30,18 @@ export const generateVulnerabilities = () => [ ...@@ -29,16 +30,18 @@ export const generateVulnerabilities = () => [
'registry.gitlab.com/groulot/container-scanning-test/main:5f21de6956aee99ddb68ae49498662d9872f50ff', 'registry.gitlab.com/groulot/container-scanning-test/main:5f21de6956aee99ddb68ae49498662d9872f50ff',
}, },
project: { project: {
id: 'project-1',
nameWithNamespace: 'Administrator / Security reports', nameWithNamespace: 'Administrator / Security reports',
}, },
scanner: { scanner: {
id: 'scanner-1',
vendor: 'GitLab', vendor: 'GitLab',
}, },
issueLinks: { issueLinks: {
nodes: [{ issue: { iid: 15 } }], nodes: [{ id: 'issue-1', issue: { id: 'issue-1', iid: 15 } }],
}, },
externalIssueLinks: { externalIssueLinks: {
nodes: [{ issue: { iid: 15, externalTracker: 'jira' } }], nodes: [{ id: 'issue-1', issue: { iid: 15, externalTracker: 'jira' } }],
}, },
}, },
{ {
...@@ -62,9 +65,11 @@ export const generateVulnerabilities = () => [ ...@@ -62,9 +65,11 @@ export const generateVulnerabilities = () => [
'/gitlab-org/security-reports2/-/blob/e5c61e4d5d0b8418011171def04ca0aa36532621/src/main/java/com/gitlab/security_products/tests/App.java', '/gitlab-org/security-reports2/-/blob/e5c61e4d5d0b8418011171def04ca0aa36532621/src/main/java/com/gitlab/security_products/tests/App.java',
}, },
project: { project: {
id: 'project-2',
nameWithNamespace: 'Administrator / Vulnerability reports', nameWithNamespace: 'Administrator / Vulnerability reports',
}, },
scanner: { scanner: {
id: 'scanner-2',
vendor: 'GitLab', vendor: 'GitLab',
}, },
}, },
...@@ -80,9 +85,11 @@ export const generateVulnerabilities = () => [ ...@@ -80,9 +85,11 @@ export const generateVulnerabilities = () => [
file: 'src/main/java/com/gitlab/security_products/tests/App.java', file: 'src/main/java/com/gitlab/security_products/tests/App.java',
}, },
project: { project: {
id: 'project-3',
nameWithNamespace: 'Mixed Vulnerabilities / Dependency List Test 01', nameWithNamespace: 'Mixed Vulnerabilities / Dependency List Test 01',
}, },
scanner: { scanner: {
id: 'scanner-3',
vendor: 'My Custom Scanner', vendor: 'My Custom Scanner',
}, },
}, },
...@@ -95,6 +102,7 @@ export const generateVulnerabilities = () => [ ...@@ -95,6 +102,7 @@ export const generateVulnerabilities = () => [
file: 'yarn.lock', file: 'yarn.lock',
}, },
project: { project: {
id: 'project-4',
nameWithNamespace: 'Mixed Vulnerabilities / Rails App', nameWithNamespace: 'Mixed Vulnerabilities / Rails App',
}, },
scanner: {}, scanner: {},
...@@ -106,6 +114,7 @@ export const generateVulnerabilities = () => [ ...@@ -106,6 +114,7 @@ export const generateVulnerabilities = () => [
state: 'DISMISSED', state: 'DISMISSED',
location: {}, location: {},
project: { project: {
id: 'project-5',
nameWithNamespace: 'Administrator / Security reports', nameWithNamespace: 'Administrator / Security reports',
}, },
scanner: {}, scanner: {},
...@@ -119,6 +128,7 @@ export const generateVulnerabilities = () => [ ...@@ -119,6 +128,7 @@ export const generateVulnerabilities = () => [
path: '/v1/trees', path: '/v1/trees',
}, },
project: { project: {
id: 'project-6',
nameWithNamespace: 'Administrator / Security reports', nameWithNamespace: 'Administrator / Security reports',
}, },
scanner: {}, scanner: {},
......
...@@ -3,6 +3,7 @@ import { merge } from 'lodash'; ...@@ -3,6 +3,7 @@ import { merge } from 'lodash';
export const pipelineSecurityReportSummary = { export const pipelineSecurityReportSummary = {
data: { data: {
project: { project: {
id: 'project-1',
pipeline: { pipeline: {
id: 'gid://gitlab/Ci::Pipeline/99', id: 'gid://gitlab/Ci::Pipeline/99',
securityReportSummary: { securityReportSummary: {
...@@ -69,6 +70,7 @@ export const pipelineSecurityReportSummary = { ...@@ -69,6 +70,7 @@ export const pipelineSecurityReportSummary = {
jobs: { jobs: {
nodes: [ nodes: [
{ {
id: 'job-1',
name: 'api_fuzzing', name: 'api_fuzzing',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -86,6 +88,7 @@ export const pipelineSecurityReportSummary = { ...@@ -86,6 +88,7 @@ export const pipelineSecurityReportSummary = {
}, },
}, },
{ {
id: 'job-2',
name: 'coverage_fuzzing', name: 'coverage_fuzzing',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -103,6 +106,7 @@ export const pipelineSecurityReportSummary = { ...@@ -103,6 +106,7 @@ export const pipelineSecurityReportSummary = {
}, },
}, },
{ {
id: 'job-3',
name: 'sast-tslint', name: 'sast-tslint',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -120,6 +124,7 @@ export const pipelineSecurityReportSummary = { ...@@ -120,6 +124,7 @@ export const pipelineSecurityReportSummary = {
}, },
}, },
{ {
id: 'job-4',
name: 'sast-spotbugs', name: 'sast-spotbugs',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -137,6 +142,7 @@ export const pipelineSecurityReportSummary = { ...@@ -137,6 +142,7 @@ export const pipelineSecurityReportSummary = {
}, },
}, },
{ {
id: 'job-5',
name: 'sast-sobelow', name: 'sast-sobelow',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -154,6 +160,7 @@ export const pipelineSecurityReportSummary = { ...@@ -154,6 +160,7 @@ export const pipelineSecurityReportSummary = {
}, },
}, },
{ {
id: 'job-6',
name: 'sast-pmd-apex', name: 'sast-pmd-apex',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -171,6 +178,7 @@ export const pipelineSecurityReportSummary = { ...@@ -171,6 +178,7 @@ export const pipelineSecurityReportSummary = {
}, },
}, },
{ {
id: 'job-7',
name: 'sast-eslint', name: 'sast-eslint',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -188,6 +196,7 @@ export const pipelineSecurityReportSummary = { ...@@ -188,6 +196,7 @@ export const pipelineSecurityReportSummary = {
}, },
}, },
{ {
id: 'job-8',
name: 'secrets', name: 'secrets',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -216,7 +225,9 @@ export const scansWithErrors = [{ errors: ['error description'], name: 'scan-nam ...@@ -216,7 +225,9 @@ export const scansWithErrors = [{ errors: ['error description'], name: 'scan-nam
export const pipelineSecurityReportSummaryWithErrors = merge({}, pipelineSecurityReportSummary, { export const pipelineSecurityReportSummaryWithErrors = merge({}, pipelineSecurityReportSummary, {
data: { data: {
project: { project: {
id: 'project-1',
pipeline: { pipeline: {
id: 'pipeline-1',
securityReportSummary: { securityReportSummary: {
dast: { dast: {
scans: { scans: {
...@@ -232,7 +243,9 @@ export const pipelineSecurityReportSummaryWithErrors = merge({}, pipelineSecurit ...@@ -232,7 +243,9 @@ export const pipelineSecurityReportSummaryWithErrors = merge({}, pipelineSecurit
export const pipelineSecurityReportSummaryEmpty = merge({}, pipelineSecurityReportSummary, { export const pipelineSecurityReportSummaryEmpty = merge({}, pipelineSecurityReportSummary, {
data: { data: {
project: { project: {
id: 'project-1',
pipeline: { pipeline: {
id: 'pipeline-1',
securityReportSummary: null, securityReportSummary: null,
}, },
}, },
......
...@@ -50,6 +50,7 @@ describe('Vulnerabilities app component', () => { ...@@ -50,6 +50,7 @@ describe('Vulnerabilities app component', () => {
} = {}) => ({ } = {}) => ({
data: { data: {
project: { project: {
id: 'project-1',
securityScanners: { available, enabled, pipelineRun }, securityScanners: { available, enabled, pipelineRun },
}, },
}, },
......
...@@ -25,6 +25,7 @@ const getCountsRequestHandler = ({ ...@@ -25,6 +25,7 @@ const getCountsRequestHandler = ({
return jest.fn().mockResolvedValue({ return jest.fn().mockResolvedValue({
data: { data: {
[dashboardType]: { [dashboardType]: {
id: '1',
vulnerabilitySeveritiesCount: data, vulnerabilitySeveritiesCount: data,
}, },
}, },
......
...@@ -20,6 +20,7 @@ const createVulnerabilitiesRequestHandler = ({ hasNextPage }) => ...@@ -20,6 +20,7 @@ const createVulnerabilitiesRequestHandler = ({ hasNextPage }) =>
jest.fn().mockResolvedValue({ jest.fn().mockResolvedValue({
data: { data: {
group: { group: {
id: 'group-1',
vulnerabilities: { vulnerabilities: {
nodes: [], nodes: [],
pageInfo: { endCursor: 'abc', hasNextPage }, pageInfo: { endCursor: 'abc', hasNextPage },
......
...@@ -171,7 +171,9 @@ describe('Vulnerability Report', () => { ...@@ -171,7 +171,9 @@ describe('Vulnerability Report', () => {
apolloProvider: createApolloProvider([ apolloProvider: createApolloProvider([
[ [
groupProjectsQuery, groupProjectsQuery,
jest.fn().mockResolvedValue({ data: { group: { projects: { nodes: [] } } } }), jest
.fn()
.mockResolvedValue({ data: { group: { id: 'group-1', projects: { nodes: [] } } } }),
], ],
]), ]),
}); });
......
...@@ -106,6 +106,7 @@ const vulnerabilityGrades = [ ...@@ -106,6 +106,7 @@ const vulnerabilityGrades = [
export const mockGroupVulnerabilityGrades = () => ({ export const mockGroupVulnerabilityGrades = () => ({
data: { data: {
group: { group: {
id: 'group-1',
vulnerabilityGrades, vulnerabilityGrades,
}, },
}, },
...@@ -132,6 +133,7 @@ export const mockProjectSecurityChartsWithoutData = () => ({ ...@@ -132,6 +133,7 @@ export const mockProjectSecurityChartsWithoutData = () => ({
export const mockProjectSecurityChartsWithData = () => ({ export const mockProjectSecurityChartsWithData = () => ({
data: { data: {
project: { project: {
id: 'project-1',
vulnerabilitiesCountByDay: { vulnerabilitiesCountByDay: {
nodes: [ nodes: [
{ {
...@@ -213,6 +215,7 @@ export const mockVulnerableProjectsInstance = () => ({ ...@@ -213,6 +215,7 @@ export const mockVulnerableProjectsInstance = () => ({
export const mockVulnerableProjectsGroup = () => ({ export const mockVulnerableProjectsGroup = () => ({
data: { data: {
group: { group: {
id: 'group-1',
projects: { projects: {
nodes: [ nodes: [
{ {
...@@ -228,6 +231,7 @@ export const mockVulnerableProjectsGroup = () => ({ ...@@ -228,6 +231,7 @@ export const mockVulnerableProjectsGroup = () => ({
export const mockVulnerabilitySeveritiesGraphQLResponse = ({ dashboardType }) => ({ export const mockVulnerabilitySeveritiesGraphQLResponse = ({ dashboardType }) => ({
data: { data: {
[dashboardType]: { [dashboardType]: {
id: '1',
vulnerabilitySeveritiesCount: { vulnerabilitySeveritiesCount: {
__typename: 'VulnerabilitySeveritiesCount', __typename: 'VulnerabilitySeveritiesCount',
critical: 0, critical: 0,
...@@ -247,6 +251,7 @@ export const mockVulnerabilitySeveritiesGraphQLResponse = ({ dashboardType }) => ...@@ -247,6 +251,7 @@ export const mockVulnerabilitySeveritiesGraphQLResponse = ({ dashboardType }) =>
export const mockPipelineFindingsResponse = ({ hasNextPage } = {}) => ({ export const mockPipelineFindingsResponse = ({ hasNextPage } = {}) => ({
data: { data: {
project: { project: {
id: 'project-1',
pipeline: { pipeline: {
id: 'gid://gitlab/Ci::Pipeline/59', id: 'gid://gitlab/Ci::Pipeline/59',
securityReportFindings: { securityReportFindings: {
......
...@@ -66,6 +66,7 @@ describe('IterationDropdown', () => { ...@@ -66,6 +66,7 @@ describe('IterationDropdown', () => {
groupIterationsSpy = jest.fn().mockResolvedValue({ groupIterationsSpy = jest.fn().mockResolvedValue({
data: { data: {
group: { group: {
id: '1',
iterations: { iterations: {
nodes: TEST_ITERATIONS, nodes: TEST_ITERATIONS,
}, },
......
...@@ -14,6 +14,7 @@ export const getHealthStatusQueryResponse = ({ state = 'opened', healthStatus = ...@@ -14,6 +14,7 @@ export const getHealthStatusQueryResponse = ({ state = 'opened', healthStatus =
return { return {
data: { data: {
workspace: { workspace: {
id: '1',
issuable: { id: 'gid://gitlab/Issue/1', state, healthStatus, __typename: 'Issue' }, issuable: { id: 'gid://gitlab/Issue/1', state, healthStatus, __typename: 'Issue' },
__typename: 'Project', __typename: 'Project',
}, },
......
...@@ -44,6 +44,7 @@ export const mockEpic2 = { ...@@ -44,6 +44,7 @@ export const mockEpic2 = {
export const mockGroupIterationsResponse = { export const mockGroupIterationsResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
iterations: { iterations: {
nodes: [mockIteration1, mockIteration2], nodes: [mockIteration1, mockIteration2],
}, },
...@@ -56,6 +57,7 @@ export const mockGroupIterationsResponse = { ...@@ -56,6 +57,7 @@ export const mockGroupIterationsResponse = {
export const mockGroupEpicsResponse = { export const mockGroupEpicsResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
attributes: { attributes: {
nodes: [mockEpic1, mockEpic2], nodes: [mockEpic1, mockEpic2],
}, },
...@@ -68,6 +70,7 @@ export const mockGroupEpicsResponse = { ...@@ -68,6 +70,7 @@ export const mockGroupEpicsResponse = {
export const emptyGroupIterationsResponse = { export const emptyGroupIterationsResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
iterations: { iterations: {
nodes: [], nodes: [],
}, },
...@@ -80,6 +83,7 @@ export const emptyGroupIterationsResponse = { ...@@ -80,6 +83,7 @@ export const emptyGroupIterationsResponse = {
export const emptyGroupEpicsResponse = { export const emptyGroupEpicsResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
attributes: { attributes: {
nodes: [], nodes: [],
}, },
...@@ -92,6 +96,7 @@ export const emptyGroupEpicsResponse = { ...@@ -92,6 +96,7 @@ export const emptyGroupEpicsResponse = {
export const noCurrentIterationResponse = { export const noCurrentIterationResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
issuable: { id: mockIssueId, iteration: null, __typename: 'Issue' }, issuable: { id: mockIssueId, iteration: null, __typename: 'Issue' },
__typename: 'Project', __typename: 'Project',
}, },
...@@ -101,6 +106,7 @@ export const noCurrentIterationResponse = { ...@@ -101,6 +106,7 @@ export const noCurrentIterationResponse = {
export const noCurrentEpicResponse = { export const noCurrentEpicResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
issuable: { id: mockIssueId, attribute: null, __typename: 'Issue' }, issuable: { id: mockIssueId, attribute: null, __typename: 'Issue' },
__typename: 'Project', __typename: 'Project',
}, },
...@@ -148,6 +154,7 @@ export const mockEpicMutationResponse = { ...@@ -148,6 +154,7 @@ export const mockEpicMutationResponse = {
export const epicAncestorsResponse = () => ({ export const epicAncestorsResponse = () => ({
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Group', __typename: 'Group',
issuable: { issuable: {
__typename: 'Epic', __typename: 'Epic',
...@@ -170,6 +177,7 @@ export const epicAncestorsResponse = () => ({ ...@@ -170,6 +177,7 @@ export const epicAncestorsResponse = () => ({
export const issueNoWeightResponse = () => ({ export const issueNoWeightResponse = () => ({
data: { data: {
workspace: { workspace: {
id: '1',
issuable: { id: mockIssueId, weight: null, __typename: 'Issue' }, issuable: { id: mockIssueId, weight: null, __typename: 'Issue' },
__typename: 'Project', __typename: 'Project',
}, },
...@@ -179,6 +187,7 @@ export const issueNoWeightResponse = () => ({ ...@@ -179,6 +187,7 @@ export const issueNoWeightResponse = () => ({
export const issueWeightResponse = () => ({ export const issueWeightResponse = () => ({
data: { data: {
workspace: { workspace: {
id: '1',
issuable: { id: mockIssueId, weight: 0, __typename: 'Issue' }, issuable: { id: mockIssueId, weight: 0, __typename: 'Issue' },
__typename: 'Project', __typename: 'Project',
}, },
......
...@@ -14,7 +14,7 @@ describe('PolicyAlertPicker component', () => { ...@@ -14,7 +14,7 @@ describe('PolicyAlertPicker component', () => {
const createMockApolloProvider = ({ agentCount }) => { const createMockApolloProvider = ({ agentCount }) => {
const getAgentCountHandler = jest const getAgentCountHandler = jest
.fn() .fn()
.mockResolvedValue({ data: { project: { clusterAgents: { count: agentCount } } } }); .mockResolvedValue({ data: { project: { id: '1', clusterAgents: { count: agentCount } } } });
return createMockApollo([[getAgentCount, getAgentCountHandler]]); return createMockApollo([[getAgentCount, getAgentCountHandler]]);
}; };
......
import { mockAlertDetails, mockAlerts, mockPageInfo } from './mock_data'; import { mockAlertDetails, mockAlerts, mockPageInfo } from './mock_data';
export const getAlertsQuerySpy = jest.fn().mockResolvedValue({ export const getAlertsQuerySpy = jest.fn().mockResolvedValue({
data: { project: { alertManagementAlerts: { nodes: mockAlerts, pageInfo: mockPageInfo } } }, data: {
project: { id: '1', alertManagementAlerts: { nodes: mockAlerts, pageInfo: mockPageInfo } },
},
}); });
export const emptyGetAlertsQuerySpy = jest.fn().mockResolvedValue({ export const emptyGetAlertsQuerySpy = jest.fn().mockResolvedValue({
data: { data: {
project: { project: {
id: '1',
alertManagementAlerts: { alertManagementAlerts: {
nodes: [], nodes: [],
pageInfo: { endCursor: '', hasNextPage: false, hasPreviousPage: false, startCursor: '' }, pageInfo: { endCursor: '', hasNextPage: false, hasPreviousPage: false, startCursor: '' },
...@@ -20,7 +23,7 @@ export const loadingQuerySpy = jest.fn().mockReturnValue(new Promise(() => {})); ...@@ -20,7 +23,7 @@ export const loadingQuerySpy = jest.fn().mockReturnValue(new Promise(() => {}));
export const apolloFailureResponse = jest.fn().mockRejectedValue(); export const apolloFailureResponse = jest.fn().mockRejectedValue();
export const getAlertDetailsQuerySpy = jest.fn().mockResolvedValue({ export const getAlertDetailsQuerySpy = jest.fn().mockResolvedValue({
data: { project: { alertManagementAlerts: { nodes: [mockAlertDetails] } } }, data: { project: { id: '1', alertManagementAlerts: { nodes: [mockAlertDetails] } } },
}); });
export const getAlertDetailsQueryErrorMessage = export const getAlertDetailsQueryErrorMessage =
...@@ -34,6 +37,7 @@ export const networkPolicies = (nodes) => ...@@ -34,6 +37,7 @@ export const networkPolicies = (nodes) =>
jest.fn().mockResolvedValue({ jest.fn().mockResolvedValue({
data: { data: {
project: { project: {
id: '1',
networkPolicies: { networkPolicies: {
nodes, nodes,
}, },
...@@ -45,6 +49,7 @@ export const scanExecutionPolicies = (nodes) => ...@@ -45,6 +49,7 @@ export const scanExecutionPolicies = (nodes) =>
jest.fn().mockResolvedValue({ jest.fn().mockResolvedValue({
data: { data: {
project: { project: {
id: '3',
scanExecutionPolicies: { scanExecutionPolicies: {
nodes, nodes,
}, },
......
...@@ -186,7 +186,7 @@ export const mockNetworkPoliciesResponse = [ ...@@ -186,7 +186,7 @@ export const mockNetworkPoliciesResponse = [
fromAutoDevops: false, fromAutoDevops: false,
updatedAt: '2021-06-08T04:01:11Z', updatedAt: '2021-06-08T04:01:11Z',
environments: { environments: {
nodes: [{ name: 'production', __typename: 'Environment' }], nodes: [{ id: 'env-1', name: 'production', __typename: 'Environment' }],
}, },
}, },
]; ];
...@@ -251,7 +251,13 @@ export const mockAlerts = [ ...@@ -251,7 +251,13 @@ export const mockAlerts = [
status: 'TRIGGERED', status: 'TRIGGERED',
startedAt: '2020-11-19T18:36:23Z', startedAt: '2020-11-19T18:36:23Z',
eventCount: '1', eventCount: '1',
issue: { iid: '5', state: 'opened', title: 'Issue 01', webUrl: 'http://test.com/05' }, issue: {
id: 'issue-1',
iid: '5',
state: 'opened',
title: 'Issue 01',
webUrl: 'http://test.com/05',
},
assignees: { assignees: {
nodes: [ nodes: [
{ {
...@@ -271,7 +277,13 @@ export const mockAlerts = [ ...@@ -271,7 +277,13 @@ export const mockAlerts = [
status: 'ACKNOWLEDGED', status: 'ACKNOWLEDGED',
startedAt: '2020-11-16T21:59:28Z', startedAt: '2020-11-16T21:59:28Z',
eventCount: '2', eventCount: '2',
issue: { iid: '6', state: 'closed', title: 'Issue 02', webUrl: 'http://test.com/06' }, issue: {
id: 'issue-2',
iid: '6',
state: 'closed',
title: 'Issue 02',
webUrl: 'http://test.com/06',
},
assignees: { nodes: [] }, assignees: { nodes: [] },
}, },
{ {
......
...@@ -27,7 +27,7 @@ const MINUTES = { ...@@ -27,7 +27,7 @@ const MINUTES = {
}; };
const issueStateResponse = (state = 'opened') => ({ const issueStateResponse = (state = 'opened') => ({
data: { project: { issue: { state, id: '1' } } }, data: { project: { id: 'project-1', issue: { state, id: '1' } } },
}); });
describe('Service Level Agreement', () => { describe('Service Level Agreement', () => {
......
...@@ -3,6 +3,7 @@ export const vulnerabilityExternalIssueLinkCreateMockFactory = ({ errors = [] } ...@@ -3,6 +3,7 @@ export const vulnerabilityExternalIssueLinkCreateMockFactory = ({ errors = [] }
vulnerabilityExternalIssueLinkCreate: { vulnerabilityExternalIssueLinkCreate: {
errors, errors,
externalIssueLink: { externalIssueLink: {
id: '1',
externalIssue: { externalIssue: {
webUrl: 'http://foo.bar', webUrl: 'http://foo.bar',
}, },
......
...@@ -34,6 +34,7 @@ export const updatePrometheusVariables = { ...@@ -34,6 +34,7 @@ export const updatePrometheusVariables = {
export const getIntegrationsQueryResponse = { export const getIntegrationsQueryResponse = {
data: { data: {
project: { project: {
id: '1',
alertManagementIntegrations: { alertManagementIntegrations: {
nodes: [ nodes: [
{ {
......
...@@ -13,6 +13,7 @@ localVue.use(VueApollo); ...@@ -13,6 +13,7 @@ localVue.use(VueApollo);
const keepLatestArtifactProjectMock = { const keepLatestArtifactProjectMock = {
data: { data: {
project: { project: {
id: '1',
ciCdSettings: { keepLatestArtifact: true }, ciCdSettings: { keepLatestArtifact: true },
}, },
}, },
......
...@@ -27,6 +27,7 @@ describe('ClusterAgentShow', () => { ...@@ -27,6 +27,7 @@ describe('ClusterAgentShow', () => {
id: '1', id: '1',
createdAt: '2021-02-13T00:00:00Z', createdAt: '2021-02-13T00:00:00Z',
createdByUser: { createdByUser: {
id: 'user-1',
name: 'user-1', name: 'user-1',
}, },
name: 'token-1', name: 'token-1',
...@@ -39,7 +40,8 @@ describe('ClusterAgentShow', () => { ...@@ -39,7 +40,8 @@ describe('ClusterAgentShow', () => {
const createWrapper = ({ clusterAgent, queryResponse = null }) => { const createWrapper = ({ clusterAgent, queryResponse = null }) => {
const agentQueryResponse = const agentQueryResponse =
queryResponse || jest.fn().mockResolvedValue({ data: { project: { clusterAgent } } }); queryResponse ||
jest.fn().mockResolvedValue({ data: { project: { id: 'project-1', clusterAgent } } });
const apolloProvider = createMockApollo([[getAgentQuery, agentQueryResponse]]); const apolloProvider = createMockApollo([[getAgentQuery, agentQueryResponse]]);
wrapper = extendedWrapper( wrapper = extendedWrapper(
......
...@@ -26,6 +26,7 @@ describe('Agents', () => { ...@@ -26,6 +26,7 @@ describe('Agents', () => {
const apolloQueryResponse = { const apolloQueryResponse = {
data: { data: {
project: { project: {
id: '1',
clusterAgents: { nodes: agents, pageInfo, tokens: { nodes: [] }, count }, clusterAgents: { nodes: agents, pageInfo, tokens: { nodes: [] }, count },
repository: { tree: { trees: { nodes: trees, pageInfo } } }, repository: { tree: { trees: { nodes: trees, pageInfo } } },
}, },
...@@ -75,6 +76,7 @@ describe('Agents', () => { ...@@ -75,6 +76,7 @@ describe('Agents', () => {
tokens: { tokens: {
nodes: [ nodes: [
{ {
id: 'token-1',
lastUsedAt: testDate, lastUsedAt: testDate,
}, },
], ],
...@@ -86,6 +88,7 @@ describe('Agents', () => { ...@@ -86,6 +88,7 @@ describe('Agents', () => {
const trees = [ const trees = [
{ {
id: 'tree-1',
name: 'agent-2', name: 'agent-2',
path: '.gitlab/agents/agent-2', path: '.gitlab/agents/agent-2',
webPath: '/project/path/.gitlab/agents/agent-2', webPath: '/project/path/.gitlab/agents/agent-2',
......
...@@ -39,6 +39,7 @@ describe('InstallAgentModal', () => { ...@@ -39,6 +39,7 @@ describe('InstallAgentModal', () => {
const apolloQueryResponse = { const apolloQueryResponse = {
data: { data: {
project: { project: {
id: '1',
clusterAgents: { nodes: [] }, clusterAgents: { nodes: [] },
agentConfigurations: { nodes: configurations }, agentConfigurations: { nodes: configurations },
}, },
......
...@@ -65,6 +65,7 @@ export const createAgentTokenErrorResponse = { ...@@ -65,6 +65,7 @@ export const createAgentTokenErrorResponse = {
export const getAgentResponse = { export const getAgentResponse = {
data: { data: {
project: { project: {
id: 'project-1',
clusterAgents: { nodes: [{ ...agent, tokens }], pageInfo, count }, clusterAgents: { nodes: [{ ...agent, tokens }], pageInfo, count },
repository: { repository: {
tree: { tree: {
......
...@@ -5,6 +5,7 @@ export const designListQueryResponse = { ...@@ -5,6 +5,7 @@ export const designListQueryResponse = {
id: '1', id: '1',
issue: { issue: {
__typename: 'Issue', __typename: 'Issue',
id: 'issue-1',
designCollection: { designCollection: {
__typename: 'DesignCollection', __typename: 'DesignCollection',
copyState: 'READY', copyState: 'READY',
...@@ -97,6 +98,7 @@ export const permissionsQueryResponse = { ...@@ -97,6 +98,7 @@ export const permissionsQueryResponse = {
id: '1', id: '1',
issue: { issue: {
__typename: 'Issue', __typename: 'Issue',
id: 'issue-1',
userPermissions: { __typename: 'UserPermissions', createDesign: true }, userPermissions: { __typename: 'UserPermissions', createDesign: true },
}, },
}, },
......
...@@ -643,6 +643,7 @@ describe('CE IssuesListApp component', () => { ...@@ -643,6 +643,7 @@ describe('CE IssuesListApp component', () => {
const response = (isProject = true) => ({ const response = (isProject = true) => ({
data: { data: {
[isProject ? 'project' : 'group']: { [isProject ? 'project' : 'group']: {
id: '1',
issues: { issues: {
...defaultQueryResponse.data.project.issues, ...defaultQueryResponse.data.project.issues,
nodes: [issueOne, issueTwo, issueThree, issueFour], nodes: [issueOne, issueTwo, issueThree, issueFour],
......
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
export const getIssuesQueryResponse = { export const getIssuesQueryResponse = {
data: { data: {
project: { project: {
id: '1',
issues: { issues: {
pageInfo: { pageInfo: {
hasNextPage: true, hasNextPage: true,
...@@ -75,6 +76,7 @@ export const getIssuesQueryResponse = { ...@@ -75,6 +76,7 @@ export const getIssuesQueryResponse = {
export const getIssuesCountsQueryResponse = { export const getIssuesCountsQueryResponse = {
data: { data: {
project: { project: {
id: '1',
openedIssues: { openedIssues: {
count: 1, count: 1,
}, },
...@@ -288,6 +290,7 @@ export const project3 = { ...@@ -288,6 +290,7 @@ export const project3 = {
export const searchProjectsQueryResponse = { export const searchProjectsQueryResponse = {
data: { data: {
group: { group: {
id: '1',
projects: { projects: {
nodes: [project1, project2, project3], nodes: [project1, project2, project3],
}, },
...@@ -298,6 +301,7 @@ export const searchProjectsQueryResponse = { ...@@ -298,6 +301,7 @@ export const searchProjectsQueryResponse = {
export const emptySearchProjectsQueryResponse = { export const emptySearchProjectsQueryResponse = {
data: { data: {
group: { group: {
id: '1',
projects: { projects: {
nodes: [], nodes: [],
}, },
......
...@@ -1474,6 +1474,7 @@ export const mockJobsInTable = [ ...@@ -1474,6 +1474,7 @@ export const mockJobsInTable = [
export const mockJobsQueryResponse = { export const mockJobsQueryResponse = {
data: { data: {
project: { project: {
id: '1',
jobs: { jobs: {
pageInfo: { pageInfo: {
endCursor: 'eyJpZCI6IjIzMTcifQ', endCursor: 'eyJpZCI6IjIzMTcifQ',
...@@ -1509,6 +1510,7 @@ export const mockJobsQueryResponse = { ...@@ -1509,6 +1510,7 @@ export const mockJobsQueryResponse = {
triggered: null, triggered: null,
createdByTag: false, createdByTag: false,
detailedStatus: { detailedStatus: {
id: 'status-1',
detailsPath: '/root/ci-project/-/jobs/2336', detailsPath: '/root/ci-project/-/jobs/2336',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -1516,6 +1518,7 @@ export const mockJobsQueryResponse = { ...@@ -1516,6 +1518,7 @@ export const mockJobsQueryResponse = {
text: 'passed', text: 'passed',
tooltip: 'passed', tooltip: 'passed',
action: { action: {
id: 'action-1',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
method: 'post', method: 'post',
...@@ -1535,6 +1538,7 @@ export const mockJobsQueryResponse = { ...@@ -1535,6 +1538,7 @@ export const mockJobsQueryResponse = {
id: 'gid://gitlab/Ci::Pipeline/473', id: 'gid://gitlab/Ci::Pipeline/473',
path: '/root/ci-project/-/pipelines/473', path: '/root/ci-project/-/pipelines/473',
user: { user: {
id: 'user-1',
webPath: '/root', webPath: '/root',
avatarUrl: avatarUrl:
'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', 'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
...@@ -1543,6 +1547,7 @@ export const mockJobsQueryResponse = { ...@@ -1543,6 +1547,7 @@ export const mockJobsQueryResponse = {
__typename: 'Pipeline', __typename: 'Pipeline',
}, },
stage: { stage: {
id: 'stage-1',
name: 'deploy', name: 'deploy',
__typename: 'CiStage', __typename: 'CiStage',
}, },
...@@ -1573,6 +1578,7 @@ export const mockJobsQueryResponse = { ...@@ -1573,6 +1578,7 @@ export const mockJobsQueryResponse = {
export const mockJobsQueryEmptyResponse = { export const mockJobsQueryEmptyResponse = {
data: { data: {
project: { project: {
id: '1',
jobs: [], jobs: [],
}, },
}, },
......
...@@ -37,6 +37,7 @@ export const graphQLImageListMock = { ...@@ -37,6 +37,7 @@ export const graphQLImageListMock = {
data: { data: {
project: { project: {
__typename: 'Project', __typename: 'Project',
id: '1',
containerRepositoriesCount: 2, containerRepositoriesCount: 2,
containerRepositories: { containerRepositories: {
__typename: 'ContainerRepositoryConnection', __typename: 'ContainerRepositoryConnection',
...@@ -51,6 +52,7 @@ export const graphQLEmptyImageListMock = { ...@@ -51,6 +52,7 @@ export const graphQLEmptyImageListMock = {
data: { data: {
project: { project: {
__typename: 'Project', __typename: 'Project',
id: '1',
containerRepositoriesCount: 2, containerRepositoriesCount: 2,
containerRepositories: { containerRepositories: {
__typename: 'ContainerRepositoryConnection', __typename: 'ContainerRepositoryConnection',
...@@ -65,6 +67,7 @@ export const graphQLEmptyGroupImageListMock = { ...@@ -65,6 +67,7 @@ export const graphQLEmptyGroupImageListMock = {
data: { data: {
group: { group: {
__typename: 'Group', __typename: 'Group',
id: '1',
containerRepositoriesCount: 2, containerRepositoriesCount: 2,
containerRepositories: { containerRepositories: {
__typename: 'ContainerRepositoryConnection', __typename: 'ContainerRepositoryConnection',
...@@ -120,6 +123,7 @@ export const containerRepositoryMock = { ...@@ -120,6 +123,7 @@ export const containerRepositoryMock = {
project: { project: {
visibility: 'public', visibility: 'public',
path: 'gitlab-test', path: 'gitlab-test',
id: '1',
containerExpirationPolicy: { containerExpirationPolicy: {
enabled: false, enabled: false,
nextRunAt: '2020-11-27T08:59:27Z', nextRunAt: '2020-11-27T08:59:27Z',
...@@ -243,6 +247,7 @@ export const dockerCommands = { ...@@ -243,6 +247,7 @@ export const dockerCommands = {
export const graphQLProjectImageRepositoriesDetailsMock = { export const graphQLProjectImageRepositoriesDetailsMock = {
data: { data: {
project: { project: {
id: '1',
containerRepositories: { containerRepositories: {
nodes: [ nodes: [
{ {
......
...@@ -8,8 +8,8 @@ export const proxyData = () => ({ ...@@ -8,8 +8,8 @@ export const proxyData = () => ({
export const proxySettings = (extend = {}) => ({ enabled: true, ...extend }); export const proxySettings = (extend = {}) => ({ enabled: true, ...extend });
export const proxyManifests = () => [ export const proxyManifests = () => [
{ createdAt: '2021-09-22T09:45:28Z', imageName: 'alpine:latest' }, { id: 'proxy-1', createdAt: '2021-09-22T09:45:28Z', imageName: 'alpine:latest' },
{ createdAt: '2021-09-21T09:45:28Z', imageName: 'alpine:stable' }, { id: 'proxy-2', createdAt: '2021-09-21T09:45:28Z', imageName: 'alpine:stable' },
]; ];
export const pagination = (extend) => ({ export const pagination = (extend) => ({
...@@ -26,6 +26,7 @@ export const proxyDetailsQuery = ({ extendSettings = {}, extend } = {}) => ({ ...@@ -26,6 +26,7 @@ export const proxyDetailsQuery = ({ extendSettings = {}, extend } = {}) => ({
group: { group: {
...proxyData(), ...proxyData(),
__typename: 'Group', __typename: 'Group',
id: '1',
dependencyProxySetting: { dependencyProxySetting: {
...proxySettings(extendSettings), ...proxySettings(extendSettings),
__typename: 'DependencyProxySetting', __typename: 'DependencyProxySetting',
......
...@@ -16,11 +16,13 @@ export const packagePipelines = (extend) => [ ...@@ -16,11 +16,13 @@ export const packagePipelines = (extend) => [
ref: 'master', ref: 'master',
sha: 'b83d6e391c22777fca1ed3012fce84f633d7fed0', sha: 'b83d6e391c22777fca1ed3012fce84f633d7fed0',
project: { project: {
id: '1',
name: 'project14', name: 'project14',
webUrl: 'http://gdk.test:3000/namespace14/project14', webUrl: 'http://gdk.test:3000/namespace14/project14',
__typename: 'Project', __typename: 'Project',
}, },
user: { user: {
id: 'user-1',
name: 'Administrator', name: 'Administrator',
}, },
...extend, ...extend,
...@@ -89,6 +91,7 @@ export const dependencyLinks = () => [ ...@@ -89,6 +91,7 @@ export const dependencyLinks = () => [
]; ];
export const packageProject = () => ({ export const packageProject = () => ({
id: '1',
fullPath: 'gitlab-org/gitlab-test', fullPath: 'gitlab-org/gitlab-test',
webUrl: 'http://gdk.test:3000/gitlab-org/gitlab-test', webUrl: 'http://gdk.test:3000/gitlab-org/gitlab-test',
__typename: 'Project', __typename: 'Project',
...@@ -127,6 +130,7 @@ export const packageData = (extend) => ({ ...@@ -127,6 +130,7 @@ export const packageData = (extend) => ({
}); });
export const conanMetadata = () => ({ export const conanMetadata = () => ({
id: 'conan-1',
packageChannel: 'stable', packageChannel: 'stable',
packageUsername: 'gitlab-org+gitlab-test', packageUsername: 'gitlab-org+gitlab-test',
recipe: 'package-8/1.0.0@gitlab-org+gitlab-test/stable', recipe: 'package-8/1.0.0@gitlab-org+gitlab-test/stable',
...@@ -179,6 +183,7 @@ export const packageDetailsQuery = (extendPackage) => ({ ...@@ -179,6 +183,7 @@ export const packageDetailsQuery = (extendPackage) => ({
...nugetMetadata(), ...nugetMetadata(),
}, },
project: { project: {
id: '1',
path: 'projectPath', path: 'projectPath',
}, },
tags: { tags: {
...@@ -270,6 +275,7 @@ export const packageDestroyFileMutationError = () => ({ ...@@ -270,6 +275,7 @@ export const packageDestroyFileMutationError = () => ({
export const packagesListQuery = ({ type = 'group', extend = {}, extendPagination = {} } = {}) => ({ export const packagesListQuery = ({ type = 'group', extend = {}, extendPagination = {} } = {}) => ({
data: { data: {
[type]: { [type]: {
id: '1',
packages: { packages: {
count: 2, count: 2,
nodes: [ nodes: [
......
...@@ -13,6 +13,7 @@ export const dependencyProxySettings = (extend) => ({ ...@@ -13,6 +13,7 @@ export const dependencyProxySettings = (extend) => ({
export const groupPackageSettingsMock = { export const groupPackageSettingsMock = {
data: { data: {
group: { group: {
id: '1',
fullPath: 'foo_group_path', fullPath: 'foo_group_path',
packageSettings: packageSettings(), packageSettings: packageSettings(),
dependencyProxySetting: dependencyProxySettings(), dependencyProxySetting: dependencyProxySettings(),
......
...@@ -11,6 +11,7 @@ export const containerExpirationPolicyData = () => ({ ...@@ -11,6 +11,7 @@ export const containerExpirationPolicyData = () => ({
export const expirationPolicyPayload = (override) => ({ export const expirationPolicyPayload = (override) => ({
data: { data: {
project: { project: {
id: '1',
containerExpirationPolicy: { containerExpirationPolicy: {
...containerExpirationPolicyData(), ...containerExpirationPolicyData(),
...override, ...override,
......
...@@ -136,7 +136,7 @@ describe('Pipeline Status', () => { ...@@ -136,7 +136,7 @@ describe('Pipeline Status', () => {
describe('when pipeline is null', () => { describe('when pipeline is null', () => {
beforeEach(() => { beforeEach(() => {
mockPipelineQuery.mockResolvedValue({ mockPipelineQuery.mockResolvedValue({
data: { project: { pipeline: null } }, data: { project: { id: '1', pipeline: null } },
}); });
createComponentWithApollo(); createComponentWithApollo();
......
...@@ -39,6 +39,7 @@ job_build: ...@@ -39,6 +39,7 @@ job_build:
export const mockCiTemplateQueryResponse = { export const mockCiTemplateQueryResponse = {
data: { data: {
project: { project: {
id: 'project-1',
ciTemplate: { ciTemplate: {
content: mockCiYml, content: mockCiYml,
}, },
...@@ -48,19 +49,22 @@ export const mockCiTemplateQueryResponse = { ...@@ -48,19 +49,22 @@ export const mockCiTemplateQueryResponse = {
export const mockBlobContentQueryResponse = { export const mockBlobContentQueryResponse = {
data: { data: {
project: { repository: { blobs: { nodes: [{ rawBlob: mockCiYml }] } } }, project: {
id: 'project-1',
repository: { blobs: { nodes: [{ id: 'blob-1', rawBlob: mockCiYml }] } },
},
}, },
}; };
export const mockBlobContentQueryResponseNoCiFile = { export const mockBlobContentQueryResponseNoCiFile = {
data: { data: {
project: { repository: { blobs: { nodes: [] } } }, project: { id: 'project-1', repository: { blobs: { nodes: [] } } },
}, },
}; };
export const mockBlobContentQueryResponseEmptyCiFile = { export const mockBlobContentQueryResponseEmptyCiFile = {
data: { data: {
project: { repository: { blobs: { nodes: [{ rawBlob: '' }] } } }, project: { id: 'project-1', repository: { blobs: { nodes: [{ rawBlob: '' }] } } },
}, },
}; };
...@@ -93,6 +97,7 @@ export const mockCiConfigQueryResponse = { ...@@ -93,6 +97,7 @@ export const mockCiConfigQueryResponse = {
groups: { groups: {
nodes: [ nodes: [
{ {
id: 'group-1',
name: 'job_test_1', name: 'job_test_1',
size: 1, size: 1,
jobs: { jobs: {
...@@ -108,6 +113,7 @@ export const mockCiConfigQueryResponse = { ...@@ -108,6 +113,7 @@ export const mockCiConfigQueryResponse = {
__typename: 'CiConfigGroup', __typename: 'CiConfigGroup',
}, },
{ {
id: 'group-2',
name: 'job_test_2', name: 'job_test_2',
size: 1, size: 1,
jobs: { jobs: {
...@@ -170,9 +176,11 @@ export const mergeUnwrappedCiConfig = (mergedConfig) => { ...@@ -170,9 +176,11 @@ export const mergeUnwrappedCiConfig = (mergedConfig) => {
export const mockCommitShaResults = { export const mockCommitShaResults = {
data: { data: {
project: { project: {
id: '1',
repository: { repository: {
tree: { tree: {
lastCommit: { lastCommit: {
id: 'commit-1',
sha: mockCommitSha, sha: mockCommitSha,
}, },
}, },
...@@ -184,9 +192,11 @@ export const mockCommitShaResults = { ...@@ -184,9 +192,11 @@ export const mockCommitShaResults = {
export const mockNewCommitShaResults = { export const mockNewCommitShaResults = {
data: { data: {
project: { project: {
id: '1',
repository: { repository: {
tree: { tree: {
lastCommit: { lastCommit: {
id: 'commit-1',
sha: 'eeff1122', sha: 'eeff1122',
}, },
}, },
...@@ -198,9 +208,11 @@ export const mockNewCommitShaResults = { ...@@ -198,9 +208,11 @@ export const mockNewCommitShaResults = {
export const mockEmptyCommitShaResults = { export const mockEmptyCommitShaResults = {
data: { data: {
project: { project: {
id: '1',
repository: { repository: {
tree: { tree: {
lastCommit: { lastCommit: {
id: 'commit-1',
sha: '', sha: '',
}, },
}, },
...@@ -212,6 +224,7 @@ export const mockEmptyCommitShaResults = { ...@@ -212,6 +224,7 @@ export const mockEmptyCommitShaResults = {
export const mockProjectBranches = { export const mockProjectBranches = {
data: { data: {
project: { project: {
id: '1',
repository: { repository: {
branchNames: [ branchNames: [
'main', 'main',
...@@ -236,6 +249,7 @@ export const mockTotalBranchResults = ...@@ -236,6 +249,7 @@ export const mockTotalBranchResults =
export const mockSearchBranches = { export const mockSearchBranches = {
data: { data: {
project: { project: {
id: '1',
repository: { repository: {
branchNames: ['test', 'better-feature', 'update-ci', 'test-merge-request'], branchNames: ['test', 'better-feature', 'update-ci', 'test-merge-request'],
}, },
...@@ -248,6 +262,7 @@ export const mockTotalSearchResults = mockSearchBranches.data.project.repository ...@@ -248,6 +262,7 @@ export const mockTotalSearchResults = mockSearchBranches.data.project.repository
export const mockEmptySearchBranches = { export const mockEmptySearchBranches = {
data: { data: {
project: { project: {
id: '1',
repository: { repository: {
branchNames: [], branchNames: [],
}, },
...@@ -284,16 +299,19 @@ export const mockProjectPipeline = ({ hasStages = true } = {}) => { ...@@ -284,16 +299,19 @@ export const mockProjectPipeline = ({ hasStages = true } = {}) => {
: null; : null;
return { return {
id: '1',
pipeline: { pipeline: {
id: 'gid://gitlab/Ci::Pipeline/118', id: 'gid://gitlab/Ci::Pipeline/118',
iid: '28', iid: '28',
shortSha: mockCommitSha, shortSha: mockCommitSha,
status: 'SUCCESS', status: 'SUCCESS',
commit: { commit: {
id: 'commit-1',
title: 'Update .gitlabe-ci.yml', title: 'Update .gitlabe-ci.yml',
webPath: '/-/commit/aabbccdd', webPath: '/-/commit/aabbccdd',
}, },
detailedStatus: { detailedStatus: {
id: 'status-1',
detailsPath: '/root/sample-ci-project/-/pipelines/118', detailsPath: '/root/sample-ci-project/-/pipelines/118',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -461,6 +479,7 @@ export const mockCommitCreateResponse = { ...@@ -461,6 +479,7 @@ export const mockCommitCreateResponse = {
errors: [], errors: [],
commit: { commit: {
__typename: 'Commit', __typename: 'Commit',
id: 'commit-1',
sha: mockCommitNextSha, sha: mockCommitNextSha,
}, },
commitPipelinePath: '', commitPipelinePath: '',
...@@ -475,6 +494,7 @@ export const mockCommitCreateResponseNewEtag = { ...@@ -475,6 +494,7 @@ export const mockCommitCreateResponseNewEtag = {
errors: [], errors: [],
commit: { commit: {
__typename: 'Commit', __typename: 'Commit',
id: 'commit-2',
sha: mockCommitNextSha, sha: mockCommitNextSha,
}, },
commitPipelinePath: '/api/graphql:pipelines/sha/550ceace1acd373c84d02bd539cb9d4614f786db', commitPipelinePath: '/api/graphql:pipelines/sha/550ceace1acd373c84d02bd539cb9d4614f786db',
......
...@@ -6,9 +6,11 @@ Array [ ...@@ -6,9 +6,11 @@ Array [
"groups": Array [ "groups": Array [
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "4",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "6",
"name": "build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl", "name": "build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl",
"needs": Array [], "needs": Array [],
"scheduledAt": null, "scheduledAt": null,
...@@ -18,6 +20,7 @@ Array [ ...@@ -18,6 +20,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "8",
"path": "/root/abcd-dag/-/jobs/1482/retry", "path": "/root/abcd-dag/-/jobs/1482/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -25,6 +28,7 @@ Array [ ...@@ -25,6 +28,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "7",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
...@@ -36,14 +40,17 @@ Array [ ...@@ -36,14 +40,17 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "5",
"label": "passed", "label": "passed",
}, },
}, },
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "9",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "11",
"name": "build_b", "name": "build_b",
"needs": Array [], "needs": Array [],
"scheduledAt": null, "scheduledAt": null,
...@@ -53,6 +60,7 @@ Array [ ...@@ -53,6 +60,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "13",
"path": "/root/abcd-dag/-/jobs/1515/retry", "path": "/root/abcd-dag/-/jobs/1515/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -60,6 +68,7 @@ Array [ ...@@ -60,6 +68,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "12",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
...@@ -71,14 +80,17 @@ Array [ ...@@ -71,14 +80,17 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "10",
"label": "passed", "label": "passed",
}, },
}, },
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "14",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "16",
"name": "build_c", "name": "build_c",
"needs": Array [], "needs": Array [],
"scheduledAt": null, "scheduledAt": null,
...@@ -88,6 +100,7 @@ Array [ ...@@ -88,6 +100,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "18",
"path": "/root/abcd-dag/-/jobs/1484/retry", "path": "/root/abcd-dag/-/jobs/1484/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -95,6 +108,7 @@ Array [ ...@@ -95,6 +108,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "17",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
...@@ -106,14 +120,17 @@ Array [ ...@@ -106,14 +120,17 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "15",
"label": "passed", "label": "passed",
}, },
}, },
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "19",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "21",
"name": "build_d 1/3", "name": "build_d 1/3",
"needs": Array [], "needs": Array [],
"scheduledAt": null, "scheduledAt": null,
...@@ -123,6 +140,7 @@ Array [ ...@@ -123,6 +140,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "23",
"path": "/root/abcd-dag/-/jobs/1485/retry", "path": "/root/abcd-dag/-/jobs/1485/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -130,11 +148,13 @@ Array [ ...@@ -130,11 +148,13 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "22",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "24",
"name": "build_d 2/3", "name": "build_d 2/3",
"needs": Array [], "needs": Array [],
"scheduledAt": null, "scheduledAt": null,
...@@ -144,6 +164,7 @@ Array [ ...@@ -144,6 +164,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "26",
"path": "/root/abcd-dag/-/jobs/1486/retry", "path": "/root/abcd-dag/-/jobs/1486/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -151,11 +172,13 @@ Array [ ...@@ -151,11 +172,13 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "25",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "27",
"name": "build_d 3/3", "name": "build_d 3/3",
"needs": Array [], "needs": Array [],
"scheduledAt": null, "scheduledAt": null,
...@@ -165,6 +188,7 @@ Array [ ...@@ -165,6 +188,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "29",
"path": "/root/abcd-dag/-/jobs/1487/retry", "path": "/root/abcd-dag/-/jobs/1487/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -172,6 +196,7 @@ Array [ ...@@ -172,6 +196,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "28",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
...@@ -183,14 +208,17 @@ Array [ ...@@ -183,14 +208,17 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "20",
"label": "passed", "label": "passed",
}, },
}, },
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "57",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "59",
"name": "test_c", "name": "test_c",
"needs": Array [], "needs": Array [],
"scheduledAt": null, "scheduledAt": null,
...@@ -201,6 +229,7 @@ Array [ ...@@ -201,6 +229,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "60",
"tooltip": null, "tooltip": null,
}, },
}, },
...@@ -212,6 +241,7 @@ Array [ ...@@ -212,6 +241,7 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "58",
"label": null, "label": null,
}, },
}, },
...@@ -226,9 +256,11 @@ Array [ ...@@ -226,9 +256,11 @@ Array [
"groups": Array [ "groups": Array [
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "32",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "34",
"name": "test_a", "name": "test_a",
"needs": Array [ "needs": Array [
"build_c", "build_c",
...@@ -242,6 +274,7 @@ Array [ ...@@ -242,6 +274,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "36",
"path": "/root/abcd-dag/-/jobs/1514/retry", "path": "/root/abcd-dag/-/jobs/1514/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -249,6 +282,7 @@ Array [ ...@@ -249,6 +282,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "35",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
...@@ -260,14 +294,17 @@ Array [ ...@@ -260,14 +294,17 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "33",
"label": "passed", "label": "passed",
}, },
}, },
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "40",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "42",
"name": "test_b 1/2", "name": "test_b 1/2",
"needs": Array [ "needs": Array [
"build_d 3/3", "build_d 3/3",
...@@ -283,6 +320,7 @@ Array [ ...@@ -283,6 +320,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "44",
"path": "/root/abcd-dag/-/jobs/1489/retry", "path": "/root/abcd-dag/-/jobs/1489/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -290,11 +328,13 @@ Array [ ...@@ -290,11 +328,13 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "43",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "67",
"name": "test_b 2/2", "name": "test_b 2/2",
"needs": Array [ "needs": Array [
"build_d 3/3", "build_d 3/3",
...@@ -310,6 +350,7 @@ Array [ ...@@ -310,6 +350,7 @@ Array [
"__typename": "StatusAction", "__typename": "StatusAction",
"buttonTitle": "Retry this job", "buttonTitle": "Retry this job",
"icon": "retry", "icon": "retry",
"id": "51",
"path": "/root/abcd-dag/-/jobs/1490/retry", "path": "/root/abcd-dag/-/jobs/1490/retry",
"title": "Retry", "title": "Retry",
}, },
...@@ -317,6 +358,7 @@ Array [ ...@@ -317,6 +358,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "50",
"tooltip": "passed", "tooltip": "passed",
}, },
}, },
...@@ -328,14 +370,17 @@ Array [ ...@@ -328,14 +370,17 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "41",
"label": "passed", "label": "passed",
}, },
}, },
Object { Object {
"__typename": "CiGroup", "__typename": "CiGroup",
"id": "61",
"jobs": Array [ "jobs": Array [
Object { Object {
"__typename": "CiJob", "__typename": "CiJob",
"id": "53",
"name": "test_d", "name": "test_d",
"needs": Array [ "needs": Array [
"build_b", "build_b",
...@@ -348,6 +393,7 @@ Array [ ...@@ -348,6 +393,7 @@ Array [
"group": "success", "group": "success",
"hasDetails": true, "hasDetails": true,
"icon": "status_success", "icon": "status_success",
"id": "64",
"tooltip": null, "tooltip": null,
}, },
}, },
...@@ -359,6 +405,7 @@ Array [ ...@@ -359,6 +405,7 @@ Array [
"__typename": "DetailedStatus", "__typename": "DetailedStatus",
"group": "success", "group": "success",
"icon": "status_success", "icon": "status_success",
"id": "62",
"label": null, "label": null,
}, },
}, },
......
...@@ -4,6 +4,7 @@ export const mockPipelineResponse = { ...@@ -4,6 +4,7 @@ export const mockPipelineResponse = {
data: { data: {
project: { project: {
__typename: 'Project', __typename: 'Project',
id: '1',
pipeline: { pipeline: {
__typename: 'Pipeline', __typename: 'Pipeline',
id: 163, id: 163,
...@@ -21,9 +22,11 @@ export const mockPipelineResponse = { ...@@ -21,9 +22,11 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiStage', __typename: 'CiStage',
id: '2',
name: 'build', name: 'build',
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '3',
action: null, action: null,
}, },
groups: { groups: {
...@@ -31,10 +34,12 @@ export const mockPipelineResponse = { ...@@ -31,10 +34,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
id: '4',
name: 'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl', name: 'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl',
size: 1, size: 1,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '5',
label: 'passed', label: 'passed',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -44,10 +49,12 @@ export const mockPipelineResponse = { ...@@ -44,10 +49,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '6',
name: 'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl', name: 'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '7',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -55,6 +62,7 @@ export const mockPipelineResponse = { ...@@ -55,6 +62,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '8',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1482/retry', path: '/root/abcd-dag/-/jobs/1482/retry',
...@@ -72,9 +80,11 @@ export const mockPipelineResponse = { ...@@ -72,9 +80,11 @@ export const mockPipelineResponse = {
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
name: 'build_b', name: 'build_b',
id: '9',
size: 1, size: 1,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '10',
label: 'passed', label: 'passed',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -84,10 +94,12 @@ export const mockPipelineResponse = { ...@@ -84,10 +94,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '11',
name: 'build_b', name: 'build_b',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '12',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -95,6 +107,7 @@ export const mockPipelineResponse = { ...@@ -95,6 +107,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '13',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1515/retry', path: '/root/abcd-dag/-/jobs/1515/retry',
...@@ -111,10 +124,12 @@ export const mockPipelineResponse = { ...@@ -111,10 +124,12 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
id: '14',
name: 'build_c', name: 'build_c',
size: 1, size: 1,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '15',
label: 'passed', label: 'passed',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -124,10 +139,12 @@ export const mockPipelineResponse = { ...@@ -124,10 +139,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '16',
name: 'build_c', name: 'build_c',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '17',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -135,6 +152,7 @@ export const mockPipelineResponse = { ...@@ -135,6 +152,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '18',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1484/retry', path: '/root/abcd-dag/-/jobs/1484/retry',
...@@ -151,10 +169,12 @@ export const mockPipelineResponse = { ...@@ -151,10 +169,12 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
id: '19',
name: 'build_d', name: 'build_d',
size: 3, size: 3,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '20',
label: 'passed', label: 'passed',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -164,10 +184,12 @@ export const mockPipelineResponse = { ...@@ -164,10 +184,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '21',
name: 'build_d 1/3', name: 'build_d 1/3',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '22',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -175,6 +197,7 @@ export const mockPipelineResponse = { ...@@ -175,6 +197,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '23',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1485/retry', path: '/root/abcd-dag/-/jobs/1485/retry',
...@@ -188,10 +211,12 @@ export const mockPipelineResponse = { ...@@ -188,10 +211,12 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '24',
name: 'build_d 2/3', name: 'build_d 2/3',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '25',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -199,6 +224,7 @@ export const mockPipelineResponse = { ...@@ -199,6 +224,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '26',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1486/retry', path: '/root/abcd-dag/-/jobs/1486/retry',
...@@ -212,10 +238,12 @@ export const mockPipelineResponse = { ...@@ -212,10 +238,12 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '27',
name: 'build_d 3/3', name: 'build_d 3/3',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '28',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -223,6 +251,7 @@ export const mockPipelineResponse = { ...@@ -223,6 +251,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '29',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1487/retry', path: '/root/abcd-dag/-/jobs/1487/retry',
...@@ -242,9 +271,11 @@ export const mockPipelineResponse = { ...@@ -242,9 +271,11 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiStage', __typename: 'CiStage',
id: '30',
name: 'test', name: 'test',
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '31',
action: null, action: null,
}, },
groups: { groups: {
...@@ -252,10 +283,12 @@ export const mockPipelineResponse = { ...@@ -252,10 +283,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
id: '32',
name: 'test_a', name: 'test_a',
size: 1, size: 1,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '33',
label: 'passed', label: 'passed',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -265,10 +298,12 @@ export const mockPipelineResponse = { ...@@ -265,10 +298,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '34',
name: 'test_a', name: 'test_a',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '35',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -276,6 +311,7 @@ export const mockPipelineResponse = { ...@@ -276,6 +311,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '36',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1514/retry', path: '/root/abcd-dag/-/jobs/1514/retry',
...@@ -287,14 +323,17 @@ export const mockPipelineResponse = { ...@@ -287,14 +323,17 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '37',
name: 'build_c', name: 'build_c',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '38',
name: 'build_b', name: 'build_b',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '39',
name: name:
'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl', 'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl',
}, },
...@@ -306,10 +345,12 @@ export const mockPipelineResponse = { ...@@ -306,10 +345,12 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
id: '40',
name: 'test_b', name: 'test_b',
size: 2, size: 2,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '41',
label: 'passed', label: 'passed',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -319,10 +360,12 @@ export const mockPipelineResponse = { ...@@ -319,10 +360,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '42',
name: 'test_b 1/2', name: 'test_b 1/2',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '43',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -330,6 +373,7 @@ export const mockPipelineResponse = { ...@@ -330,6 +373,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '44',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1489/retry', path: '/root/abcd-dag/-/jobs/1489/retry',
...@@ -341,22 +385,27 @@ export const mockPipelineResponse = { ...@@ -341,22 +385,27 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '45',
name: 'build_d 3/3', name: 'build_d 3/3',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '46',
name: 'build_d 2/3', name: 'build_d 2/3',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '47',
name: 'build_d 1/3', name: 'build_d 1/3',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '48',
name: 'build_b', name: 'build_b',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '49',
name: name:
'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl', 'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl',
}, },
...@@ -365,10 +414,12 @@ export const mockPipelineResponse = { ...@@ -365,10 +414,12 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '67',
name: 'test_b 2/2', name: 'test_b 2/2',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '50',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -376,6 +427,7 @@ export const mockPipelineResponse = { ...@@ -376,6 +427,7 @@ export const mockPipelineResponse = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '51',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/abcd-dag/-/jobs/1490/retry', path: '/root/abcd-dag/-/jobs/1490/retry',
...@@ -387,22 +439,27 @@ export const mockPipelineResponse = { ...@@ -387,22 +439,27 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '52',
name: 'build_d 3/3', name: 'build_d 3/3',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '53',
name: 'build_d 2/3', name: 'build_d 2/3',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '54',
name: 'build_d 1/3', name: 'build_d 1/3',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '55',
name: 'build_b', name: 'build_b',
}, },
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '56',
name: name:
'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl', 'build_a_nlfjkdnlvskfnksvjknlfdjvlvnjdkjdf_nvjkenjkrlngjeknjkl',
}, },
...@@ -415,9 +472,11 @@ export const mockPipelineResponse = { ...@@ -415,9 +472,11 @@ export const mockPipelineResponse = {
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
name: 'test_c', name: 'test_c',
id: '57',
size: 1, size: 1,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '58',
label: null, label: null,
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -427,10 +486,12 @@ export const mockPipelineResponse = { ...@@ -427,10 +486,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '59',
name: 'test_c', name: 'test_c',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '60',
icon: 'status_success', icon: 'status_success',
tooltip: null, tooltip: null,
hasDetails: true, hasDetails: true,
...@@ -448,9 +509,11 @@ export const mockPipelineResponse = { ...@@ -448,9 +509,11 @@ export const mockPipelineResponse = {
}, },
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
id: '61',
name: 'test_d', name: 'test_d',
size: 1, size: 1,
status: { status: {
id: '62',
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
label: null, label: null,
group: 'success', group: 'success',
...@@ -461,10 +524,12 @@ export const mockPipelineResponse = { ...@@ -461,10 +524,12 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '53',
name: 'test_d', name: 'test_d',
scheduledAt: null, scheduledAt: null,
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '64',
icon: 'status_success', icon: 'status_success',
tooltip: null, tooltip: null,
hasDetails: true, hasDetails: true,
...@@ -477,6 +542,7 @@ export const mockPipelineResponse = { ...@@ -477,6 +542,7 @@ export const mockPipelineResponse = {
nodes: [ nodes: [
{ {
__typename: 'CiBuildNeed', __typename: 'CiBuildNeed',
id: '65',
name: 'build_b', name: 'build_b',
}, },
], ],
...@@ -502,6 +568,7 @@ export const downstream = { ...@@ -502,6 +568,7 @@ export const downstream = {
iid: '31', iid: '31',
path: '/root/elemenohpee/-/pipelines/175', path: '/root/elemenohpee/-/pipelines/175',
status: { status: {
id: '70',
group: 'success', group: 'success',
label: 'passed', label: 'passed',
icon: 'status_success', icon: 'status_success',
...@@ -509,6 +576,7 @@ export const downstream = { ...@@ -509,6 +576,7 @@ export const downstream = {
}, },
sourceJob: { sourceJob: {
name: 'test_c', name: 'test_c',
id: '71',
__typename: 'CiJob', __typename: 'CiJob',
}, },
project: { project: {
...@@ -525,12 +593,14 @@ export const downstream = { ...@@ -525,12 +593,14 @@ export const downstream = {
iid: '27', iid: '27',
path: '/root/abcd-dag/-/pipelines/181', path: '/root/abcd-dag/-/pipelines/181',
status: { status: {
id: '72',
group: 'success', group: 'success',
label: 'passed', label: 'passed',
icon: 'status_success', icon: 'status_success',
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
}, },
sourceJob: { sourceJob: {
id: '73',
name: 'test_d', name: 'test_d',
__typename: 'CiJob', __typename: 'CiJob',
}, },
...@@ -551,6 +621,7 @@ export const upstream = { ...@@ -551,6 +621,7 @@ export const upstream = {
iid: '24', iid: '24',
path: '/root/abcd-dag/-/pipelines/161', path: '/root/abcd-dag/-/pipelines/161',
status: { status: {
id: '74',
group: 'success', group: 'success',
label: 'passed', label: 'passed',
icon: 'status_success', icon: 'status_success',
...@@ -571,6 +642,7 @@ export const wrappedPipelineReturn = { ...@@ -571,6 +642,7 @@ export const wrappedPipelineReturn = {
data: { data: {
project: { project: {
__typename: 'Project', __typename: 'Project',
id: '75',
pipeline: { pipeline: {
__typename: 'Pipeline', __typename: 'Pipeline',
id: 'gid://gitlab/Ci::Pipeline/175', id: 'gid://gitlab/Ci::Pipeline/175',
...@@ -592,12 +664,14 @@ export const wrappedPipelineReturn = { ...@@ -592,12 +664,14 @@ export const wrappedPipelineReturn = {
__typename: 'Pipeline', __typename: 'Pipeline',
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '77',
group: 'success', group: 'success',
label: 'passed', label: 'passed',
icon: 'status_success', icon: 'status_success',
}, },
sourceJob: { sourceJob: {
name: 'test_c', name: 'test_c',
id: '78',
__typename: 'CiJob', __typename: 'CiJob',
}, },
project: { project: {
...@@ -613,8 +687,10 @@ export const wrappedPipelineReturn = { ...@@ -613,8 +687,10 @@ export const wrappedPipelineReturn = {
{ {
name: 'build', name: 'build',
__typename: 'CiStage', __typename: 'CiStage',
id: '79',
status: { status: {
action: null, action: null,
id: '80',
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
}, },
groups: { groups: {
...@@ -622,8 +698,10 @@ export const wrappedPipelineReturn = { ...@@ -622,8 +698,10 @@ export const wrappedPipelineReturn = {
nodes: [ nodes: [
{ {
__typename: 'CiGroup', __typename: 'CiGroup',
id: '81',
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '82',
label: 'passed', label: 'passed',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
...@@ -635,6 +713,7 @@ export const wrappedPipelineReturn = { ...@@ -635,6 +713,7 @@ export const wrappedPipelineReturn = {
nodes: [ nodes: [
{ {
__typename: 'CiJob', __typename: 'CiJob',
id: '83',
name: 'build_n', name: 'build_n',
scheduledAt: null, scheduledAt: null,
needs: { needs: {
...@@ -643,6 +722,7 @@ export const wrappedPipelineReturn = { ...@@ -643,6 +722,7 @@ export const wrappedPipelineReturn = {
}, },
status: { status: {
__typename: 'DetailedStatus', __typename: 'DetailedStatus',
id: '84',
icon: 'status_success', icon: 'status_success',
tooltip: 'passed', tooltip: 'passed',
hasDetails: true, hasDetails: true,
...@@ -650,6 +730,7 @@ export const wrappedPipelineReturn = { ...@@ -650,6 +730,7 @@ export const wrappedPipelineReturn = {
group: 'success', group: 'success',
action: { action: {
__typename: 'StatusAction', __typename: 'StatusAction',
id: '85',
buttonTitle: 'Retry this job', buttonTitle: 'Retry this job',
icon: 'retry', icon: 'retry',
path: '/root/elemenohpee/-/jobs/1662/retry', path: '/root/elemenohpee/-/jobs/1662/retry',
......
...@@ -14,6 +14,7 @@ export const mockPipelineHeader = { ...@@ -14,6 +14,7 @@ export const mockPipelineHeader = {
}, },
createdAt: threeWeeksAgo.toISOString(), createdAt: threeWeeksAgo.toISOString(),
user: { user: {
id: 'user-1',
name: 'Foo', name: 'Foo',
username: 'foobar', username: 'foobar',
email: 'foo@bar.com', email: 'foo@bar.com',
...@@ -27,6 +28,7 @@ export const mockFailedPipelineHeader = { ...@@ -27,6 +28,7 @@ export const mockFailedPipelineHeader = {
retryable: true, retryable: true,
cancelable: false, cancelable: false,
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'failed', group: 'failed',
icon: 'status_failed', icon: 'status_failed',
label: 'failed', label: 'failed',
...@@ -43,6 +45,7 @@ export const mockFailedPipelineNoPermissions = { ...@@ -43,6 +45,7 @@ export const mockFailedPipelineNoPermissions = {
}, },
createdAt: threeWeeksAgo.toISOString(), createdAt: threeWeeksAgo.toISOString(),
user: { user: {
id: 'user-1',
name: 'Foo', name: 'Foo',
username: 'foobar', username: 'foobar',
email: 'foo@bar.com', email: 'foo@bar.com',
...@@ -52,6 +55,7 @@ export const mockFailedPipelineNoPermissions = { ...@@ -52,6 +55,7 @@ export const mockFailedPipelineNoPermissions = {
retryable: true, retryable: true,
cancelable: false, cancelable: false,
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'running', group: 'running',
icon: 'status_running', icon: 'status_running',
label: 'running', label: 'running',
...@@ -66,6 +70,7 @@ export const mockRunningPipelineHeader = { ...@@ -66,6 +70,7 @@ export const mockRunningPipelineHeader = {
retryable: false, retryable: false,
cancelable: true, cancelable: true,
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'running', group: 'running',
icon: 'status_running', icon: 'status_running',
label: 'running', label: 'running',
...@@ -82,6 +87,7 @@ export const mockRunningPipelineNoPermissions = { ...@@ -82,6 +87,7 @@ export const mockRunningPipelineNoPermissions = {
}, },
createdAt: threeWeeksAgo.toISOString(), createdAt: threeWeeksAgo.toISOString(),
user: { user: {
id: 'user-1',
name: 'Foo', name: 'Foo',
username: 'foobar', username: 'foobar',
email: 'foo@bar.com', email: 'foo@bar.com',
...@@ -91,6 +97,7 @@ export const mockRunningPipelineNoPermissions = { ...@@ -91,6 +97,7 @@ export const mockRunningPipelineNoPermissions = {
retryable: false, retryable: false,
cancelable: true, cancelable: true,
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'running', group: 'running',
icon: 'status_running', icon: 'status_running',
label: 'running', label: 'running',
...@@ -105,6 +112,7 @@ export const mockCancelledPipelineHeader = { ...@@ -105,6 +112,7 @@ export const mockCancelledPipelineHeader = {
retryable: true, retryable: true,
cancelable: false, cancelable: false,
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'cancelled', group: 'cancelled',
icon: 'status_cancelled', icon: 'status_cancelled',
label: 'cancelled', label: 'cancelled',
...@@ -119,6 +127,7 @@ export const mockSuccessfulPipelineHeader = { ...@@ -119,6 +127,7 @@ export const mockSuccessfulPipelineHeader = {
retryable: false, retryable: false,
cancelable: false, cancelable: false,
detailedStatus: { detailedStatus: {
id: 'status-1',
group: 'success', group: 'success',
icon: 'status_success', icon: 'status_success',
label: 'success', label: 'success',
...@@ -130,13 +139,16 @@ export const mockSuccessfulPipelineHeader = { ...@@ -130,13 +139,16 @@ export const mockSuccessfulPipelineHeader = {
export const mockRunningPipelineHeaderData = { export const mockRunningPipelineHeaderData = {
data: { data: {
project: { project: {
id: '1',
pipeline: { pipeline: {
...mockRunningPipelineHeader, ...mockRunningPipelineHeader,
iid: '28', iid: '28',
user: { user: {
id: 'user-1',
name: 'Foo', name: 'Foo',
username: 'foobar', username: 'foobar',
webPath: '/foo', webPath: '/foo',
webUrl: '/foo',
email: 'foo@bar.com', email: 'foo@bar.com',
avatarUrl: 'link', avatarUrl: 'link',
status: null, status: null,
......
...@@ -19,6 +19,7 @@ describe('NewProjectUrlSelect component', () => { ...@@ -19,6 +19,7 @@ describe('NewProjectUrlSelect component', () => {
const data = { const data = {
currentUser: { currentUser: {
id: 'user-1',
groups: { groups: {
nodes: [ nodes: [
{ {
...@@ -194,6 +195,7 @@ describe('NewProjectUrlSelect component', () => { ...@@ -194,6 +195,7 @@ describe('NewProjectUrlSelect component', () => {
it('renders `No matches found` when there are no matching dropdown items', async () => { it('renders `No matches found` when there are no matching dropdown items', async () => {
const queryResponse = { const queryResponse = {
currentUser: { currentUser: {
id: 'user-1',
groups: { groups: {
nodes: [], nodes: [],
}, },
......
...@@ -48,6 +48,7 @@ export const transformedAreaChartData = [ ...@@ -48,6 +48,7 @@ export const transformedAreaChartData = [
export const mockPipelineCount = { export const mockPipelineCount = {
data: { data: {
project: { project: {
id: '1',
totalPipelines: { count: 34, __typename: 'PipelineConnection' }, totalPipelines: { count: 34, __typename: 'PipelineConnection' },
successfulPipelines: { count: 23, __typename: 'PipelineConnection' }, successfulPipelines: { count: 23, __typename: 'PipelineConnection' },
failedPipelines: { count: 1, __typename: 'PipelineConnection' }, failedPipelines: { count: 1, __typename: 'PipelineConnection' },
...@@ -70,6 +71,7 @@ export const chartOptions = { ...@@ -70,6 +71,7 @@ export const chartOptions = {
export const mockPipelineStatistics = { export const mockPipelineStatistics = {
data: { data: {
project: { project: {
id: '1',
pipelineAnalytics: { pipelineAnalytics: {
weekPipelinesTotals: [0, 0, 0, 0, 0, 0, 0, 0], weekPipelinesTotals: [0, 0, 0, 0, 0, 0, 0, 0],
weekPipelinesLabels: [ weekPipelinesLabels: [
......
...@@ -44,6 +44,7 @@ Object { ...@@ -44,6 +44,7 @@ Object {
"author": Object { "author": Object {
"__typename": "UserCore", "__typename": "UserCore",
"avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon", "avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon",
"id": Any<String>,
"username": "administrator", "username": "administrator",
"webUrl": "http://localhost/administrator", "webUrl": "http://localhost/administrator",
}, },
...@@ -139,6 +140,7 @@ Object { ...@@ -139,6 +140,7 @@ Object {
"author": Object { "author": Object {
"__typename": "UserCore", "__typename": "UserCore",
"avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon", "avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon",
"id": Any<String>,
"username": "administrator", "username": "administrator",
"webUrl": "http://localhost/administrator", "webUrl": "http://localhost/administrator",
}, },
...@@ -153,6 +155,7 @@ Object { ...@@ -153,6 +155,7 @@ Object {
"__typename": "ReleaseEvidence", "__typename": "ReleaseEvidence",
"collectedAt": "2018-12-03T00:00:00Z", "collectedAt": "2018-12-03T00:00:00Z",
"filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json", "filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json",
"id": "gid://gitlab/Releases::Evidence/1",
"sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d", "sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
}, },
], ],
...@@ -247,6 +250,7 @@ Object { ...@@ -247,6 +250,7 @@ Object {
"evidences": Array [], "evidences": Array [],
"milestones": Array [ "milestones": Array [
Object { Object {
"id": "gid://gitlab/Milestone/123",
"issueStats": Object {}, "issueStats": Object {},
"stats": undefined, "stats": undefined,
"title": "12.3", "title": "12.3",
...@@ -254,6 +258,7 @@ Object { ...@@ -254,6 +258,7 @@ Object {
"webUrl": undefined, "webUrl": undefined,
}, },
Object { Object {
"id": "gid://gitlab/Milestone/124",
"issueStats": Object {}, "issueStats": Object {},
"stats": undefined, "stats": undefined,
"title": "12.4", "title": "12.4",
...@@ -347,6 +352,7 @@ Object { ...@@ -347,6 +352,7 @@ Object {
"author": Object { "author": Object {
"__typename": "UserCore", "__typename": "UserCore",
"avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon", "avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon",
"id": Any<String>,
"username": "administrator", "username": "administrator",
"webUrl": "http://localhost/administrator", "webUrl": "http://localhost/administrator",
}, },
...@@ -361,6 +367,7 @@ Object { ...@@ -361,6 +367,7 @@ Object {
"__typename": "ReleaseEvidence", "__typename": "ReleaseEvidence",
"collectedAt": "2018-12-03T00:00:00Z", "collectedAt": "2018-12-03T00:00:00Z",
"filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json", "filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json",
"id": "gid://gitlab/Releases::Evidence/1",
"sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d", "sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
}, },
], ],
......
...@@ -58,7 +58,6 @@ describe('Release show component', () => { ...@@ -58,7 +58,6 @@ describe('Release show component', () => {
const expectFlashWithMessage = (message) => { const expectFlashWithMessage = (message) => {
it(`shows a flash message that reads "${message}"`, () => { it(`shows a flash message that reads "${message}"`, () => {
expect(createFlash).toHaveBeenCalledTimes(1);
expect(createFlash).toHaveBeenCalledWith({ expect(createFlash).toHaveBeenCalledWith({
message, message,
captureError: true, captureError: true,
......
...@@ -104,13 +104,32 @@ describe('releases/util.js', () => { ...@@ -104,13 +104,32 @@ describe('releases/util.js', () => {
describe('convertAllReleasesGraphQLResponse', () => { describe('convertAllReleasesGraphQLResponse', () => {
it('matches snapshot', () => { it('matches snapshot', () => {
expect(convertAllReleasesGraphQLResponse(originalAllReleasesQueryResponse)).toMatchSnapshot(); expect(convertAllReleasesGraphQLResponse(originalAllReleasesQueryResponse)).toMatchSnapshot({
data: [
{
author: {
id: expect.any(String),
},
},
{
author: {
id: expect.any(String),
},
},
],
});
}); });
}); });
describe('convertOneReleaseGraphQLResponse', () => { describe('convertOneReleaseGraphQLResponse', () => {
it('matches snapshot', () => { it('matches snapshot', () => {
expect(convertOneReleaseGraphQLResponse(originalOneReleaseQueryResponse)).toMatchSnapshot(); expect(convertOneReleaseGraphQLResponse(originalOneReleaseQueryResponse)).toMatchSnapshot({
data: {
author: {
id: expect.any(String),
},
},
});
}); });
}); });
......
export const simpleViewerMock = { export const simpleViewerMock = {
id: '1',
name: 'some_file.js', name: 'some_file.js',
size: 123, size: 123,
rawSize: 123, rawSize: 123,
......
...@@ -11,11 +11,13 @@ export const getIssueTimelogsQueryResponse = { ...@@ -11,11 +11,13 @@ export const getIssueTimelogsQueryResponse = {
__typename: 'Timelog', __typename: 'Timelog',
timeSpent: 14400, timeSpent: 14400,
user: { user: {
id: 'user-1',
name: 'John Doe18', name: 'John Doe18',
__typename: 'UserCore', __typename: 'UserCore',
}, },
spentAt: '2020-05-01T00:00:00Z', spentAt: '2020-05-01T00:00:00Z',
note: { note: {
id: 'note-1',
body: 'A note', body: 'A note',
__typename: 'Note', __typename: 'Note',
}, },
...@@ -25,6 +27,7 @@ export const getIssueTimelogsQueryResponse = { ...@@ -25,6 +27,7 @@ export const getIssueTimelogsQueryResponse = {
__typename: 'Timelog', __typename: 'Timelog',
timeSpent: 1800, timeSpent: 1800,
user: { user: {
id: 'user-2',
name: 'Administrator', name: 'Administrator',
__typename: 'UserCore', __typename: 'UserCore',
}, },
...@@ -36,11 +39,13 @@ export const getIssueTimelogsQueryResponse = { ...@@ -36,11 +39,13 @@ export const getIssueTimelogsQueryResponse = {
__typename: 'Timelog', __typename: 'Timelog',
timeSpent: 14400, timeSpent: 14400,
user: { user: {
id: 'user-2',
name: 'Administrator', name: 'Administrator',
__typename: 'UserCore', __typename: 'UserCore',
}, },
spentAt: '2021-05-01T00:00:00Z', spentAt: '2021-05-01T00:00:00Z',
note: { note: {
id: 'note-2',
body: 'A note', body: 'A note',
__typename: 'Note', __typename: 'Note',
}, },
...@@ -65,11 +70,13 @@ export const getMrTimelogsQueryResponse = { ...@@ -65,11 +70,13 @@ export const getMrTimelogsQueryResponse = {
__typename: 'Timelog', __typename: 'Timelog',
timeSpent: 1800, timeSpent: 1800,
user: { user: {
id: 'user-1',
name: 'Administrator', name: 'Administrator',
__typename: 'UserCore', __typename: 'UserCore',
}, },
spentAt: '2021-05-07T14:44:55Z', spentAt: '2021-05-07T14:44:55Z',
note: { note: {
id: 'note-1',
body: 'Thirty minutes!', body: 'Thirty minutes!',
__typename: 'Note', __typename: 'Note',
}, },
...@@ -79,6 +86,7 @@ export const getMrTimelogsQueryResponse = { ...@@ -79,6 +86,7 @@ export const getMrTimelogsQueryResponse = {
__typename: 'Timelog', __typename: 'Timelog',
timeSpent: 3600, timeSpent: 3600,
user: { user: {
id: 'user-1',
name: 'Administrator', name: 'Administrator',
__typename: 'UserCore', __typename: 'UserCore',
}, },
...@@ -90,11 +98,13 @@ export const getMrTimelogsQueryResponse = { ...@@ -90,11 +98,13 @@ export const getMrTimelogsQueryResponse = {
__typename: 'Timelog', __typename: 'Timelog',
timeSpent: 300, timeSpent: 300,
user: { user: {
id: 'user-1',
name: 'Administrator', name: 'Administrator',
__typename: 'UserCore', __typename: 'UserCore',
}, },
spentAt: '2021-03-10T00:00:00Z', spentAt: '2021-03-10T00:00:00Z',
note: { note: {
id: 'note-2',
body: 'A note with some time', body: 'A note with some time',
__typename: 'Note', __typename: 'Note',
}, },
......
...@@ -223,6 +223,7 @@ const mockData = { ...@@ -223,6 +223,7 @@ const mockData = {
export const issueConfidentialityResponse = (confidential = false) => ({ export const issueConfidentialityResponse = (confidential = false) => ({
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Project', __typename: 'Project',
issuable: { issuable: {
__typename: 'Issue', __typename: 'Issue',
...@@ -236,6 +237,7 @@ export const issueConfidentialityResponse = (confidential = false) => ({ ...@@ -236,6 +237,7 @@ export const issueConfidentialityResponse = (confidential = false) => ({
export const issuableDueDateResponse = (dueDate = null) => ({ export const issuableDueDateResponse = (dueDate = null) => ({
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Project', __typename: 'Project',
issuable: { issuable: {
__typename: 'Issue', __typename: 'Issue',
...@@ -249,6 +251,7 @@ export const issuableDueDateResponse = (dueDate = null) => ({ ...@@ -249,6 +251,7 @@ export const issuableDueDateResponse = (dueDate = null) => ({
export const issuableStartDateResponse = (startDate = null) => ({ export const issuableStartDateResponse = (startDate = null) => ({
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Group', __typename: 'Group',
issuable: { issuable: {
__typename: 'Epic', __typename: 'Epic',
...@@ -265,6 +268,7 @@ export const issuableStartDateResponse = (startDate = null) => ({ ...@@ -265,6 +268,7 @@ export const issuableStartDateResponse = (startDate = null) => ({
export const epicParticipantsResponse = () => ({ export const epicParticipantsResponse = () => ({
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Group', __typename: 'Group',
issuable: { issuable: {
__typename: 'Epic', __typename: 'Epic',
...@@ -290,6 +294,7 @@ export const epicParticipantsResponse = () => ({ ...@@ -290,6 +294,7 @@ export const epicParticipantsResponse = () => ({
export const issueReferenceResponse = (reference) => ({ export const issueReferenceResponse = (reference) => ({
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Project', __typename: 'Project',
issuable: { issuable: {
__typename: 'Issue', __typename: 'Issue',
...@@ -303,6 +308,7 @@ export const issueReferenceResponse = (reference) => ({ ...@@ -303,6 +308,7 @@ export const issueReferenceResponse = (reference) => ({
export const issueSubscriptionsResponse = (subscribed = false, emailsDisabled = false) => ({ export const issueSubscriptionsResponse = (subscribed = false, emailsDisabled = false) => ({
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Project', __typename: 'Project',
issuable: { issuable: {
__typename: 'Issue', __typename: 'Issue',
...@@ -318,6 +324,7 @@ export const issuableQueryResponse = { ...@@ -318,6 +324,7 @@ export const issuableQueryResponse = {
data: { data: {
workspace: { workspace: {
__typename: 'Project', __typename: 'Project',
id: '1',
issuable: { issuable: {
__typename: 'Issue', __typename: 'Issue',
id: 'gid://gitlab/Issue/1', id: 'gid://gitlab/Issue/1',
...@@ -344,6 +351,7 @@ export const searchQueryResponse = { ...@@ -344,6 +351,7 @@ export const searchQueryResponse = {
data: { data: {
workspace: { workspace: {
__typename: 'Project', __typename: 'Project',
id: '1',
users: { users: {
nodes: [ nodes: [
{ {
...@@ -428,12 +436,15 @@ export const searchResponse = { ...@@ -428,12 +436,15 @@ export const searchResponse = {
data: { data: {
workspace: { workspace: {
__typename: 'Project', __typename: 'Project',
id: '1',
users: { users: {
nodes: [ nodes: [
{ {
id: 'gid://gitlab/User/1',
user: mockUser1, user: mockUser1,
}, },
{ {
id: 'gid://gitlab/User/4',
user: mockUser2, user: mockUser2,
}, },
], ],
...@@ -445,6 +456,7 @@ export const searchResponse = { ...@@ -445,6 +456,7 @@ export const searchResponse = {
export const projectMembersResponse = { export const projectMembersResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Project', __typename: 'Project',
users: { users: {
nodes: [ nodes: [
...@@ -452,10 +464,11 @@ export const projectMembersResponse = { ...@@ -452,10 +464,11 @@ export const projectMembersResponse = {
null, null,
null, null,
// Remove duplicated entry https://gitlab.com/gitlab-org/gitlab/-/issues/327822 // Remove duplicated entry https://gitlab.com/gitlab-org/gitlab/-/issues/327822
{ user: mockUser1 }, { id: 'user-1', user: mockUser1 },
{ user: mockUser1 }, { id: 'user-2', user: mockUser1 },
{ user: mockUser2 }, { id: 'user-3', user: mockUser2 },
{ {
id: 'user-4',
user: { user: {
id: 'gid://gitlab/User/2', id: 'gid://gitlab/User/2',
avatarUrl: avatarUrl:
...@@ -477,16 +490,18 @@ export const projectMembersResponse = { ...@@ -477,16 +490,18 @@ export const projectMembersResponse = {
export const groupMembersResponse = { export const groupMembersResponse = {
data: { data: {
workspace: { workspace: {
__typename: 'roup', id: '1',
__typename: 'Group',
users: { users: {
nodes: [ nodes: [
// Remove nulls https://gitlab.com/gitlab-org/gitlab/-/issues/329750 // Remove nulls https://gitlab.com/gitlab-org/gitlab/-/issues/329750
null, null,
null, null,
// Remove duplicated entry https://gitlab.com/gitlab-org/gitlab/-/issues/327822 // Remove duplicated entry https://gitlab.com/gitlab-org/gitlab/-/issues/327822
{ user: mockUser1 }, { id: 'user-1', user: mockUser1 },
{ user: mockUser1 }, { id: 'user-2', user: mockUser1 },
{ {
id: 'user-3',
user: { user: {
id: 'gid://gitlab/User/2', id: 'gid://gitlab/User/2',
avatarUrl: avatarUrl:
...@@ -509,6 +524,7 @@ export const participantsQueryResponse = { ...@@ -509,6 +524,7 @@ export const participantsQueryResponse = {
data: { data: {
workspace: { workspace: {
__typename: 'Project', __typename: 'Project',
id: '1',
issuable: { issuable: {
__typename: 'Issue', __typename: 'Issue',
id: 'gid://gitlab/Issue/1', id: 'gid://gitlab/Issue/1',
...@@ -578,6 +594,7 @@ export const mockMilestone2 = { ...@@ -578,6 +594,7 @@ export const mockMilestone2 = {
export const mockProjectMilestonesResponse = { export const mockProjectMilestonesResponse = {
data: { data: {
workspace: { workspace: {
id: 'gid://gitlab/Project/1',
attributes: { attributes: {
nodes: [mockMilestone1, mockMilestone2], nodes: [mockMilestone1, mockMilestone2],
}, },
...@@ -663,6 +680,7 @@ export const todosResponse = { ...@@ -663,6 +680,7 @@ export const todosResponse = {
data: { data: {
workspace: { workspace: {
__typename: 'Group', __typename: 'Group',
id: '1',
issuable: { issuable: {
__typename: 'Epic', __typename: 'Epic',
id: 'gid://gitlab/Epic/4', id: 'gid://gitlab/Epic/4',
...@@ -681,6 +699,7 @@ export const todosResponse = { ...@@ -681,6 +699,7 @@ export const todosResponse = {
export const noTodosResponse = { export const noTodosResponse = {
data: { data: {
workspace: { workspace: {
id: '1',
__typename: 'Group', __typename: 'Group',
issuable: { issuable: {
__typename: 'Epic', __typename: 'Epic',
......
...@@ -53,6 +53,7 @@ const createMutationResponse = (key, obj = {}) => ({ ...@@ -53,6 +53,7 @@ const createMutationResponse = (key, obj = {}) => ({
errors: [], errors: [],
snippet: { snippet: {
__typename: 'Snippet', __typename: 'Snippet',
id: 1,
webUrl: TEST_WEB_URL, webUrl: TEST_WEB_URL,
}, },
}, },
......
...@@ -27,6 +27,7 @@ export const createGQLSnippet = () => ({ ...@@ -27,6 +27,7 @@ export const createGQLSnippet = () => ({
}, },
project: { project: {
__typename: 'Project', __typename: 'Project',
id: 'project-1',
fullPath: 'group/project', fullPath: 'group/project',
webUrl: `${TEST_HOST}/group/project`, webUrl: `${TEST_HOST}/group/project`,
}, },
......
...@@ -23,6 +23,7 @@ describe('TerraformList', () => { ...@@ -23,6 +23,7 @@ describe('TerraformList', () => {
const apolloQueryResponse = { const apolloQueryResponse = {
data: { data: {
project: { project: {
id: '1',
terraformStates, terraformStates,
}, },
}, },
......
export const enabledJobTokenScope = { export const enabledJobTokenScope = {
data: { data: {
project: { project: {
id: '1',
ciCdSettings: { ciCdSettings: {
jobTokenScopeEnabled: true, jobTokenScopeEnabled: true,
__typename: 'ProjectCiCdSetting', __typename: 'ProjectCiCdSetting',
...@@ -13,6 +14,7 @@ export const enabledJobTokenScope = { ...@@ -13,6 +14,7 @@ export const enabledJobTokenScope = {
export const disabledJobTokenScope = { export const disabledJobTokenScope = {
data: { data: {
project: { project: {
id: '1',
ciCdSettings: { ciCdSettings: {
jobTokenScopeEnabled: false, jobTokenScopeEnabled: false,
__typename: 'ProjectCiCdSetting', __typename: 'ProjectCiCdSetting',
...@@ -39,12 +41,14 @@ export const projectsWithScope = { ...@@ -39,12 +41,14 @@ export const projectsWithScope = {
data: { data: {
project: { project: {
__typename: 'Project', __typename: 'Project',
id: '1',
ciJobTokenScope: { ciJobTokenScope: {
__typename: 'CiJobTokenScopeType', __typename: 'CiJobTokenScopeType',
projects: { projects: {
__typename: 'ProjectConnection', __typename: 'ProjectConnection',
nodes: [ nodes: [
{ {
id: '2',
fullPath: 'root/332268-test', fullPath: 'root/332268-test',
name: 'root/332268-test', name: 'root/332268-test',
}, },
...@@ -75,10 +79,17 @@ export const removeProjectSuccess = { ...@@ -75,10 +79,17 @@ export const removeProjectSuccess = {
export const mockProjects = [ export const mockProjects = [
{ {
id: '1',
name: 'merge-train-stuff', name: 'merge-train-stuff',
fullPath: 'root/merge-train-stuff', fullPath: 'root/merge-train-stuff',
isLocked: false, isLocked: false,
__typename: 'Project', __typename: 'Project',
}, },
{ name: 'ci-project', fullPath: 'root/ci-project', isLocked: true, __typename: 'Project' }, {
id: '2',
name: 'ci-project',
fullPath: 'root/ci-project',
isLocked: true,
__typename: 'Project',
},
]; ];
...@@ -118,6 +118,7 @@ export const workspaceLabelsQueryResponse = { ...@@ -118,6 +118,7 @@ export const workspaceLabelsQueryResponse = {
export const issuableLabelsQueryResponse = { export const issuableLabelsQueryResponse = {
data: { data: {
workspace: { workspace: {
id: 'workspace-1',
issuable: { issuable: {
id: '1', id: '1',
labels: { labels: {
......
...@@ -341,12 +341,15 @@ export const securityReportMergeRequestDownloadPathsQueryNoArtifactsResponse = { ...@@ -341,12 +341,15 @@ export const securityReportMergeRequestDownloadPathsQueryNoArtifactsResponse = {
export const securityReportMergeRequestDownloadPathsQueryResponse = { export const securityReportMergeRequestDownloadPathsQueryResponse = {
project: { project: {
id: '1',
mergeRequest: { mergeRequest: {
id: 'mr-1',
headPipeline: { headPipeline: {
id: 'gid://gitlab/Ci::Pipeline/176', id: 'gid://gitlab/Ci::Pipeline/176',
jobs: { jobs: {
nodes: [ nodes: [
{ {
id: 'job-1',
name: 'secret_detection', name: 'secret_detection',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -368,6 +371,7 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = { ...@@ -368,6 +371,7 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = {
__typename: 'CiJob', __typename: 'CiJob',
}, },
{ {
id: 'job-2',
name: 'bandit-sast', name: 'bandit-sast',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -389,6 +393,7 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = { ...@@ -389,6 +393,7 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = {
__typename: 'CiJob', __typename: 'CiJob',
}, },
{ {
id: 'job-3',
name: 'eslint-sast', name: 'eslint-sast',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -410,6 +415,7 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = { ...@@ -410,6 +415,7 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = {
__typename: 'CiJob', __typename: 'CiJob',
}, },
{ {
id: 'job-4',
name: 'all_artifacts', name: 'all_artifacts',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -449,11 +455,13 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = { ...@@ -449,11 +455,13 @@ export const securityReportMergeRequestDownloadPathsQueryResponse = {
export const securityReportPipelineDownloadPathsQueryResponse = { export const securityReportPipelineDownloadPathsQueryResponse = {
project: { project: {
id: 'project-1',
pipeline: { pipeline: {
id: 'gid://gitlab/Ci::Pipeline/176', id: 'gid://gitlab/Ci::Pipeline/176',
jobs: { jobs: {
nodes: [ nodes: [
{ {
id: 'job-1',
name: 'secret_detection', name: 'secret_detection',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -475,6 +483,7 @@ export const securityReportPipelineDownloadPathsQueryResponse = { ...@@ -475,6 +483,7 @@ export const securityReportPipelineDownloadPathsQueryResponse = {
__typename: 'CiJob', __typename: 'CiJob',
}, },
{ {
id: 'job-2',
name: 'bandit-sast', name: 'bandit-sast',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -496,6 +505,7 @@ export const securityReportPipelineDownloadPathsQueryResponse = { ...@@ -496,6 +505,7 @@ export const securityReportPipelineDownloadPathsQueryResponse = {
__typename: 'CiJob', __typename: 'CiJob',
}, },
{ {
id: 'job-3',
name: 'eslint-sast', name: 'eslint-sast',
artifacts: { artifacts: {
nodes: [ nodes: [
...@@ -517,6 +527,7 @@ export const securityReportPipelineDownloadPathsQueryResponse = { ...@@ -517,6 +527,7 @@ export const securityReportPipelineDownloadPathsQueryResponse = {
__typename: 'CiJob', __typename: 'CiJob',
}, },
{ {
id: 'job-4',
name: 'all_artifacts', name: 'all_artifacts',
artifacts: { artifacts: {
nodes: [ nodes: [
......
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