-
Notifications
You must be signed in to change notification settings - Fork 0
/
mutations.js
58 lines (57 loc) · 1.2 KB
/
mutations.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
import gql from 'graphql-tag';
import { queryPartials } from 'queries';
export default {
requestForUrl: gql`
mutation request_for_url($url: String!, $feedId: Int!) {
requestForUrl(input: {url: $url, feedId: $feedId}) {
request {
${queryPartials.fullRequest}
}
errors
}
}
`,
destroyRequest: gql`
mutation destroy_request($id: Int!) {
destroyRequest(input: {id: $id}) {
errors
}
}
`,
updateRequest: gql`
mutation update_request($id: Int!, $feedId: Int) {
updateRequest(input: {id: $id, feedId: $feedId}) {
request {
${queryPartials.fullRequest}
}
errors
}
}
`,
createFeed: gql`
mutation create_feed($name: String!) {
createFeed(input: {name: $name}) {
feed {
${queryPartials.fullFeed}
}
errors
}
}
`,
orderFeeds: gql`
mutation order_feed($feedIds: [Int!]) {
orderFeeds(input: {feedIds: $feedIds}) {
feeds {
${queryPartials.fullFeed}
}
}
}
`,
destroyFeed: gql`
mutation destroy_feed($id: Int!) {
destroyFeed(input: {id: $id}) {
errors
}
}
`,
};