forked from sarkistlt/graphql-auto-generating-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcms_config.js
More file actions
47 lines (46 loc) · 1.02 KB
/
cms_config.js
File metadata and controls
47 lines (46 loc) · 1.02 KB
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
import { printSchema } from 'graphql';
import schema from './schema';
import path from 'path';
export default {
schema: printSchema(schema),
uploadRoot: path.resolve(__dirname, './public'),
rules: {
product: {
uploadPath: 'product/img',
fields: {
_id: {},
name: {},
price: {},
shortDescription: {},
pageTitle: {},
metaDescription: {},
metaKeywords: {},
categories: {},
ingredients: {},
createdAt: {},
updatedAt: {},
image: {
inputType: 'file',
},
isPublished: {},
longDescription: { inputType: 'markdown' },
notes: { inputType: 'markdown' },
},
},
coupon: {
fields: {
_id: {},
couponCodes: {},
description: {},
discountAmount: {},
minimumAmount: {},
expirationDate: {
label: 'expiration date',
inputType: 'date',
},
createdAt: {},
updatedAt: {},
},
},
},
};