Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it automatic to include types implementing an interface in the graphql schema #3684

Open
axiomofjoy opened this issue Oct 31, 2024 · 1 comment

Comments

@axiomofjoy
Copy link

axiomofjoy commented Oct 31, 2024

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.
Fund with Polar
@erikwrede
Copy link
Member

Interesting idea! I built a quick PoC in #3686. However, it won't be as easy as depicted there to implement this. Taking the discussion to discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants