-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhoudini.config.js
69 lines (64 loc) · 2.06 KB
/
houdini.config.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
/// <references types="houdini-svelte">
/** @type {import('houdini').ConfigFile} */
const config = {
apiUrl: 'https://graphql.datocms.com/',
schemaPollHeaders: {
Authorization(env) {
return `Bearer ${env.PUBLIC_DATOCMS_API_TOKEN}`;
}
},
plugins: {
'houdini-svelte': {
// This is the setting that gives the possibility to build
// the preview feature: by declaring here a custom store for GraphQL queries,
// Houdini inherits all the stores that are generated at build time.
//
// Therefore, we can use the custom store to inject the desired behaviours:
// subscribe to a GraphQL channel and update the store contents when new data
// are pushed from the server.
customStores: {
query: '$lib/stores.QueryStoreWithPreviewSupport',
// Define the standard stores: this should become useless when the PR
// https://github.com/HoudiniGraphql/houdini/pull/835
// will be merged.
mutation: '$houdini/plugins/houdini-svelte/runtime/stores.MutationStore',
fragment: '$houdini/plugins/houdini-svelte/runtime/stores.FragmentStore',
subscription: '$houdini/plugins/houdini-svelte/runtime/stores.SubscriptionStore',
queryForwardsCursor:
'$houdini/plugins/houdini-svelte/runtime/stores.QueryStoreForwardCursor',
queryBackwardsCursor:
'$houdini/plugins/houdini-svelte/runtime/stores.QueryStoreBackwardCursor',
queryOffset: '$houdini/plugins/houdini-svelte/runtime/stores.QueryStoreOffset',
fragmentForwardsCursor:
'$houdini/plugins/houdini-svelte/runtime/stores.FragmentStoreForwardCursor',
fragmentBackwardsCursor:
'$houdini/plugins/houdini-svelte/runtime/stores.FragmentStoreBackwardCursor',
fragmentOffset: '$houdini/plugins/houdini-svelte/runtime/stores.FragmentStoreOffset'
}
}
},
scalars: {
MetaTagAttributes: {
type: 'Record<string, string>'
},
Date: {
type: 'string'
},
IntType: {
type: 'number'
},
JsonField: {
type: 'unkown'
},
ItemId: {
type: 'string'
},
FloatType: {
type: 'number'
},
UploadId: {
type: 'string'
}
}
};
export default config;