Storefront GraphQL API - query orders on fulfillment status or by name doesn't work

munkius
Visitor
3 0 0

I'm using the GraphQL Storefront API version 2023-01.

 

I'm having trouble filtering orders of a customer. Getting them all works fine. Filtering on ID also works fine (after finding out after a while of struggling I need to not use the returned ID from the API (like gid://shopify/Order/1234?key=something), but to use just the number 1234 and strip the rest.)). Filtering using multiple ID's, or negating them works as expected.
 
However, filtering on any other property doesn't work (for me). Like `fulfillmentStatus` or `name`. How do I successfully filter on those - or any other - property? Is that even possible? I've tried everything I can imagine. I just - always - get the entire collection back. No clue what to do from here.
 
query($customerAccessToken: String!, $query: String!) {
customer(customerAccessToken: $customerAccessToken) {
orders(reverse: true, first: 100, query:$query) {
edges {
node {
id
...
}
}
}
}
}

 

Reply 1 (1)

munkius
Visitor
3 0 0

Would anyone know a way how to retrieve *only* fulfilled orders for instance through the Storefront  API (GraphQL)? Now I don't see another option then querying all of them and filtering client side.