Open ChrisIsKing opened 2 months ago
Closing as a non-priority.
As optional and not by default, yes this could be a good option.
for security, we usually don't recommend usage of the class connected to DB (data model - node/edge/walker) as request class or response class. This is to avoid exposing your data structure outside.
@amadolid Yh that's understandable. I'm fine without create & update. I do think a default fetch & delete would be appropriate though.
Nodes and edges when instantiated on a graph typically are used as custom objects for persisting and representing data concepts. Managing these objects when created typically always requires devs to write CRUD walkers. e.g
It would be ideal if for every node and edge defined there is the automatic construction of CRUD walkers to facilitate its management via API. e.g node example_node {} would result in the auto-creation of 4 walkers: create_example_node(), get_example_node, update_example_node, delete_example_node. The 3 non-creation walkers with all rely on the param _id to be passed when called to identify the node. The custom walkers can then be exposed via jac-cloud as:
URL/walker/create_{nodename} URL/walker/read{node_name}/{nodeid} URL/walker/update{node_name}/{nodeid} URL/walker/delete{node_name}/{node_id}