CheckoutLineItemInput graphql discrepancy

Batatko
Visitor
3 0 2

I'm currently developing a custom checkout and came to a problem with the CheckoutLineItemInput type.

Storefront documentation for checkoutCreate has a inconsistency with given input type and the gql schema.

The "lineItems" property should accept a "variantId: ID!", while the graphql schema offers only "variant" and its subfields. I got the same error while trying out the mutation via gql app on shopify and on my end via codegen.

it should look like this, and the mutation does not work:

 

      lineItems {
        edges {
          node {
	    customAttributes {
              key
              value
            }
            quantity
            variantId
          }
        }
      }
    }

 

 

but it suggest this:

      lineItems {
        edges {
          node {
	     customAttributes {
              key
              value
            }
            quantity
            variant {
                ...
          }
        }
      }
    }

 
If anyone has any knowledge of this problem or a workaround pls help 🙂

Replies 0 (0)