Skip to content

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

Drop unused DistinctFilterSet from checkout endpoints

Artur Smęt10da2215ae97
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py
index 74bd27aeb8..4508cfaf0e 100644
--- a/saleor/graphql/api.py
+++ b/saleor/graphql/api.py
@@ -75,11 +75,9 @@ class Query(ProductQueries):
Checkout, description='Single checkout',
token=graphene.Argument(graphene.UUID))
checkouts = DjangoFilterConnectionField(
- Checkout, description='List of checkouts',
- filterset_class=DistinctFilterSet)
+ Checkout, description='List of checkouts')
checkout_lines = DjangoFilterConnectionField(
- CheckoutLine, description='List of checkout lines',
- filterset_class=DistinctFilterSet)
+ CheckoutLine, description='List of checkout lines')
checkout_line = graphene.Field(CheckoutLine, id=graphene.Argument(graphene.ID))
menu = graphene.Field(
Menu, id=graphene.Argument(graphene.ID),
diff --git a/saleor/graphql/checkout/types.py b/saleor/graphql/checkout/types.py
index 1e4adfe1dc..12c045ef9f 100644
--- a/saleor/graphql/checkout/types.py
+++ b/saleor/graphql/checkout/types.py
@@ -15,6 +15,8 @@ class CheckoutLine(CountableDjangoObjectType):
description = 'Represents user address data.'
interfaces = [graphene.relay.Node]
model = models.CartLine
+ filter_fields = ['id']
+
def resolve_total_price(self, info):
taxes = get_taxes_for_address(self.cart.shipping_address)
@@ -34,6 +36,7 @@ class Checkout(CountableDjangoObjectType):
description = 'Checkout object'
model = models.Cart
interfaces = [graphene.relay.Node]
+ filter_fields = ['token']
def resolve_total_price(self, info):
taxes = get_taxes_for_address(self.shipping_address)
diff --git a/saleor/graphql/payment/types.py b/saleor/graphql/payment/types.py
index d84a9a3f45..c5c83ae606 100644
--- a/saleor/graphql/payment/types.py
+++ b/saleor/graphql/payment/types.py
@@ -11,9 +11,11 @@ class PaymentMethod(CountableDjangoObjectType):
description = 'Payment method'
interfaces = [relay.Node]
model = models.PaymentMethod
+ filter_fields = ['id']
class Transaction(CountableDjangoObjectType):
class Meta:
description = 'Single payment transaction'
interfaces = [relay.Node]
model = models.Transaction
+ filter_fields = ['id']