New Order Subscription

In the animation below, you can easily see how you can subscribe and listen to new orders being created with the checkout mutation.

This is great for any real-time dashboards that display orders without having to refresh a page.

New Order Subscription

The subscription below will subscribe to new orders.

subscription {
orders(where: {
mutation_in: [CREATED]
}) {
node {
id
items {
description
}
}
}
}