diff --git a/swh/graphql/resolvers/resolvers.py b/swh/graphql/resolvers/resolvers.py --- a/swh/graphql/resolvers/resolvers.py +++ b/swh/graphql/resolvers/resolvers.py @@ -244,10 +244,10 @@ return resolver(obj, info, **kw) -# @revision.field("revisionLog") -# def revision_log_resolver(obj, info, **kw): -# resolver = get_connection_resolver("revision-log") -# return resolver(obj, info, **kw) +@revision.field("revisionLog") +def revision_log_resolver(obj, info, **kw): + resolver = get_connection_resolver("revision-log") + return resolver(obj, info, **kw) @directory.field("entries") diff --git a/swh/graphql/resolvers/revision.py b/swh/graphql/resolvers/revision.py --- a/swh/graphql/resolvers/revision.py +++ b/swh/graphql/resolvers/revision.py @@ -7,6 +7,7 @@ from swh.graphql.backends import archive from swh.graphql.utils import utils +from swh.model.model import Revision from swh.model.swhids import CoreSWHID, ObjectType from swh.storage.interface import PagedResult @@ -100,6 +101,11 @@ def _get_paged_result(self) -> PagedResult: # STORAGE-TODO (date in revisionlog is a dict) log = archive.Archive().get_revision_log([self.obj.swhid.object_id]) + # Storage is returning a list of dicts instead of model objects + # Following loop is to reverse that operation + + # STORAGE-TODO; remove to_dict from storage.revison_log + log = [Revision.from_dict(rev) for rev in log] # FIXME, using dummy(local) pagination, move pagination to backend # To remove localpagination, just drop the paginated call # STORAGE-TODO (pagination)