Overview
Create a reusable function for archiving a node. Archiving should prevent a node from being used as the start of a match in the relevant queries without requiring the deletion of the node or its relationships. This allows us to maintain history without affecting the functionality of the app.
Track as part of Falcor Route creation.
Function Signature
function (
nodeLabel : string,
nodeId : string,
userId : string
) : Observable<object>
Spec
GIVEN:
- a node in the database with no incoming relationships;
WHEN provided:
- a label on the node;
- the ID of the node to archive;
- the ID of the user performing this action;
THEN:
- the function should set the following properties on the node:
{
archived: true,
archived_at: now(),
archiver: userId,
}
WHEN:
- the node has inbound relationships;
THEN:
Overview
Create a reusable function for archiving a node. Archiving should prevent a node from being used as the start of a match in the relevant queries without requiring the deletion of the node or its relationships. This allows us to maintain history without affecting the functionality of the app.
Track as part of Falcor Route creation.
Function Signature
Spec
GIVEN:
WHEN provided:
THEN:
WHEN:
THEN: