-
Notifications
You must be signed in to change notification settings - Fork 146
Complex nested filtering doesn't appear to work. #353
Comments
So if I'm understanding correctly that query would return items where exactly one connected feature matches the predicate of
which should filter for any items that have connected features that match the predicate: If that doesn't work, could you please also post the generated Cypher query? |
Yes, so a product may have 10 items associated with it (imagine a style of sneaker (Product), and it comes in 10 different sizes (Items)). And maybe I'm looking to get the Sneakers where the Sizes come with a Feature: {name:"LaceColour", value:"Blue"}. So with the filter, rather than the 10 Sizes being returned, maybe I only receive 3 Sizes. At the moment, the different permutations of the Feature filters seem to return all or nothing (including the query above). Unfortunately in this case we're not talking about something fun like Sneakers, but about Ball Valves (and all the content is in Dutch). I realised the initial filter on Product is unnecessary, so ran your query above like so:
yielding the result:
and the resultant Cypher query is:
|
Chiming in here to say I am having similar problems. Here is a snippet example of a schema that's failing.
Query I'm using that is returning nothing in the
|
Hey @tbrixey @leefreemanxyz - I've pushed a fix for this. Could you try with the lastest release v2.11.3 and let me know if this resolves the issue? |
Hi @johnymontana
The following GraphqL query doens't change the order of the comments whatever we fill in orderBy: created_at_asc, created_at_desc, body_asc, body_desc
Any idea why? We've now |
Same remark as the end of this: |
Hi @jonasdumas - I've created Issue #373 to track your DateTime ordering issue. Let's keep the discussion here to the nested filtering bug described above. Thanks! |
@tbrixey @leefreemanxyz Closing this issue as it should be resolved in v2.11.3. Please reopen if you're still seeing the same behavior. |
This fixes my issue thanks! |
Hello, I'm having some trouble with the neo4j-graphql-js package. We have a schema (stripped down for brevity) as follows:
And from a product page we would like to build filters based on the features of the items belonging to that product. E.g. we want to filter based on a match of the
name
andvalue
of a feature (the names will always be unique for a feature, but the values can quite easily be the same for different feature names). Judging by the documentation, I would expect to be able to write a query like this:but the response is empty
I used Features_single because I want to return Items where a single feature has both the name and value required (e.g. an item with Features: [{color: red}, {backgroundColor:blue}] should not be returned as an item, only {color:blue, backgroundColor: anything}). In the Neo4J Slack I was advised to try Features_some – when I use this, if one feature in all the items matches, then all items from the product are returned, and if there is no match in any of the items then none are returned at all.
Thanks in advance.
The text was updated successfully, but these errors were encountered: