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

UnallowedReturnTypeForUnion Error thrown when having a response of Union Type and using Generics since 0.229.0 release #3501

Closed
jibujacobamboss opened this issue May 15, 2024 · 2 comments · Fixed by #3502
Labels
bug Something isn't working

Comments

@jibujacobamboss
Copy link

jibujacobamboss commented May 15, 2024

Describe the Bug

UnallowedReturnTypeForUnion Error thrown when having a response of Union Type and using Generics(with interface) since 0.229.0 release.
Sharing the playground link showing the error for ease of replication.

This was a feature which was working but seems like it broke with the 0.229.0 release

System Information

  • Operating system:
  • Strawberry version (if applicable): 0.229.0

Additional Context

Playground Link : https://play.strawberry.rocks/?gist=a3c87c1b7816a2a3251cdf442b4569e1

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
@jibujacobamboss jibujacobamboss added the bug Something isn't working label May 15, 2024
patrick91 added a commit that referenced this issue May 15, 2024
patrick91 added a commit that referenced this issue May 15, 2024
* Fix generic interface inside union

Closes #3501

* Fix unrelated test

* Only check subclass if we have a type

* Fix test for 3.8

* Add release notes
@patrick91
Copy link
Member

@jibujacobamboss sorry for the issue, hopefully the new release fixes it for you 😊

@jibujacobamboss
Copy link
Author

@jibujacobamboss sorry for the issue, hopefully the new release fixes it for you 😊

Thank you for the swift fix🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants