Thanks for bringing this up. I've tested on my end and have been able to replicate the behaviour you've described. I've raised the issue with our developers for further investigation. As soon as I have an update to share, I will post here to let you know.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Thanks for the reply.
I do notice now that I used the property discountCode instead of what probably should have been discount_code in the filter. However, it still didn't solve the problem. I still received results with null discount codes.
I suspect the problem is that discountCode simply isn't a property you can filter by. If that is the case, It would be nice if there were an error to let me know that.
"This query can be combined with a Not Query to find fields missing a value, e.g. -published_at:*" (https://shopify.dev/concepts/about-apis/search-syntax)
You must have just forgotten the "-" before "discount_code"