-
Notifications
You must be signed in to change notification settings - Fork 0
/
stellate.ts
61 lines (58 loc) · 1.61 KB
/
stellate.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
import wtConfig from './src/config'
import {
Config
} from 'stellate'
const config: Config = {
config: {
ignoreOriginCacheControl: true,
bypassCacheHeaders: [{
name: 'skip-cache'
}],
injectHeaders: true,
scopes: {
AUTHENTICATED_SELF_ONLY: "header:Authorization",
AUTHENTICATED_JWT: {
definition: "header:Authorization",
jwt: {
claim: 'sub',
algorithm: 'HS256',
secret: 'secret'
}
}
},
rootTypeNames: {
query: 'Query',
mutation: 'Mutation'
},
rules: [{
types: {
Query: ['me']
},
maxAge: 900,
swr: 900,
scope: 'AUTHENTICATED_JWT',
description: 'Cache current user and agency'
}
],
retries: {
networkErrors: {
isEnabled: true,
whenGraphQLResponse: false
},
serverErrors: {
isEnabled: false
}
},
environments: {
"staging": {
"name": "mlocher-demo-yoga-staging",
"schema": "https://4igd49-4000.csb.app/graphql",
"originUrl": "https://4igd49-4000.csb.app/graphql",
}
},
"name": "mlocher-demo-yoga",
"schema": "https://4igd49-4000.csb.app/graphql",
"originUrl": "https://4igd49-4000.csb.app/graphql",
}
}
export default config