Consider the code
@strawberry.type
class Sub:
node: relay.Node = relay.node()
nodes: list[relay.Node] = relay.node()
@strawberry.type
class Query:
@strawberry.field
@staticmethod
def sub():
return Sub
schema = Schema(query=Query)
This code should work but doesn't, it requires an initialization for node
Note there is a workaround (initialization with None or empty list, or (I think whatever))
...
@strawberry.field
@staticmethod
def sub():
return Sub(node=None, nodes=None)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too