omg
const DOWNLOAD_TENANT_CONFIG = 'DOWNLOAD_TENANT_CONFIG';
const SET_TENANT_CONFIG = 'SET_TENANT_CONFIG';
const downloadConfig = () => ({
type: DOWNLOAD_TENANT_CONFIG,
meta: {
offline: {
onlyKeepLatest: true,
effect: {
type: 'graphql',
query: `
query downloadConfig {
items: getTenantConfig {
key
value
schema {
type
}
}
pages: staticPages {
id
name
type
content
slug
agreement_checkbox_text
}
}
`,
operationName: 'downloadConfig'
},
commit: { type: SET_TENANT_CONFIG }
}
}
});