In the database, there are shoes of sizes 41.0, or 41.5-42, 42-43, etc. I have them saved as:
41.0 -> shoes_min=41.0; shoes_max=41.0
41.5-42 -> shoes_min=41.5; shoes_max=42.0
42-43 -> shoes_min=42.0; shoes_max=43.0
My proposed filter to show up all of the above examples as a user might (on the frontend there would just be 2 input values of (41, 42) which indicates the range the user is interested in. It should match all of the above 3 examples, except in my case it is not matching entries with shoes_min=42; shoes_max=43
query MyQuery {
models(
where: {
shoes_min: {_gte: "41"}
_and: {
shoes_min: {_lte: "42"}
},
_or: {
shoes_max: {_gte: "41"}
_and: {
shoes_max: {_lte: "42"}
},
},
},
order_by: {shoes_max: asc}
) {
shoes_min
shoes_max
name
url
}
}