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

Codegen generic types #3077

Merged
merged 3 commits into from
Sep 15, 2023
Merged

Conversation

mgilson
Copy link
Contributor

@mgilson mgilson commented Sep 6, 2023

Codegen currently chokes on generic types. Let's make that not happen. (My team ran in this with Pagination APIs where a Page was generic on the type of items that it contains).

Description

Simply update the name of the field that we are searching for in the schema for generic types.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@botberry
Copy link
Member

botberry commented Sep 6, 2023

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This fixes a bug where codegen would choke trying to find a field in the schema for a generic type.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to Matt Gilson for the PR 👏

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

@botberry
Copy link
Member

botberry commented Sep 6, 2023

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This fixes a bug where codegen would choke trying to find a field in the schema for a generic type.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to Matt Gilson for the PR 👏

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

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #3077 (1f18a4f) into main (2202c9e) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3077      +/-   ##
==========================================
- Coverage   96.49%   96.48%   -0.01%     
==========================================
  Files         467      467              
  Lines       29149    29163      +14     
  Branches     3585     3588       +3     
==========================================
+ Hits        28126    28137      +11     
- Misses        842      845       +3     
  Partials      181      181              

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 6, 2023

CodSpeed Performance Report

Merging #3077 will not alter performance

Comparing mgilson:codegen-generic-types (1f18a4f) with main (2202c9e)

Summary

✅ 12 untouched benchmarks

@patrick91 patrick91 merged commit ecba2c3 into strawberry-graphql:main Sep 15, 2023
57 of 59 checks passed
@mgilson mgilson deleted the codegen-generic-types branch September 15, 2023 15:27
etripier pushed a commit to Greenbax/strawberry that referenced this pull request Oct 25, 2023
Co-authored-by: Matt Gilson <mgilson@lat.ai>
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.

3 participants