Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/resolvers/resolvers.py
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | |||||
@query.field("resolveSWHID") | @query.field("resolveSWHID") | ||||
def search_swhid_resolver( | def search_swhid_resolver( | ||||
obj: None, info: GraphQLResolveInfo, **kw | obj: None, info: GraphQLResolveInfo, **kw | ||||
) -> rs.search.ResolveSwhidList: | ) -> rs.search.ResolveSwhidList: | ||||
return SimpleListFactory.create("resolve-swhid", obj, info, **kw) | return SimpleListFactory.create("resolve-swhid", obj, info, **kw) | ||||
@revision.field("author") | |||||
def revision_author_resolver( | |||||
obj: None, info: GraphQLResolveInfo, **kw | |||||
) -> rs.revision.RevisionNode: | |||||
return SimpleListFactory.create("revision-author", obj, info, **kw) | |||||
@revision.field("committer") | |||||
def revision_committer_resolver( | |||||
obj: None, info: GraphQLResolveInfo, **kw | |||||
) -> rs.revision.RevisionNode: | |||||
return SimpleListFactory.create("revision-committer", obj, info, **kw) | |||||
@release.field("author") | |||||
def release_author_resolver( | |||||
obj: rs.release.BaseReleaseNode, info: GraphQLResolveInfo, **kw | |||||
) -> rs.revision.RevisionNode: | |||||
return SimpleListFactory.create("release-author", obj, info, **kw) | |||||
# Other resolvers | # Other resolvers | ||||
@release_target.type_resolver | @release_target.type_resolver | ||||
@directory_entry_target.type_resolver | @directory_entry_target.type_resolver | ||||
@branch_target.type_resolver | @branch_target.type_resolver | ||||
@search_result_target.type_resolver | @search_result_target.type_resolver | ||||
def union_resolver( | def union_resolver( | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |