You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to dig through this to figure it out, and I apologize if there's a good reason for this.
It seems to me that a paginated connection (e.g. DjangoConnectionField or DjangoFilterConnectionField) always has edges and nodes. What's the use case for these being nullable?
The reason I bring this up is because, when using TypeScript with the generated schema, it results in lengthy checks like this:
If you follow the class, Field.required defaults to False, and it's not specified there. But I'm not very expert on the Graphene codebase so don't hold me to it :-)
pcraciunoiu
changed the title
Why are edges and nodes optional?
Why are nodes optional?
May 9, 2020
I was trying to dig through this to figure it out, and I apologize if there's a good reason for this.
It seems to me that a paginated connection (e.g.
DjangoConnectionField
orDjangoFilterConnectionField
) always has edges and nodes. What's the use case for these being nullable?The reason I bring this up is because, when using TypeScript with the generated schema, it results in lengthy checks like this:
As far as I can tell this is set up here:
https://github.com/graphql-python/graphql-relay-py/blob/master/graphql_relay/connection/connection.py#L44
Could there be
required
on edges/nodes? At least as an option it'd be a breaking change. Right now I'm not sure how to override this.The text was updated successfully, but these errors were encountered: