feat: Unions can query() without type discriminator - #3558
Merged
Conversation
🦋 Changeset detectedLatest commit: 6059510 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3558 +/- ##
=======================================
Coverage 98.26% 98.26%
=======================================
Files 130 130
Lines 2245 2249 +4
Branches 452 453 +1
=======================================
+ Hits 2206 2210 +4
Misses 10 10
Partials 29 29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Size Change: +11 B (+0.01%) Total Size: 77.7 kB ℹ️ View Unchanged
|
Contributor
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: 6059510 | Previous: beaa03e | Ratio |
|---|---|---|---|
normalizeLong |
528 ops/sec (±1.42%) |
529 ops/sec (±1.21%) |
1.00 |
denormalizeLong |
282 ops/sec (±3.42%) |
275 ops/sec (±2.81%) |
0.98 |
denormalizeLong donotcache |
1032 ops/sec (±1.00%) |
996 ops/sec (±0.28%) |
0.97 |
denormalizeShort donotcache 500x |
1627 ops/sec (±0.14%) |
1609 ops/sec (±0.17%) |
0.99 |
denormalizeShort 500x |
863 ops/sec (±1.70%) |
865 ops/sec (±1.70%) |
1.00 |
denormalizeShort 500x withCache |
6744 ops/sec (±0.16%) |
6361 ops/sec (±0.16%) |
0.94 |
queryShort 500x withCache |
2763 ops/sec (±1.13%) |
2705 ops/sec (±0.09%) |
0.98 |
buildQueryKey All |
55263 ops/sec (±0.42%) |
55207 ops/sec (±0.45%) |
1.00 |
query All withCache |
8217 ops/sec (±0.37%) |
6693 ops/sec (±0.57%) |
0.81 |
denormalizeLong with mixin Entity |
282 ops/sec (±1.97%) |
352 ops/sec (±0.58%) |
1.25 |
denormalizeLong withCache |
7160 ops/sec (±0.15%) |
6774 ops/sec (±0.20%) |
0.95 |
denormalizeLong All withCache |
8076 ops/sec (±0.15%) |
6409 ops/sec (±0.13%) |
0.79 |
denormalizeLong Query-sorted withCache |
8356 ops/sec (±0.18%) |
6756 ops/sec (±0.09%) |
0.81 |
denormalizeLongAndShort withEntityCacheOnly |
1724 ops/sec (±0.19%) |
1701 ops/sec (±0.21%) |
0.99 |
getResponse |
5774 ops/sec (±1.44%) |
5614 ops/sec (±1.41%) |
0.97 |
getResponse (null) |
7202164 ops/sec (±1.09%) |
7044933 ops/sec (±0.80%) |
0.98 |
getResponse (clear cache) |
278 ops/sec (±1.87%) |
346 ops/sec (±0.52%) |
1.24 |
getSmallResponse |
3120 ops/sec (±0.22%) |
3098 ops/sec (±0.12%) |
0.99 |
getSmallInferredResponse |
2366 ops/sec (±0.14%) |
2308 ops/sec (±0.12%) |
0.98 |
getResponse Collection |
5643 ops/sec (±1.44%) |
5643 ops/sec (±1.47%) |
1 |
get Collection |
5624 ops/sec (±0.22%) |
5847 ops/sec (±0.65%) |
1.04 |
get Query-sorted |
6455 ops/sec (±0.40%) |
5381 ops/sec (±0.23%) |
0.83 |
setLong |
529 ops/sec (±0.25%) |
540 ops/sec (±0.20%) |
1.02 |
setLongWithMerge |
240 ops/sec (±1.22%) |
241 ops/sec (±0.25%) |
1.00 |
setLongWithSimpleMerge |
261 ops/sec (±0.29%) |
253 ops/sec (±0.87%) |
0.97 |
setSmallResponse 500x |
933 ops/sec (±0.32%) |
934 ops/sec (±0.22%) |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
ntucker
force-pushed
the
union-query
branch
5 times, most recently
from
October 5, 2025 18:40
ae40d2d to
dddc16e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Sometimes you don't have the discriminator, but there's no reason you can't still useQuery
Solution
Before
After