Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

CheckoutLineItemInput graphql discrepancy

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)