-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathgraphcool.yml
111 lines (96 loc) · 2.59 KB
/
graphcool.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
types: ./types.graphql
permissions:
- operation: Image.create
- operation: ImageOnFile.*
- operation: ProductImage.*
- operation: Basket.create
- operation: Basket.read
- operation: Basket.update
- operation: BasketItem.create
- operation: BasketItem.read
- operation: BasketItem.update
authenticated: false
- operation: Product.read
authenticated: false
- operation: Product.create
- operation: Product.update
- operation: Product.delete
authenticated: true
# query: ./permissions/Product.graphql
- operation: Image.read
authenticated: false
- operation: Image.create
- operation: Image.update
- operation: Image.delete
authenticated: true
# query: ./permissions/Product.graphql
- operation: Category.read
authenticated: false
- operation: Category.create
- operation: Category.update
- operation: Category.delete
authenticated: true
# query: ./permissions/Category.graphql
- operation: File.read
authenticated: false
- operation: File.create
- operation: File.update
- operation: File.delete
authenticated: true
# query: ./permissions/Product.graphql
- operation: Order.read
- operation: Order.update
authenticated: true
# query: ./permissions/Order.graphql
- operation: OrderItem.read
authenticated: true
# - operation: Checkout
# authenticated: false
# # query: ./permissions/Checkout.graphql
rootTokens:
- commerceql
functions:
addItemToBasket:
handler:
code:
src: ./src/addItemToBasket.ts
type: resolver
schema: ./src/addItemToBasket.graphql
getBasketSubTotal:
handler:
code:
src: ./src/getBasketSubTotal.ts
type: resolver
schema: ./src/getBasketSubTotal.graphql
Checkout:
handler:
code:
src: ./src/Checkout.ts
environment:
STRIPE_KEY: ${env:STRIPE_KEY}
type: resolver
schema: ./src/Checkout.graphql
sendOrderConfirmationEmail:
handler:
code:
src: ./src/sendOrderEmail.ts
environment:
SENDGRID_API_KEY: ${env:SENDGRID_API_KEY}
type: subscription
query: ./src/sendOrderEmail.graphql
# cleanupCarts:
# handler:
# code:
# src: ./src/cleanupCarts.ts
# type: subscription
# query: ./src/cleanupCarts.graphql
sendShippingConfirmationEmail:
handler:
code:
src: ./src/sendShippingEmail.ts
environment:
SENDGRID_API_KEY: ${env:SENDGRID_API_KEY}
STORE_NAME: ${env:STORE_NAME}
STORE_EMAIL: ${env:STORE_EMAIL}
type: subscription
query: ./src/sendShippingEmail.graphql