Skip to content

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

Add documentation for products arguments

Marcin Gębala1bf92c216c13
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py
index 4feaf32f99..fd2afb79f3 100644
--- a/saleor/graphql/api.py
+++ b/saleor/graphql/api.py
@@ -49,10 +49,20 @@ class CategoryType(DjangoObjectType):
url = graphene.String()
products = relay.ConnectionField(
ProductType,
- attributes=graphene.List(AttributesFilterScalar),
- order_by=graphene.String(),
- price_lte=graphene.Float(),
- price_gte=graphene.Float())
+ attributes=graphene.Argument(
+ graphene.List(AttributesFilterScalar),
+ description="""A list of attribute:value pairs to filter
+ the products by"""),
+ order_by=graphene.Argument(
+ graphene.String,
+ description="""A name of field to sort the products by. The negative
+ sign in front of name implies descending order."""),
+ price_lte=graphene.Argument(
+ graphene.Float, description="""Get the products with price lower
+ than or equal to the given value"""),
+ price_gte=graphene.Argument(
+ graphene.Float, description="""Get the products with price greater
+ than or equal to the given value"""))
class Meta:
model = Category