New Shopify Certification now available: Liquid Storefronts for Theme Developers

get error when try to create cart with storefront api

Rakibul_Hasan
Visitor
3 0 0

i use this mutation to create the cart:

mutation createCart {
    cartCreate(
      input: {
        buyerIdentity: {
          email: "example-email@example.com"
          customerAccessToken: "f08ec7d6418751178caa565233"
        }
        lines: [
          { quantity: 2, merchandiseId: "gid://shopify/Product/8318551621920" }
        ]
      }
    ) {
      cart {
        buyerIdentity {
          email
        }
        lines(first: 10) {
          edges {
            node {
              quantity
            }
          }
        }
      }
    }
  }

 when i use this in shopify graphiql playground  get the given below error:  

{
  "data": {
    "cartCreate": null
  },
  "errors": [
    {
      "message": "invalid id",
      "locations": [
        {
          "line": 2,
          "column": 5
        }
      ],
      "path": [
        "cartCreate"
      ]
    }
  ]
}

it said invalid id but I am not able to find which wrong id I am providing. Please someone help me to solve the error

Replies 0 (0)