Skip to content

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

Use DjangoConnectionField with connections

Marcin Gębala6bc84c66e02d
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py
index 00173fab0b..170e26ba8f 100644
--- a/saleor/graphql/api.py
+++ b/saleor/graphql/api.py
@@ -4,7 +4,7 @@ import operator
from django.db.models import Q
from graphene import relay
-from graphene_django import DjangoObjectType
+from graphene_django import DjangoObjectType, DjangoConnectionField
from graphene_django.debug import DjangoDebug
from ..product.models import (AttributeChoiceValue, Category, Product,
@@ -69,7 +69,7 @@ ProductType.Connection = connection_with_count(ProductType)
class CategoryType(DjangoObjectType):
- products = relay.ConnectionField(
+ products = DjangoConnectionField(
ProductType,
attributes=graphene.Argument(
graphene.List(AttributesFilterScalar),