How to set NonNull to node and edges in connection class?

225 Views Asked by At

I'd like to add NonNull to node and edges in connection.

class TestSchema(SQLAlchemyObjectType):
    class Meta:
        model = Test
        interfaces = (relay.Node,)
    id = graphene.ID(required=True)

when I looked at document explorer in Graphql playground,

in TestSchemaConnection

edges: [TestSchemaEdge]!

and in TestSchemaEdge

node: TestSchema

But I want "!" inside brackets not to be nullable like below.

edges: [TestSchemaEdge!]! 

node: TestSchema!

Is there a way to do this?

1

There are 1 best solutions below

1
On

I believe this is not possible, as of: https://github.com/graphql-python/graphene/issues/968

Seems like it is addressed as an issue, but not worked on.