query not filtering HasOutOfStockVariants

47 2 3
I am writing a query for GraphQL. This is my query string:
``` "query":"created_at:>" + str(my_date_list[0]) + " created_at:<" + str(my_date_list[1]) + " has_out_of_stock_variants:'true'"```
For some reason it is returning variants where HasOutOfStockVariants: False . What am I doing wrong? The created dates are working without the has_out_of_stock_variants part.
Reply 1 (1)
Shopify Staff
Shopify Staff
267 40 43

Hi @BeamJokerFavor 

I think the problem may be in the spelling of the field - it should be hasOutOfStockVariants rather than has_out_of_stock_variants in GraphQL. If you're still not getting the correct results with that change, could you please provide the full GraphQL request as it is being sent to Shopify? 

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog