Skip to content

Commit 35e06b9

Browse files
committed
added js to discounts sample app
1 parent 563c90f commit 35e06b9

File tree

10 files changed

+6659
-25
lines changed

10 files changed

+6659
-25
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
generated
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
query Input {
2+
cart {
3+
lines {
4+
quantity
5+
merchandise {
6+
__typename
7+
...on ProductVariant {
8+
id
9+
}
10+
}
11+
}
12+
}
13+
discountNode {
14+
metafield(namespace: "$app:volume-discount", key: "function-configuration") {
15+
value
16+
}
17+
}
18+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schemaVersions":{"product_discounts":{"major":1,"minor":0}}}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "product-discount",
3+
"version": "0.0.1",
4+
"license": "UNLICENSED",
5+
"scripts": {
6+
"shopify": "npm exec -- shopify",
7+
"typegen": "npm exec -- shopify app function typegen",
8+
"build": "npm exec -- shopify app function build",
9+
"preview": "npm exec -- shopify app function run"
10+
},
11+
"codegen": {
12+
"schema": "schema.graphql",
13+
"documents": "input.graphql",
14+
"generates": {
15+
"./generated/api.ts": {
16+
"plugins": [
17+
"typescript",
18+
"typescript-operations"
19+
]
20+
}
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)