Skip to content

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

Do not query collection by slug

Adam Janik4d1ae2177eeb
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py
index 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.py
index 4cf3c3fdd3..98ef47bf37 100644
--- a/saleor/graphql/product/resolvers.py
+++ b/saleor/graphql/product/resolvers.py
@@ -3,7 +3,7 @@ from django.db.models import Q
from ...product import models
from ...product.utils import products_visible_to_user
from ..utils import get_node
-from .types import Category, SelectedAttribute
+from .types import Category
def 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 master
return models.Collection.objects.all()