forked from pubkey/rxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared.js
54 lines (49 loc) · 1.38 KB
/
shared.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
export const GRAPHQL_PORT = 10102;
export const GRAPHQL_PATH = '/graphql';
export const GRAPHQL_SUBSCRIPTION_PORT = 10103;
export const GRAPHQL_SUBSCRIPTION_PATH = '/subscriptions';
/**
* to demonstrate how auth would work,
* we use these jwt tokens
*/
export const JWT_PRIVATE_KEY = 'qwertyuiopasdfghjklzxcvbnm123456'; // H256
export const JWT_BEARER_TOKEN = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJyeGRiIiwiaWF0IjoxNjA0MTg4Njk3LCJ' +
'leHAiOjIyNjY4NzY2OTcsImF1ZCI6InJ4ZGIuaW5mbyIsInN1YiI6InVzZXJAcnhkYi5pbmZvIn0.hNEC3V4LpkEvGnLeT8hNTXTCZRPpMVDwaltH-8zh4Iw';
export const heroSchema = {
version: 0,
primaryKey: 'id',
type: 'object',
properties: {
id: {
type: 'string',
maxLength: 100
},
name: {
type: 'string',
maxLength: 100
},
color: {
type: 'string',
maxLength: 30
},
updatedAt: {
type: 'number',
minimum: 0,
maximum: 1000000000000000,
multipleOf: 1
}
},
indexes: ['name', 'color', 'updatedAt'],
required: ['id', 'color', 'updatedAt']
};
export const graphQLGenerationInput = {
hero: {
schema: heroSchema,
checkpointFields: [
'id',
'updatedAt'
],
deletedField: 'deleted',
headerFields: ['Authorization']
}
};