Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where filter not being translated #6039

Closed
mjfwebb opened this issue Mar 4, 2025 · 1 comment · Fixed by #6109
Closed

Where filter not being translated #6039

mjfwebb opened this issue Mar 4, 2025 · 1 comment · Fixed by #6109
Labels
bug Something isn't working confirmed Confirmed bug

Comments

@mjfwebb
Copy link
Contributor

mjfwebb commented Mar 4, 2025

Consider the following type definitions:

type Thing @node {
    things: [Thing!]! @relationship(type: "NEIGHBOUR_OF", direction: OUT)
    id: String!
}

And the following mutation:

mutation Mutation {
  updateThings(
    update: { things: [{ where: { node: { id: "1" } }, connect: [{}] }] }
  ) {
    info {
      relationshipsCreated
      relationshipsDeleted
      nodesDeleted
      nodesCreated
    }
  }
}

The where filter { where: { node: { id: "1" } } is missing from the generated Cypher:

MATCH (this:Thing)


WITH *
CALL {
     WITH this
     OPTIONAL MATCH (this_things0_connect0_node:Thing)
     CALL {
             WITH *
             WITH collect(this_things0_connect0_node) as connectedNodes, collect(this) as parentNodes
             CALL {
                     WITH connectedNodes, parentNodes
                     UNWIND parentNodes as this
                     UNWIND connectedNodes as this_things0_connect0_node
                     MERGE (this)-[:NEIGHBOUR_OF]->(this_things0_connect0_node)
             }
     }
WITH this, this_things0_connect0_node
     RETURN count(*) AS connect_this_things0_connect_Thing0
}

RETURN "Query cannot conclude with CALL"

This is the case in Version 5.x, 6.x and 7.x

@mjfwebb mjfwebb added the bug Something isn't working label Mar 4, 2025
@a-alle a-alle added the confirmed Confirmed bug label Mar 4, 2025
@neo4j-team-graphql
Copy link
Collaborator

We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @mjfwebb! 🙏 We will now prioritise the bug and address it appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants