I’m using version 2021-10 (release candidate) of the api to create a shopping cart. The cart is created, but it’s always empty. If I intentionally set the merchandiseId to an invalid value, it correctly reports a user error for an invalid merchandiseId. When I use a valid merchandiseId, the cart is created but contains an empty lines array.
My query:
mutation ($id: ID!, $auth: String!, $email: String!) {
cartCreate(input: {
lines: [
{
merchandiseId: $id,
quantity: 1,
attributes: [
{
key: "AuthenticationCode",
value: $auth
}
]
}
],
buyerIdentity: {
email: $email
}
})
{
cart {
id
checkoutUrl
lines(first: 5) {
edges {
node {
id
merchandise {
... on ProductVariant {
id
}
}
}
}
}
}
userErrors {
code
field
message
}
}
}
And the query variables:
{
"id":"
I get the response:
```css
{
"data": {
"cartCreate": {
"cart": {
"id": "Z2lkOi8vc2hvcGlmeS9DYXJ0L2RiNmJiNGFhZjYyZDg1YjMxZTJkYmY2YTgxZTY4MDJj",
"checkoutUrl": "https:\/\/fs-recurring-billing-sandbox.myshopify.com\/cart\/c\/db6bb4aaf62d85b31e2dbf6a81e6802c",
"lines": {
"edges": []
}
},
"userErrors": []
}
}
}
Can anyone see a problem with this? I’ve tried everything I can think of.