graphql-python / graphql-python/graphene-django

DjangoConnectionField should have non-null edge and node types

Open
#901 8 comments 8 reactions 0 assignees View on GitHub
✨enhancement
Dominant language
Python
Stars
4.4k
Forks
760
PR merge metrics
No merged PRs in 30d

Description

There's been a bit of discussion around this in #566 and #560 , but I really think this should get another look.

Currently `DjangoConnectionField`'s `edges` property is required, but the types inside are not:

```
edges: [EdgeType]!
```

Given how `DjangoConnectionField` works, it's not really possible for `EdgeType` to be optional. It should look like this:

```
edges: [EdgeType!]!
```

And then if you look at the `EdgeType` itself, `node` is optional:

```
node: NodeType
```

But that also is never going to happen. It should be required:

```
node: NodeType!
```

Before I start digging and open a PR, are these assumptions correct? Or am I missing something?

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.