Hey!
I’m trying to implement cart functionality currently, I’ve got a problem with singing valid customers to the newly created cart.
By this, I mean that I’m unable to add customerAccessToken to createCart mutation directly or cartBuyerIdentityUpdate mutation. With these two approaches, I’m getting the same error message:
{
"data": {
"cartBuyerIdentityUpdate": {
"cart": null,
"userErrors": [
{
"code": "INVALID",
"field": [
"buyerIdentity",
"customerAccessToken"
],
"message": "Customer is invalid"
}
]
}
}
}
My mutation for update looks like that:
mutation cartBuyerIdentityUpdate($cartId: ID!, $buyerIdentity: CartBuyerIdentityInput!) {
cartBuyerIdentityUpdate(cartId: $cartId, buyerIdentity: $buyerIdentity) {
cart {
id
buyerIdentity {
email
phone
countryCode
customer {
email
}
}
}
userErrors {
code
field
message
}
}
}
variables to mutation:
{
"cartId": "Z2lkOi8vc2hvcGlmeS9DYXJ0L2FkOGRhMDNhMmQ5NzQ1N2YxYjJmZjhjY2QzZTgwYzY2",
"buyerIdentity": {
"customerAccessToken":"b95d5f29ed2250f13c76dc6fea711ee1"
}
}
both customer account and cart were created directly before calling this mutation.
All other fields passed with buyerIdentity work fine besides token.
Thanks for any help!

