A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Based on the docs https://shopify.dev/api/admin-graphql/2021-10/queries/orders#argument-orders-query, `discount_code` is a valid query argument. The following query should've filtered out the orders without discount code, but it doesn't.
{
orders(first: 10, query: "discount_code:*") {
nodes {
id
discountCode
}
}
}
Instead it shows orders where discount code is `null`(see screenshot)
Same query on another field `source_identifier` works fine.
Was able to reproduce the issue on https://shopify.dev/graphiql/admin-graphiql , the official Shopify GraphQL demo site.
I don't have a solution but bumping this in case someone picks it up...
I've got a similar problem where I'm trying to select only email orders (not phone orders) and I'm trying:
orders(first: 10, query: "email:*")
To select orders where email is not null, and it's just returning all orders regardless...