-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
563c90f
commit 35e06b9
Showing
10 changed files
with
6,659 additions
and
25 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
sample-apps/discounts/extensions/product-discount-js/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
generated |
18 changes: 18 additions & 0 deletions
18
sample-apps/discounts/extensions/product-discount-js/input.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
query Input { | ||
cart { | ||
lines { | ||
quantity | ||
merchandise { | ||
__typename | ||
...on ProductVariant { | ||
id | ||
} | ||
} | ||
} | ||
} | ||
discountNode { | ||
metafield(namespace: "$app:volume-discount", key: "function-configuration") { | ||
value | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
sample-apps/discounts/extensions/product-discount-js/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"schemaVersions":{"product_discounts":{"major":1,"minor":0}}} |
23 changes: 23 additions & 0 deletions
23
sample-apps/discounts/extensions/product-discount-js/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "product-discount", | ||
"version": "0.0.1", | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"shopify": "npm exec -- shopify", | ||
"typegen": "npm exec -- shopify app function typegen", | ||
"build": "npm exec -- shopify app function build", | ||
"preview": "npm exec -- shopify app function run" | ||
}, | ||
"codegen": { | ||
"schema": "schema.graphql", | ||
"documents": "input.graphql", | ||
"generates": { | ||
"./generated/api.ts": { | ||
"plugins": [ | ||
"typescript", | ||
"typescript-operations" | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.