themetalfleece / neogma

Object-Graph-Mapping neo4j framework, Fully-typed with TypeScript, for easy and flexible node and relationship operations
https://themetalfleece.github.io/neogma/
MIT License
117 stars 12 forks source link

Relationship methods should have similar options to node methods #84

Open Ansis100 opened 10 months ago

Ansis100 commented 10 months ago

Model.createOne() returns the created model instance. Model.update() returns the updated instance if the configuration parameter return is set to `true.

How come relationships do not have these options? The current alternative is to create/modify the relationship, then perform a findRelationships() to get the newly created data. A return parameter (or implicit return) would help to streamline the actions into a single function call. Relationship methods are also missing, for example, a throwIfNotFound parameter, meaning you have to check and throw the error manually.