Solved

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

tcmleung
Excursionist
15 2 10

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
           }
         }
       }
    }
  }
}
Accepted Solution (1)

tcmleung
Excursionist
15 2 10

This is an accepted solution.

Finally I found the problem.

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

View solution in original post

Reply 1 (1)

tcmleung
Excursionist
15 2 10

This is an accepted solution.

Finally I found the problem.

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