graphql-relay-tools
graphql-relay-tools copied to clipboard
Make edges and edge type non-nullable
I'd like to generate a schema like this:
type Connection {
edges: [Edge!]!
pageInfo: PageInfo!
}
Specifying that edges will never be null, and that the array will never contain nulls. We are generating reasonml types from our graphql schema, so it would be very nice to not have to handle nulls at all, and know that the server will always return an array for edges.
This could be an option to connectionDefinitions
, in order not to break backwards compat.
WDYT? I can create a PR if this sounds like something you would like to support?
Alas this isn't what the spec says, a few years ago I tried getting the spec changed but it might be too late to do that now