I've been working on a tool to create orders via Graphql API and I'm honestly not sure if it's not fully implemented or just much different from the REST API.
1. The REST API allows us to directly create orders. Is it correct that the GraphqL implementation requires us to first call the draftOrderCreate mutation and then the draftOrderComplete?
2. Is there no equivalent RISK API for the GraphqL? It appears I would need to leverage the REST API if I want to work with the RISK API.
Solved! Go to the solution
1. Yes, when using GraphQL to create an order, you must first use the draftOrderCreate mutation and then the draftOrderComplete mutation.
2. You can find the OrderRisk object under our Objects documentation linked here. It provides you with properties such as the OrderRiskLevel, display status, and the risk message that's shown to the merchant in the Shopify admin.
Thanks kindly for taking the time to respond. Regarding #2, I saw the risk object but I don't see any mutation to add or update an order's risk like what's possible with the REST API - https://help.shopify.com/en/api/reference/orders/order-risk#create Am I overlooking some Graphql Mutation or is this possibly coming in the future to the Graphql API version? I think there are instances of other APIs not yet currently available over Graphql.
This is an accepted solution.
Ah yes, sorry for misunderstanding, I didn't realize you were looking to update OrderRisk values and thought you were just looking to query them.
The REST and GraphQL API are not currently at full parity, but we're working towards bringing them to parity in the future. This means that for the time being, for certain use-cases you may be required to use both REST and GraphQL to accomplish what it is you're looking to do. As is the case with updating an Orders Risk Level.
I would recommend subscribing to our API changelog for future announcements about changes to the GraphQL API.
I hope you are having a great weekend.
I am using GraphQL to create an order, so I first use the draftOrderCreate mutation and then the draftOrderComplete mutation.
But in this case, the order confirmation email was sent to customers.
Is there any way to prevent sending an email when using GraphQL?
Thank you & have a great weekend!