@@ -7,33 +7,40 @@ createApolloClient({
7
7
// URL to the HTTP API
8
8
httpEndpoint,
9
9
// Url to the Websocket API
10
- wsEndpoint = null ,
10
+ wsEndpoint: null ,
11
11
// Token used in localstorage
12
- tokenName = ' apollo-token' ,
12
+ tokenName: ' apollo-token' ,
13
13
// Enable this if you use Query persisting with Apollo Engine
14
- persisting = false ,
14
+ persisting: false ,
15
+ // Or, advanced persisting options, see https://github.com/apollographql/apollo-link-persisted-queries#options
16
+ // persisting: {
17
+ // enabled: false,
18
+ // generateHash: query => sha256()
19
+ // .update(print(query))
20
+ // .digest('hex'),
21
+ // },
15
22
// Is currently Server-Side Rendering or not
16
- ssr = false ,
23
+ ssr: false ,
17
24
// Only use Websocket for all requests (including queries and mutations)
18
- websocketsOnly = false ,
25
+ websocketsOnly: false ,
19
26
// Custom starting link.
20
27
// If you want to replace the default HttpLink, set `defaultHttpLink` to false
21
- link = null ,
28
+ link: null ,
22
29
// If true, add the default HttpLink.
23
30
// Disable it if you want to replace it with a terminating link using `link` option.
24
- defaultHttpLink = true ,
31
+ defaultHttpLink: true ,
25
32
// Options for the default HttpLink
26
- httpLinkOptions = {},
33
+ httpLinkOptions: {},
27
34
// Custom Apollo cache implementation (default is apollo-cache-inmemory)
28
- cache = null ,
35
+ cache: null ,
29
36
// Options for the default cache
30
- inMemoryCacheOptions = {},
37
+ inMemoryCacheOptions: {},
31
38
// Additional Apollo client options
32
- apollo = {},
39
+ apollo: {},
33
40
// apollo-link-state options
34
- clientState = null ,
41
+ clientState: null ,
35
42
// Function returning Authorization header token
36
- getAuth = defaultGetAuth,
43
+ getAuth: defaultGetAuth,
37
44
})
38
45
```
39
46
0 commit comments