The current graph API doesn't allow to simply retrieve the edges related to a given node. We could add a non recursive option to existing methods, but given how foundamental the operation is I think it deserves a dedicated method.
Concrete proposal:
- method: /graph/neighbourhood/:src
- return: list of node PIDs directly linked to :src via single edges
- query params: "edges", "direction" with the usual semantics and default values
Note : "neighbourhood" being long and tricky for non native speakers to write, having a shorter alias would be nice, e.g., "hood" or "nbhd".