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 dynamic Node CRUD and relations feature #55

Open
mikesparr opened this issue Feb 20, 2019 · 0 comments
Open

Add dynamic Node CRUD and relations feature #55

mikesparr opened this issue Feb 20, 2019 · 0 comments
Assignees

Comments

@mikesparr
Copy link
Owner

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.

@mikesparr mikesparr self-assigned this Feb 20, 2019
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

1 participant