Suppose I want to define a relationship like the following :
a:University -[ENTRY]-> b:Department
OR
a:University -[ENTRY]-> p:Position
How to do this with neo4j-graphql-js ?
Suppose I want to define a relationship like the following :
a:University -[ENTRY]-> b:Department
OR
a:University -[ENTRY]-> p:Position
How to do this with neo4j-graphql-js ?
My main recommendation would be to use properly descriptive relationship-types.
Otherwise you can use two custom mutations that use a @cypher
directive for creating either of these.
Okay, let's say I defined the two mutations as below,
addPositionEntry()
addDepartmentEntry()
Now coming back to GraphQL schema level,
University{
entry: // Here I want the relationship data to come whether it's from addPositionEntry or addDepartmentEntry
}
How should I do this?
This post is old. Were you able to figure out how to do this?
I found https://github.com/thepiperpied/palm-tree/blob/b1d16ac52950a220bdfde60fd25b760a6f58e9d5/graphql-schema.js#L24 from other post but how do I send both objects as argument instead of ids?
In the new version of graphql-neo4j-js library it has been resolved. @npatel