new operation to delete elements and their graph connections
Right now, to delete elements, we use the delete operation providing the element's id. If this element has one or more graph connections to some other elements, these connections will remain in the database, therefore pointing to an identifier which doesn't exist anymore.
To avoid graph inconsistencies and to ease client-side development, we would like to provide a single server-side operation to delete an element and its graph connections at the same time (deletes the element and the graph edges pointing to it and pointing from it).
implementation details: this operation could be named graphDelete (camelCase) to differentiate it from the classic delete operation. It would accept the same arguments as the delete operation (an identifier string, or an array of identifier strings) but, before deleting the elements, it would perform a query to find the graph links having src_id and tgt_id equal to the identifiers to delete, adding them to an array, then perform a classic delete with the new array. Having only one delete call will prevent having temporary graph inconsistencies.
Request for SyncPlanet.io