-
Notifications
You must be signed in to change notification settings - Fork 237
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
refactor: store __typename in value instead of separate entity #2626
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2626 +/- ##
==========================================
- Coverage 86.46% 86.31% -0.15%
==========================================
Files 255 256 +1
Lines 24972 24999 +27
==========================================
- Hits 21593 21579 -14
- Misses 3379 3420 +41 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay
Bencher
🚨 3 ALERTS: Threshold Boundary Limits exceeded!
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Action required: PR inactive for 5 days. |
Summary:
Refactor the way the value of
__typename
is stored along the data value itself. Usually,__typename
is already provided byasync_graphql
library, but in some cases we need to resolve it on our side, like for union types.Previously, special wrapper type
TypeName
was used to resolve this type and it was stored in theEvaluationContext
and propagated to the async_graphql/jit implementation either through context or other wrapper types to implement the fragments logic and to provide field__typename
itself.Because field
__typename
is actually part of the values in graphQL I think it's reasonable to store that type info inside the property__typename
for values we have (currently, only for union types since for other cases the typename could be inferred from the schema).To implement this change, following code was changed:
Issue Reference(s):
Fixes #... (Replace "..." with the issue number)
Build & Testing:
cargo test
successfully../lint.sh --mode=fix
to fix all linting issues raised by./lint.sh --mode=check
.Checklist:
<type>(<optional scope>): <title>