-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathqueries.js
105 lines (99 loc) · 2.25 KB
/
queries.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import { gql } from '@apollo/client';
import { AT_VERSION_FIELDS } from '@components/common/fragments';
export const ADD_AT_VERSION_MUTATION = gql`
${AT_VERSION_FIELDS}
mutation AddAtVersion($atId: ID!, $name: String!, $releasedAt: Timestamp!) {
at(id: $atId) {
findOrCreateAtVersion(input: { name: $name, releasedAt: $releasedAt }) {
...AtVersionFields
}
}
}
`;
export const EDIT_AT_VERSION_MUTATION = gql`
${AT_VERSION_FIELDS}
mutation EditAtVersion(
$atVersionId: ID!
$name: String!
$releasedAt: Timestamp!
) {
atVersion(id: $atVersionId) {
updateAtVersion(input: { name: $name, releasedAt: $releasedAt }) {
...AtVersionFields
}
}
}
`;
export const DELETE_AT_VERSION_MUTATION = gql`
mutation DeleteAtVersion($atVersionId: ID!) {
atVersion(id: $atVersionId) {
deleteAtVersion {
isDeleted
failedDueToTestResults {
testPlanVersion {
id
title
}
testResult {
id
}
testPlanReport {
at {
name
}
browser {
name
}
}
}
}
}
}
`;
export const CREATE_REQUIRED_REPORT_MUTATION = gql`
mutation CreateRequiredReport(
$atId: ID!
$browserId: ID!
$phase: TestPlanVersionPhase!
) {
requiredReport(atId: $atId, browserId: $browserId, phase: $phase) {
createRequiredReport {
atId
browserId
phase
}
}
}
`;
export const UPDATE_REQUIRED_REPORT_MUTATION = gql`
mutation UpdateRequiredReport(
$atId: ID!
$browserId: ID!
$phase: TestPlanVersionPhase!
$updateAtId: ID!
$updateBrowserId: ID!
) {
requiredReport(atId: $atId, browserId: $browserId, phase: $phase) {
updateRequiredReport(atId: $updateAtId, browserId: $updateBrowserId) {
atId
browserId
phase
}
}
}
`;
export const DELETE_REQUIRED_REPORT_MUTATION = gql`
mutation DeleteRequiredReport(
$atId: ID!
$browserId: ID!
$phase: TestPlanVersionPhase!
) {
requiredReport(atId: $atId, browserId: $browserId, phase: $phase) {
deleteRequiredReport {
atId
browserId
phase
}
}
}
`;