Skip to content

DjangoConnectionField should have non-null edge and node types #901

@jarcoal

Description

@jarcoal

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions