It seems that an edge, within the connection edges, cannot be marked as NonNull. I believe this is the result of https://github.com/graphql-python/graphene/blob/master/graphene/relay/connection.py#L103 where the edges field is hard coded to NonNull(List(edge)).
...
"edges",
Field(
NonNull(List(edge)),
description="Contains the nodes in this connection.",
),
...
This request is motivated by the following use case where we have a collection of objects, which we can guarantee are never null.
See the following for a contrived example:
type PostConnection {
pageInfo: PageInfo!
edges: [PostEdge]!
}
Since we know that a PostEdge, if found, will never be null we would like to be able to specify the following:
type PostConnection {
pageInfo: PageInfo!
edges: [PostEdge!]!
}
It seems that an edge, within the connection edges, cannot be marked as
NonNull. I believe this is the result of https://github.com/graphql-python/graphene/blob/master/graphene/relay/connection.py#L103 where theedgesfield is hard coded toNonNull(List(edge)).This request is motivated by the following use case where we have a collection of objects, which we can guarantee are never
null.See the following for a contrived example:
Since we know that a
PostEdge, if found, will never benullwe would like to be able to specify the following: