Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Do not query collection by slug
Adam Janik4d1ae2177eeb
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.pyindex 5cb9a8c87f..657c14c62b 100644--- a/saleor/graphql/api.py+++ b/saleor/graphql/api.py@@ -41,7 +41,7 @@ class Query(graphene.ObjectType):Category, id=graphene.Argument(graphene.ID),description='Lookup a category by ID.')collection = graphene.Field(- Collection, id=graphene.Argument(graphene.ID), slug=graphene.String(),+ Collection, id=graphene.Argument(graphene.ID),description='Lookup a collection by ID.')collections = DjangoFilterConnectionField(Collection, description='List of the shop\'s collections.')diff --git a/saleor/graphql/product/resolvers.py b/saleor/graphql/product/resolvers.pyindex 4cf3c3fdd3..98ef47bf37 100644--- a/saleor/graphql/product/resolvers.py+++ b/saleor/graphql/product/resolvers.py@@ -3,7 +3,7 @@ from django.db.models import Qfrom ...product import modelsfrom ...product.utils import products_visible_to_userfrom ..utils import get_node-from .types import Category, SelectedAttribute+from .types import Categorydef resolve_attributes(category_id, info):@@ -33,6 +33,7 @@ def resolve_categories(info, level=None):def resolve_collections(info):+ # FIXME: Return collections based on user after rebasing to masterreturn models.Collection.objects.all()