Following this blog article https://www.netlify.com/blog/2021/07/20/build-your-own-shop-with-the-shopify-storefront-api-eleventy-and-serverless-functions/
I am trying to create a cart the first time the user add an item to the cart with the following request using the “unstable” API:
query:
mutation createCart($cartInput: CartInput) {
cartCreate(input: $cartInput) {
cart {
id
createdAt
updatedAt
lines(first:10) {
edges {
node {
id
quantity
merchandise {
... on ProductVariant {
id
title
priceV2 {
amount
currencyCode
}
product {
id
title
}
}
}
}
}
}
estimatedCost {
totalAmount {
amount
currencyCode
}
subtotalAmount {
amount
currencyCode
}
totalTaxAmount {
amount
currencyCode
}
totalDutyAmount {
amount
currencyCode
}
}
}
}
}
with the following query variables:
{
"cartInput": {
"lines": [
{
"quantity": 1,
"merchandiseId": "
The API always returns:
```javascript
{
"data": {
"cartCreate": {
"cart": null
}
}
}
My private app has"Read and modify checkouts" app to allow unauthenticated_write_checkouts
Thank you for your help.