Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add resolve type to Job interface

IKarbowiak773fe81e2282
diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
index 8f37dfd8f2..85ccfa88de 100644
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -288,3 +288,8 @@ class Job(graphene.Interface):
updated_at = graphene.DateTime(
description="Date time of job last update in ISO 8601 format.", required=True
)
+
+ @classmethod
+ def resolve_type(cls, instance, _info):
+ MODEL_TO_TYPE_MAP = {}
+ return MODEL_TO_TYPE_MAP.get(type(instance))