diff --git a/ayon_server/graphql/nodes/representation.py b/ayon_server/graphql/nodes/representation.py index e12d1bb3f..579e2f68e 100644 --- a/ayon_server/graphql/nodes/representation.py +++ b/ayon_server/graphql/nodes/representation.py @@ -38,6 +38,7 @@ class RepresentationNode(BaseNode): attrib: RepresentationAttribType all_attrib: str data: str | None + traits: str | None # GraphQL specifics @@ -107,6 +108,7 @@ def representation_from_record( updated_at=record["updated_at"], context=json_dumps(data.get("context", {})), files=parse_files(record.get("files", [])), + traits=json_dumps(record["traits"]) if record["traits"] else None, ) diff --git a/ayon_server/graphql/resolvers/representations.py b/ayon_server/graphql/resolvers/representations.py index 6af11a38e..7d30cec4a 100644 --- a/ayon_server/graphql/resolvers/representations.py +++ b/ayon_server/graphql/resolvers/representations.py @@ -62,6 +62,7 @@ async def get_representations( "representations.creation_order AS creation_order", "representations.files AS files", # TODO: query conditionally "representations.data AS data", + "representations.traits AS traits", ] sql_joins = []