Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/snapshot_branch.py
Show All 39 Lines | |||||
class SnapshotBranchConnection(BaseConnection): | class SnapshotBranchConnection(BaseConnection): | ||||
_node_class = SnapshotBranchNode | _node_class = SnapshotBranchNode | ||||
def _get_paged_result(self): | def _get_paged_result(self): | ||||
""" | """ | ||||
When branches requested from a snapshot | When branches requested from a snapshot | ||||
self.obj.SWHID is the snapshot SWHID here | self.obj.swhid is the snapshot SWHID here | ||||
(as returned from resolvers/snapshot.py) | (as returned from resolvers/snapshot.py) | ||||
""" | """ | ||||
result = archive.Archive().get_snapshot_branches( | result = archive.Archive().get_snapshot_branches( | ||||
self.obj.SWHID.object_id, | self.obj.swhid.object_id, | ||||
after=self._get_after_arg(), | after=self._get_after_arg(), | ||||
first=self._get_first_arg(), | first=self._get_first_arg(), | ||||
target_types=self.kwargs.get("types"), | target_types=self.kwargs.get("types"), | ||||
name_include=self.kwargs.get("nameInclude"), | name_include=self.kwargs.get("nameInclude"), | ||||
) | ) | ||||
# FIXME Cursor must be a hex to be consistent with | # FIXME Cursor must be a hex to be consistent with | ||||
# the base class, hack to make that work | # the base class, hack to make that work | ||||
end_cusrsor = ( | end_cusrsor = ( | ||||
Show All 17 Lines |