forked from ChristianEdwardPadilla/ReacType
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mockData.js
94 lines (87 loc) · 1.94 KB
/
mockData.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
module.exports = {
user: {
username: 'reactype123',
email: '[email protected]',
password: 'Reactype123!@#',
userId: '604a552e9167c02198895823',
},
state: {
name: 'test',
isLoggedIn: false,
components: [
{
id: 1,
name: 'index',
style: {},
code: '<div>Drag in a component or HTML element into the canvas!</div>',
children: [],
},
],
projectType: 'Next.js',
rootComponents: [1],
canvasFocus: { componentId: 1, childId: null },
nextComponentId: 2,
nextChildId: 1,
},
projectToSave: {
name: 'super test project',
userId: '60469fc6c435891422b3a84c',
username: 'test',
project: {
name: 'test',
isLoggedIn: false,
components: [
{
id: 1,
name: 'index',
style: {},
code: '<div>Drag in a component or HTML element into the canvas!</div>',
children: [],
},
],
projectType: 'Next.js',
rootComponents: [1],
canvasFocus: { componentId: 1, childId: null },
nextComponentId: 2,
nextChildId: 1,
},
},
GET_PROJECTS: `query GetAllProjects($userId: ID) {
getAllProjects(userId: $userId) {
name
likes
id
userId
username
published
}
}`,
ADD_LIKE: `mutation AddLike($projId: ID!, $likes: Int!) {
addLike(projId: $projId, likes: $likes)
{
id
likes
}
}`,
PUBLISH_PROJECT: `mutation Publish($projId: ID!, $published: Boolean!) {
publishProject(projId: $projId, published: $published)
{
id
published
}
}`,
MAKE_COPY: `mutation MakeCopy ($userId: ID!, $projId: ID!, $username: String!) {
makeCopy(userId: $userId, projId: $projId, username: $username)
{
id
userId
username
}
}`,
DELETE_PROJECT: `mutation DeleteProject($projId: ID!) {
deleteProject(projId: $projId)
{
id
}
}`,
};