[英]How to set NonNull to node and edges in connection class?
我想將 NonNull 添加到連接的節點和邊。
class TestSchema(SQLAlchemyObjectType):
class Meta:
model = Test
interfaces = (relay.Node,)
id = graphene.ID(required=True)
當我在 Graphql 操場上查看文檔資源管理器時,
在 TestSchemaConnection
edges: [TestSchemaEdge]!
並在 TestSchemaEdge
node: TestSchema
但我想要 ”。” 括號內不能為空,如下所示。
edges: [TestSchemaEdge!]!
node: TestSchema!
有沒有辦法做到這一點?
我相信這是不可能的,截至: https://github.com/graphql-python/graphene/issues/968
似乎它被作為一個問題解決,但沒有解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.