Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/visit.py
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | class OriginVisitConnection(BaseConnection): | ||||
_node_class = BaseVisitNode | _node_class = BaseVisitNode | ||||
def _get_paged_result(self) -> PagedResult: | def _get_paged_result(self) -> PagedResult: | ||||
# self.obj.url is the origin URL | # self.obj.url is the origin URL | ||||
return self.archive.get_origin_visits( | return self.archive.get_origin_visits( | ||||
self.obj.url, after=self._get_after_arg(), first=self._get_first_arg() | self.obj.url, after=self._get_after_arg(), first=self._get_first_arg() | ||||
) | ) | ||||
# def _get_index_cursor(self, index: int, node: BaseVisitNode): | |||||
# # Origin visit is using visit number as the cursor | |||||
# return utils.get_encoded_cursor(str(node.visitId)) |