Open
Description
To make the system flexible for any node type, we need a way to allow CRUD operations to add/edit nodes and relations.
Proposed route structure
After the controllers are loaded in the App
, we could add wildcard handler for other routes to enable CRUD and relation editing for dynamic objects to allow system to scale.
.get('/:nodeType', ...)
- view all records of type (with optional params).post('/:nodeType', ...)
- create new record of type.get('/:nodeType/:id', ...)
- view specific record of type with given id.put('/:nodeType/:id', ...)
- edit specific record of type with given id.delete('/:nodeType/:id', ...)
- remove or archive specific record of type with given id.get('/:nodeType/:id/relations', ...)
- list relations for record of type with given id (with optional parms).post('/:nodeType/:id/:activity', ...)
- record activity by user against record of type with given id [e.g. '/Photo/234/like'] (related to logged-in user).delete('/:nodeType/:id/:activity', ...)
- remove or archive relations related to activity [may not use].post('/:nodeType/:id/:activity/:targetType/:targetId', ...)
- relate multiple nodes.delete('/:nodeType/:id/:activity/:targetType/:targetId', ...)
- remove relation between multiple nodes
The action refers to ActivityType
enum based upon open social activitystreams types and the graph.helper.ts
file that maps relations to activities.
Metadata
Metadata
Assignees
Labels
No labels