diff options
author | Marcin Gębala <maarcin.gebala@gmail.com> | 2017-01-11 15:16:55 +0100 |
---|---|---|
committer | Marcin Gębala <maarcin.gebala@gmail.com> | 2017-01-11 15:16:55 +0100 |
commit | 43b583ad51981cd8529ddb3546112afa604c5f6c (patch) | |
tree | 3c85a17b021e7e90327a888bc86f730ef9b02784 /saleor/graphql | |
parent | 6bc84c66e02d16a78470951adbc91ea8c88d0c4b (diff) | |
download | saleor-frontend-43b583ad51981cd8529ddb3546112afa604c5f6c.tar.gz saleor-frontend-43b583ad51981cd8529ddb3546112afa604c5f6c.tar.bz2 saleor-frontend-43b583ad51981cd8529ddb3546112afa604c5f6c.zip |
Remove unused connection with count
Diffstat (limited to 'saleor/graphql')
-rw-r--r-- | saleor/graphql/api.py | 3 | ||||
-rw-r--r-- | saleor/graphql/utils.py | 14 |
2 files changed, 0 insertions, 17 deletions
diff --git a/saleor/graphql/api.py b/saleor/graphql/api.py index 170e26ba..e59b6002 100644 --- a/saleor/graphql/api.py +++ b/saleor/graphql/api.py @@ -65,9 +65,6 @@ class ProductType(DjangoObjectType): return ProductAvailabilityType(**a._asdict()) -ProductType.Connection = connection_with_count(ProductType) - - class CategoryType(DjangoObjectType): products = DjangoConnectionField( ProductType, diff --git a/saleor/graphql/utils.py b/saleor/graphql/utils.py index f8190695..e08e2bdf 100644 --- a/saleor/graphql/utils.py +++ b/saleor/graphql/utils.py @@ -29,20 +29,6 @@ class DjangoPkInterface(graphene.Interface): return self.pk -def connection_with_count(_type): - class Connection(graphene.relay.Connection): - total_count = graphene.Int() - - class Meta: - name = _type._meta.name + 'Connection' - node = _type - - def resolve_total_count(self, args, context, info): - return len(self.edges) - - return Connection - - def get_object_or_none(klass, *args, **kwargs): queryset = _get_queryset(klass) try: |