In order to use interfaces as a return type, I have to explicitly include all of the types implementing the interface via the types argument in strawberry.Schema in order for those types to be included in the schema. This is inconvenient. I would like for strawberry to automatically detect these types for me (e.g., by looking for __subclasses__ of the implementing type), or at least have utilities that make this easier.
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
In order to use interfaces as a return type, I have to explicitly include all of the types implementing the interface via the
types
argument instrawberry.Schema
in order for those types to be included in the schema. This is inconvenient. I would like for strawberry to automatically detect these types for me (e.g., by looking for__subclasses__
of the implementing type), or at least have utilities that make this easier.Upvote & Fund