graphql-python / graphql-python/graphene-django

Resolving DjangoConnectionField when return None

Open
#1,329 1 comment 2 reactions 0 assignees View on GitHub
wontfix
Dominant language
Python
Stars
4.4k
Forks
760
PR merge metrics
No merged PRs in 30d

Description

* **What is the current behavior?**
DjangoConnectionField resolves all objects of the requested DjangoObjectTypeNode when we return none in the resolver!

* **Steps to reproduce:**
```
class Query(object):
test = DjangoConnectionField(SomeNode)

def resolve_test(self, info, **kwargs):
return None
```

* **What is the expected behavior?**
Should return an empty edges-nodes

* **Please tell us about your environment:**
- Version: 2.15.0

* **Notes:**
Same behavior in mutations

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.