I have three type.
class A(InputType):
pass
class B(InputType):
start_time = String()
class C(InputType):
start_time = String()
end_time = String()
So I hope that:
class T(Union):
class Meta:
types = (A, B, C)
the data maybe like:
{_type: A}
{_type:B, start_time: xxxx}
{_type:C, start_time:xxx, end_time: xxx}
By the way, why an ObjectType or InputType must have fields?
I have three type.
So I hope that:
the data maybe like:
By the way, why an ObjectType or InputType must have fields?