swh.graphql.resolvers.content module#

swh.graphql.resolvers.content.read_and_validate_content_hashes(hashes)[source]#
class swh.graphql.resolvers.content.BaseContentNode(obj, info, node_data: Any | None = None, **kwargs)[source]#

Bases: BaseSWHNode

Base resolver for all the content nodes

property hashes#
property id#
property mimeType#
property language#
property license#
is_type_of()[source]#
class swh.graphql.resolvers.content.ContentbyHashesNode(obj, info, node_data: Any | None = None, **kwargs)[source]#

Bases: BaseContentNode

Node resolver for a content requested with all of its hashes A single content object will be returned

class swh.graphql.resolvers.content.TargetContentNode(obj, info, node_data: Any | None = None, **kwargs)[source]#

Bases: BaseContentNode

Node resolver for a content requested as a target

obj: TargetNode | BranchTargetNode#
class swh.graphql.resolvers.content.ContentSwhidList(obj, info, results=None, **kwargs)[source]#

Bases: BaseList

Return a non paginated list of contents for the given SWHID This will return a single item in most of the cases

class swh.graphql.resolvers.content.ContentHashList(obj, info, results=None, **kwargs)[source]#

Bases: BaseList

Return a non paginated list of contents for the given hashes This will return a single item in most of the cases