statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
31 stars 1 forks source link

Add Graphql orWhere support #914

Open SteJW opened 1 year ago

SteJW commented 1 year ago

Is there a way to support orWhere functionality to be used in GraphQL? A query would look like this: query MyQuery { entries( collection: "products", limit: 15, page: 1, filter: { or: [ {materials: {in: {slug: ["glas"]}}}, {product_categories: {in: {slug: ["grafmonumenten"]}}}, ] }) { current_page last_page total } } It should show results where either one of the filters is selected.

It doesn't see the "or" in the query. When I look in the QueriesConditions it only supports where(), so it's no surprise that it doesn't work :)