aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/graph/graph.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-02-08 21:17:57 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-02-08 21:17:57 +0100
commit9b490d19dcebc0fc24cb2ab89a783f1f7d6147f7 (patch)
tree5fc3d3b8864a8ff996e5739ed9654dae494d9d8f /bsfs/graph/graph.py
parente12cd52ad267563c8046a593ad551b1dd089a702 (diff)
parentc0218a8dffcdc3a7a5568f66bb959139fe514ad5 (diff)
downloadbsfs-9b490d19dcebc0fc24cb2ab89a783f1f7d6147f7.tar.gz
bsfs-9b490d19dcebc0fc24cb2ab89a783f1f7d6147f7.tar.bz2
bsfs-9b490d19dcebc0fc24cb2ab89a783f1f7d6147f7.zip
Merge branch 'mb/fetch' into develop
Diffstat (limited to 'bsfs/graph/graph.py')
-rw-r--r--bsfs/graph/graph.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bsfs/graph/graph.py b/bsfs/graph/graph.py
index 2210755..df2e3a5 100644
--- a/bsfs/graph/graph.py
+++ b/bsfs/graph/graph.py
@@ -133,4 +133,12 @@ class Graph():
# return Nodes instance
return _nodes.Nodes(self._backend, self._user, type_, guids)
+ def all(self, node_type: URI) -> _nodes.Nodes:
+ """Return all instances of type *node_type*."""
+ # get node type
+ type_ = self.schema.node(node_type)
+ guids = self._backend.get(type_, None) # no need to materialize
+ return _nodes.Nodes(self._backend, self._user, type_, guids)
+
+
## EOF ##