-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.js
35 lines (35 loc) · 1015 Bytes
/
constants.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
module.exports = {
apiUrl: 'https://heroku-node-express-mugan86.herokuapp.com/graphql',
queries: {
authorInfo: '{ author(id: "88d6bec2") { id name email} }',
postsList: '{ posts { id title content author { name }} }',
postOne: '{ post(id: 1) { id title content author { name }} }',
getPostDinamically: `query queryValue ($id: Int!) {
post(id: $id) { id title content author { name }}
}`
},
mutations: {
addComment: `mutation {
addComment(comment: {
name: "Hola",
content: "Bien!",
postId: 1
}) {
id
name
content
}
}`,
addPost : `mutation {
addPost(post: {
title: "Prueba Fetch",
content: "Esperemos que salga bien!",
author: "88d6bec2",
url: ""
}) {
id
content
}
}`
}
}