-
Notifications
You must be signed in to change notification settings - Fork 49
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
Relationship mutations are not using the correct direction #98
Comments
Thanks for reporting that is an really unexpected bug. |
But you are correct, we don't test it in the inverse direction and the arrow here is hardcoded @Andy2003 Probably the same for the MERGE / CREATE handler |
Andy2003
added a commit
to Andy2003/neo4j-graphql-java
that referenced
this issue
Aug 7, 2020
…esolves neo4j-graphql#98) This bugfix solves the problem that the mapping was wrong for incoming relations
This was referenced Nov 12, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a database with nodes like this:
And a graphql schema like this:
The cypher queries generated when I run the deleteTeamPlayers and addTeamPlayers mutations are specifying the relationship in the wrong direction.
Here's the cypher generated by deleteTeamPlayers:
And here's addTeamPlayers:
These queries are building MATCH and MERGE clauses going from Team to Player even though my graphQL schema and database have the relationships going from Player to Team. The result is that the deleteTeamPlayers mutation doesn't do anything since it can't find any relationships to match on, and the addTeamPlayers mutation adds a relationship in the opposite direction of what's desired.
The deletePlayerTeams and addPlayerTeams mutations that were generated from the Player type work fine. It seems like the problem is that these relationship mutations are always using an outbound direction.
The text was updated successfully, but these errors were encountered: