Field 'checkoutCreate' doesn't exist on type 'Mutation' Exception

Solved
tcmleung
Excursionist
13 2 4

I tried to run the following query, but it returns

"Field 'checkoutCreate' doesn't exist on type 'Mutation'"

Can anyone help?

mutation {
  checkoutCreate(input: {
    lineItems: [{ variantId"gid://shopify/ProductVariant/37723173093526"quantity1 }]
  }) {
    checkout {
       id
       webUrl
       lineItems(first5) {
         edges {
           node {
             title
             quantity
           }
         }
       }
    }
  }
}
0 Likes
tcmleung
Excursionist
13 2 4

This is an accepted solution.

Finally I found the problem.

The URL was incorrect. The storefront API URL does not need /admin/.

0 Likes