Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/snapshot.py
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | class TargetSnapshotNode(BaseSnapshotNode): | ||||
Node resolver for a snapshot requested as a target | Node resolver for a snapshot requested as a target | ||||
""" | """ | ||||
from .snapshot_branch import SnapshotBranchNode | from .snapshot_branch import SnapshotBranchNode | ||||
obj: Union[BaseVisitStatusNode, SnapshotBranchNode] | obj: Union[BaseVisitStatusNode, SnapshotBranchNode] | ||||
def _get_node_data(self): | def _get_node_data(self): | ||||
snapshot_id = self.obj.targetHash | snapshot_id = self.obj.target_hash | ||||
return self._get_snapshot_by_id(snapshot_id) | return self._get_snapshot_by_id(snapshot_id) | ||||
class OriginSnapshotConnection(BaseConnection): | class OriginSnapshotConnection(BaseConnection): | ||||
""" | """ | ||||
Connection resolver for the snapshots in an origin | Connection resolver for the snapshots in an origin | ||||
""" | """ | ||||
Show All 11 Lines |