Skip to content

Commit

Permalink
added js to discounts sample app
Browse files Browse the repository at this point in the history
  • Loading branch information
nickwesselman committed Mar 2, 2023
1 parent 563c90f commit 35e06b9
Show file tree
Hide file tree
Showing 10 changed files with 6,659 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
generated
18 changes: 18 additions & 0 deletions sample-apps/discounts/extensions/product-discount-js/input.graphql
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
}
}
}
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 sample-apps/discounts/extensions/product-discount-js/package.json
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"
]
}
}
}
}
Loading

0 comments on commit 35e06b9

Please sign in to comment.