forked from open-source-labs/ReacType
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mockData.ts
118 lines (110 loc) · 2.71 KB
/
mockData.ts
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
106
107
108
109
110
111
112
113
114
115
116
117
118
import HTMLTypes from './app/src/redux/HTMLTypes';
const mockObj = {
//these user credentials were created via the signup page
//once connecting to new mongo cluster, you must create new login credentials to test
user: {
username: 'test',
email: '[email protected]',
password: 'password1!',
userId: '664247b09df40d692fb7fdef'
},
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,
nextTopSeparatorId: 1000,
HTMLTypes: HTMLTypes, // left as is for now
tailwind: false,
stylesheet: '',
codePreview: false
},
projectToSave: {
name: 'super test project',
forked: false,
likes: 0,
published: false,
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,
nextTopSeparatorId: 1000,
HTMLTypes: HTMLTypes, // left as is for now
tailwind: false,
stylesheet: '',
codePreview: false
},
userId: {
$oid: '664247b09df40d692fb7fdef'
},
username: 'test',
createdAt: Date.now(),
isLoggedIn: false,
comments: []
},
//The following is for graphQL
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
}
}`
};
export default mockObj;