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

Add patchGraph() and maybe updateGraph() methods? #557

Closed
lehni opened this issue Oct 16, 2017 · 4 comments
Closed

Add patchGraph() and maybe updateGraph() methods? #557

lehni opened this issue Oct 16, 2017 · 4 comments

Comments

@lehni
Copy link
Collaborator

lehni commented Oct 16, 2017

I would like to suggest the addition of patchGraph()that is similar to upsertGraph(), but would receive a sub-set of the full graph and just patch, without creating new instances in the graph, and throwing an error if data for new instances was included.

Perhaps it is then also worth considering updateGraph(), as a version of upsertGraph()that would just update and not create new instances?

And in symmetry to #556, it would then be great to then also add *AndFetch() versions of these: patchGraphAndFetch() and upsertGraphAndFetch().

@koskimas
Copy link
Collaborator

I'm going to add options for upsertGraph that allow you to select any subset of [insert, update, delete, relate, unrelate] to be selected for an upsertGraph call. This case will be covered by only enabling update. Let's continue this discussion in #526

@lehni
Copy link
Collaborator Author

lehni commented Oct 16, 2017

@koskimas there is a difference between update and patch, yes? would this cover both use-cases?

@koskimas
Copy link
Collaborator

upsertGraph always uses patch. It's possible to add an option for that too.

@lehni
Copy link
Collaborator Author

lehni commented Oct 16, 2017

Thanks for clarifying! Those options sounds perfect, BTW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants