Skip to content

fix(gate): make __typename returns the variant name on unions#838

Merged
Natoandro merged 1 commit into
mainfrom
met-642-typename-on-union
Sep 5, 2024
Merged

fix(gate): make __typename returns the variant name on unions#838
Natoandro merged 1 commit into
mainfrom
met-642-typename-on-union

Conversation

@Natoandro
Copy link
Copy Markdown
Contributor

  • Add missing implementation for static injection for parameter transformations on the typegate
  • Solves MET-642: Fix the __typename result on union variants: return the variant name instead of the parent type name

Migration notes

N/A

Checklist

  • The change comes with new or modified tests
  • Hard-to-understand functions have explanatory comments
  • End-user documentation is updated to reflect the change

@linear
Copy link
Copy Markdown

linear Bot commented Sep 5, 2024

Comment thread tests/typename/typename_test.ts
@Natoandro Natoandro changed the title fix typename for union selections fix(gate): make __typename returns the variant name on unions Sep 5, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.75%. Comparing base (67c1d0f) to head (aeb84e7).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...pegate/src/engine/planner/parameter_transformer.ts 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
- Coverage   75.95%   75.75%   -0.21%     
==========================================
  Files         144      144              
  Lines       16696    16714      +18     
  Branches     1639     1637       -2     
==========================================
- Hits        12682    12662      -20     
- Misses       3991     4029      +38     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@j03-dev j03-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Natoandro Natoandro merged commit c918cf6 into main Sep 5, 2024
@Natoandro Natoandro deleted the met-642-typename-on-union branch September 5, 2024 11:21
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

Successfully merging this pull request may close these issues.

4 participants