generated from silexlabs/silex-plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathclient-test.js
61 lines (60 loc) · 1.71 KB
/
client-test.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
//import env from './env.js'
import CmsPlugin from '../client.js'
// A test client config
export default function (config, options = {}) {
const opts = {
dataSources: [
//{
// id: 'countries_api',
// type: 'graphql',
// label: 'Countries API',
// url: 'https://countries.trevorblades.com/graphql',
// method: 'POST',
// headers: {},
//}, {
// id: 'sanity',
// type: 'graphql',
// label: 'Sanity API',
// url: 'https://gl93e3h9.api.sanity.io/v2023-08-01/graphql/production/default',
// method: 'POST',
// headers: {
// 'Authorization': 'Bearer skGP3qsWCXgPPTqmvIyAdeFhACwWKt94Eq3oCexQNvalA291L03mfLLq0DFHN9pVxhPuTVSs5vfDucKpWZHKRGGKwBdou4QYW32yNBBkHJjl2QGnn67KtdaqRCo7vhxlBObbZdFVylCgtO2M6c4lvkal0owBpVO4PCcMxeUC38z1r8pjvTXJ',
// },
//},
//{
// id: 'directus',
// type: 'graphql',
// name: 'Directus API',
// url: `https://${env.APP_NAME}.${env.CAPROVER_DOMAIN}/cms/graphql`,
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// 'Authorization': 'Bearer HLjFzkT6u3S8mkJyk4EmFEcpUAgKmybV',
// },
//},
],
enable11ty: true,
// i18nPlugin: false,
// fetchPlugin: false,
filters: [
'generic',
'liquid',
{
type: 'filter',
id: 'Test custom filter',
label: 'Test custom filter',
validate: (field) => !!field,
output: type => type,
apply: (str) => {
console.info(str)
return str
},
options: {},
quotedOptions: [],
},
],
...options,
}
config.addPlugin(CmsPlugin, opts)
return opts
}