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

Skip optimised check when returning generic types #2955

Merged
merged 1 commit into from
Jul 15, 2023

Conversation

patrick91
Copy link
Member

Closes #2954

There's probably a better way to do this :) but I'm happy to do that in another PR.

@patrick91 patrick91 requested a review from skilkis July 15, 2023 09:30
@codecov
Copy link

codecov bot commented Jul 15, 2023

Codecov Report

Merging #2955 (892e4d5) into main (18f8b44) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2955   +/-   ##
=======================================
  Coverage   96.11%   96.11%           
=======================================
  Files         211      211           
  Lines        9242     9244    +2     
  Branches     1491     1492    +1     
=======================================
+ Hits         8883     8885    +2     
  Misses        229      229           
  Partials      130      130           

@patrick91
Copy link
Member Author

One way to make this better could be to add some metadata when doing things like this: Real[int](y=0) (class_getitem could use that)

but it won't fix the cases where some one does Real(y=0), I'm sure we have some code that checks the right type somewhere though 😊

@botberry
Copy link
Member

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This release fixes a bug where returning a generic type from a field
that was returning an interface would throw an error.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to @patrick91 for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 15, 2023

CodSpeed Performance Report

Merging #2955 will not alter performance

Comparing interface-missing-type (892e4d5) with main (18f8b44)

Summary

✅ 5 untouched benchmarks

@patrick91 patrick91 merged commit 5393eed into main Jul 15, 2023
39 checks passed
@patrick91 patrick91 deleted the interface-missing-type branch July 15, 2023 09:59
etripier pushed a commit to Greenbax/strawberry that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression using interfaces with generic types.
2 participants