neo4j-graphql-java icon indicating copy to clipboard operation
neo4j-graphql-java copied to clipboard

Bring back the filter AND/OR

Open yarc opened this issue 3 years ago • 1 comments

Hi, i cannot upgrade from 1.2.0 to 1.4.0 without this feature and 1.2.0, as it is, is not performant enough with our data. Here are some fairly common use cases:

The user is offered a list of product price ranges (1-10$, 11-20$, 21-30$...). The user can select any of the price ranges. In a query this is where we would produce an OR for each selected ranges.

The user is viewing a schedule of events and is offered the option to filter the events by calendar date, of which he can select multiple (non-contiguous) dates. In the data each event has a timestamp associated. There would be one OR filter per selected date, that does a event.startTime > $day AND event.endTime < $day

Lastly, we often use the "AND" filter to be able to add multiple filters that are based off the same relation. If we do not use an AND in these cases, all duplicate filters overwrite each other and only the last relation filter is preserved. This is also due to the fact that we pass in dynamic filters as a graphql variable.

yarc avatar Nov 16 '21 19:11 yarc

@yarc Can you please provide a testcase.

Andy2003 avatar Nov 16 '21 23:11 Andy2003