-
Notifications
You must be signed in to change notification settings - Fork 259
refactor: store __typename in value instead of separate entity #2626
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
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
|
Report | Mon, August 26, 2024 at 10:40:34 UTC |
Project | tailcall |
Branch | 2626/merge |
Testbed | benchmarking-runner |
🚨 3 ALERTS: Threshold Boundary Limits exceeded!
Benchmark | Measure (units) | View | Value | Lower Boundary | Upper Boundary |
---|---|---|---|---|---|
input/vars.missing | Latency (nanoseconds (ns)) | 🚨 (view plot | view alert) | 11.45 (+32.49%) | 11.12 (102.99%) | |
synth_nested_borrow | Latency (nanoseconds (ns)) | 🚨 (view plot | view alert) | 70,359.00 (+93.68%) | 67,839.56 (103.71%) | |
test_handle_request_jit | Latency (nanoseconds (ns)) | 🚨 (view plot | view alert) | 140,560.00 (+36.20%) | 131,729.87 (106.70%) |
Click to view all benchmark results
Benchmark | Latency | Latency Results nanoseconds (ns) | (Δ%) | Latency Upper Boundary nanoseconds (ns) | (%) |
---|---|---|---|
from_json_bench | ✅ (view plot) | 6,227,400.00 (-0.42%) | 6,867,035.10 (90.69%) |
group_by | ✅ (view plot) | 481.18 (-2.82%) | 536.18 (89.74%) |
input/args.missing | ✅ (view plot) | 25.48 (-0.74%) | 28.47 (89.48%) |
input/args.nested.existing | ✅ (view plot) | 46.01 (-3.09%) | 55.60 (82.74%) |
input/args.nested.missing | ✅ (view plot) | 38.65 (-0.16%) | 40.83 (94.65%) |
input/args.root | ✅ (view plot) | 43.36 (-0.65%) | 52.69 (82.30%) |
input/headers.existing | ✅ (view plot) | 32.65 (+3.39%) | 34.08 (95.80%) |
input/headers.missing | ✅ (view plot) | 31.62 (+3.21%) | 33.44 (94.54%) |
input/value.missing | ✅ (view plot) | 23.36 (-0.07%) | 24.65 (94.75%) |
input/value.nested.existing | ✅ (view plot) | 42.26 (-1.06%) | 45.78 (92.31%) |
input/value.nested.missing | ✅ (view plot) | 34.80 (-5.68%) | 39.71 (87.65%) |
input/value.root | ✅ (view plot) | 38.82 (+1.30%) | 41.08 (94.51%) |
input/vars.existing | ✅ (view plot) | 8.37 (+1.81%) | 9.74 (85.91%) |
input/vars.missing | 🚨 (view plot | view alert) | 11.45 (+32.49%) | 11.12 (102.99%) |
synth_nested | ✅ (view plot) | 127,440.00 (+27.47%) | 195,838.58 (65.07%) |
synth_nested_borrow | 🚨 (view plot | view alert) | 70,359.00 (+93.68%) | 67,839.56 (103.71%) |
test_batched_body | ✅ (view plot) | 1,902.80 (-6.54%) | 2,475.66 (76.86%) |
test_batched_body #2 | ✅ (view plot) | 1,495,600.00 (-7.68%) | 1,765,041.42 (84.73%) |
test_data_loader | ✅ (view plot) | 422,320.00 (+3.41%) | 477,732.38 (88.40%) |
test_handle_request | ✅ (view plot) | 129,690.00 (-9.71%) | 153,862.84 (84.29%) |
test_handle_request_jit | 🚨 (view plot | view alert) | 140,560.00 (+36.20%) | 131,729.87 (106.70%) |
test_http_execute_method | ✅ (view plot) | 14,286.00 (-2.73%) | 16,828.64 (84.89%) |
with_mustache_expressions | ✅ (view plot) | 1,088.20 (-2.32%) | 1,184.77 (91.85%) |
with_mustache_literal | ✅ (view plot) | 691.28 (-3.47%) | 769.96 (89.78%) |
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>