How to create a draft order with more than 250 items?

Hi, I have found a problem and I haven’t found any solution.

I think that Shopify has a limit with, probable, all lineitems’ arrays.

I have try to send a graphQL mutation to create a draft order with more than 250 line items, and I have get this error MAX_INPUT_SIZE_EXCEEDED:

{“errors”:[{“message”:“Input size greater than 250.”,“locations”:[{“line”:3,“column”:25}],“path”:[“draftOrderCreate”,“input”,“lineItems”],“extensions”:{“code”:“MAX_INPUT_SIZE_EXCEEDED”}}],“response”:{},“status”:200,“body”:{“errors”:[{“message”:“Input size greater than 250.”,“locations”:[{“line”:3,“column”:25}],“path”:[“draftOrderCreate”,“input”,“lineItems”],“extensions”:{“code”:“MAX_INPUT_SIZE_EXCEEDED”}}],“extensions”:{“cost”:{“requestedQueryCost”:10,“actualQueryCost”:null,“throttleStatus”:{“maximumAvailable”:1000,“currentlyAvailable”:990,“restoreRate”:50}}}},“timestamps”:[…]}
I can’t find any info about this error in API documentation

What is the way to create a draft with more than 250 items?

I can’t create it and after update it with more articles because probably, I will get again the MAX_INPUT_SIZE_EXCEEDED error, won’t I ?

The other issue is that if you create a draft with more than 50 items like lets say 55 shopify only creates 50.

Thanks a lot.

Original post is here GraphQL DraftOrderCreate: how to create a draft order with more than 250 items - Shopify Community

Can you add additional line items afterwards?

We use the rest API for a client and was planning to migrate to gql, but this might be an issue.

Hey Blanklob,

Our product team shipped a fix for the line item issue yesterday - can you confirm if you’re still seeing this on your side?

This is fixed thanks but first one remains an issue.

Hey if you did try to add in API it will remove the first 250, and you get limited again.

1 Like