How would you access an order by its ID using the GraphQL Storefront API?
I've got this, however it will only work for the standard API.
query {
node(id: "gid://shopify/Order/56765457676") {
id
... on Order {
id
}
}
}
As it's not a root node, would I need to access it only through, say, a query on the customer? If so, how would I specify the specific order by ID, instead of just return the first x number of orders.
query getCustomer(\$token: String!) {
customer(customerAccessToken: \$token) {
orders(first: 5) {
edges {
node {
orderNumber
processedAt
totalPriceV2 {
amount
}
}
}
}
}
}
Solved! Go to the solution
Hi @wcw-matt , just for clarification, you were able to query an order's details using the storefront graphql API? Can you please elaborate on what query/mutation did you use exactly?
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |