1 | const notifyComment = ({commentId}) => { |
2 | return { |
3 | version: "2018-05-29", |
4 | method: "POST", |
5 | params: { |
6 | query: {}, |
7 | headers: { |
8 | "Content-Type" : "application/json" |
9 | }, |
10 | body: JSON.stringify({ |
11 | query: `mutation notifyComment($commentId: ID!) { |
12 | notifyComment(commentId: $commentId) { |
13 | postUserId |
14 | postDate |
15 | comment { |
16 | id |
17 | text |
18 | date |
19 | author { |
20 | id |
21 | } |
22 | post { |
23 | id |
24 | } |
25 | } |
26 | } |
27 | }`, |
28 | operationName: "notifyComment", |
29 | variables: { |
30 | commentId, |
31 | } |
32 | }) |
33 | }, |
34 | resourcePath: "/graphql" |
35 | }; |
36 | }; |
37 | |
38 | |
39 |