Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/directory_entry.py
Show All 24 Lines | class DirectoryEntryNode(BaseDirectoryEntryNode): | ||||
Node resolver for a directory entry requested with a | Node resolver for a directory entry requested with a | ||||
directory SWHID and a relative path | directory SWHID and a relative path | ||||
""" | """ | ||||
def _get_node_data(self): | def _get_node_data(self): | ||||
# STORAGE-TODO, archive is returning a dict | # STORAGE-TODO, archive is returning a dict | ||||
# return DirectoryEntry object instead | # return DirectoryEntry object instead | ||||
return self.archive.get_directory_entry_by_path( | return self.archive.get_directory_entry_by_path( | ||||
directory_id=self.kwargs.get("swhid").object_id, | directory_id=self.kwargs.get("directorySwhid").object_id, | ||||
path=self.kwargs.get("path"), | path=self.kwargs.get("path"), | ||||
) | ) | ||||
class DirectoryEntryConnection(BaseConnection): | class DirectoryEntryConnection(BaseConnection): | ||||
""" | """ | ||||
Connection resolver for entries in a directory | Connection resolver for entries in a directory | ||||
""" | """ | ||||
Show All 13 Lines |