Skip to content

Commit a049f51

Browse files
committed
Adding JS/TS templates for cart/checkout validations
1 parent c7d9e64 commit a049f51

File tree

8 files changed

+3832
-2
lines changed

8 files changed

+3832
-2
lines changed

.graphqlrc.cjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function getProjects(path) {
2020
documents: `${extensionPath}/input.graphql`
2121
}
2222
}
23-
23+
2424
return projects;
2525
}
2626

@@ -30,11 +30,12 @@ const projects = {
3030
...getProjects("checkout/rust/payment-customization"),
3131
...getProjects("checkout/javascript/delivery-customization"),
3232
...getProjects("checkout/javascript/payment-customization"),
33+
...getProjects("checkout/javascript/cart-checkout-validation"),
3334
...getProjects("discounts/rust/order-discounts"),
3435
...getProjects("discounts/rust/product-discounts"),
3536
...getProjects("discounts/rust/shipping-discounts"),
3637
}
3738

3839
module.exports = {
3940
projects
40-
};
41+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
generated
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
query Input {
2+
cart {
3+
lines {
4+
quantity
5+
}
6+
}
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schemaVersions":{"cart_checkout_validation":{"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": "{{name}}",
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)