Open mark-prins opened 3 years ago
Not sure if this is just a placeholder for later... but just in case!
IIRC in we don't want to demo mutations for v2
in this sprint? I feel like this is only going to be worth getting into v2
if we can implement authentication + a UI for creating/updating/deleting entity data. Given only a couple of days left, might be good idea to focus on clearing out the review backlog (some of which my fault, but I'm sickly so you can't pick on me).
yeah, a placeholder. I was putting the WIP which I'd done in testing the back-end auth into a branch before heading into the murky thicket of PRs-vlille.
Oops! Sounds good!
Update: Brain dumped thoughts so far into Possible Solution (for my own future reference and anyone curious/wanting to provide input).
@katherine-sussol that looks good!
An additional thought: we're heading toward approvals / drafts and perhaps we could consider soft-delete at some point? I'm not sure that it is required for this project, it was just the comment of deleting a node and all properties & children.. that made me nervous.
If the code is autogenerated, we cannot recreate an accidentally removed node - so perhaps a soft-delete and restore will be needed.
Yeah, soft-deletions are probably a good idea, full deletion is pretty final (and maybe best left as an extra-final thing someone can do periodically to clean up soft-deleted nodes).
Thinking we could add a 'deleted' flag to entities? Or create a deleted node and link deleted items as children? Or maybe there are other options... π π:
Add some mutations to Apollo server to enable editing / adding / deleting entities.
Expected Behaviour
Should be able to edit (CRUD) an entity via the API
Possible Solution
Proposed Schema
UpdateMutationResponse is just a success code and entity object
deleteEntity
dgraph.type
is not set on any of our nodes - probs should be addressed in a separate issue)createEntity
updateEntity