Creating an order through GraphQL for integration tests

Shopify Partner
3 0 1


We have Shopify integration in our product (through private/custom app GraphQL API) and last year we wrote some integration tests which would create orders in our Shopify Partners account test store and test our code is working well with new Shopify orders. To trigger this entire flow in our tests we automatically (using GraphQL API) created draft orders and converted them to normal orders (this still is the suggested way by n1 result when googling "shopify graphql order creation" -
In the meantime something has changed on Shopify side and our checkout got locked because of using draft orders and we were told by Shopify support that that is not a valid way of testing this anymore. Now, I can't find any other way to create orders through GraphQL but by creating draft orders first. So, is there a way to create order from GraphQL API without using draft orders?

Replies 2 (2)

Shopify Partner
2 0 0

Did you ever arrive at a solution to this? I am in need of this functionality as well

Shopify Staff
1312 215 454

Hey @ACDev , Draft orders is currently the best way to create orders through GraphQL although the limitation on development stores still exist. With that in mind, we have a great guide here on creating test orders through the REST API. 




Hope that helps. 


- Kyle G.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog