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

fix(federation/stitch/delegate): handle complex nested keys #6150

Merged
merged 9 commits into from
May 8, 2024

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented May 7, 2024

If there are some fields depending on a nested type resolution, wait until it gets resolved then resolve the rest.

See packages/federation/test/fixtures/complex-entity-call example for more details.
You can see ProductList needs some fields from Product to resolve first

Closes #6076

Copy link

changeset-bot bot commented May 7, 2024

🦋 Changeset detected

Latest commit: 763dcd7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@graphql-tools/delegate Patch
@graphql-tools/stitch Patch
federation-benchmark Patch

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

Copy link
Contributor

github-actions bot commented May 7, 2024

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-tools/delegate 10.0.10-alpha-20240508103806-763dcd798dac522d7a6cfdd08f01380eb5240ca3 npm ↗︎ unpkg ↗︎
@graphql-tools/federation 1.1.35-alpha-20240508103806-763dcd798dac522d7a6cfdd08f01380eb5240ca3 npm ↗︎ unpkg ↗︎
@graphql-tools/stitch 9.2.8-alpha-20240508103806-763dcd798dac522d7a6cfdd08f01380eb5240ca3 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented May 7, 2024

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 340       ✗ 0  
     data_received..................: 40 MB   3.9 MB/s
     data_sent......................: 146 kB  15 kB/s
     http_req_blocked...............: avg=3.97µs   min=2.08µs   med=2.59µs  max=208.87µs p(90)=3.57µs   p(95)=3.74µs  
     http_req_connecting............: avg=798ns    min=0s       med=0s      max=135.72µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=54.73ms  min=46.59ms  med=50.72ms max=156.47ms p(90)=63.65ms  p(95)=87.35ms 
       { expected_response:true }...: avg=54.73ms  min=46.59ms  med=50.72ms max=156.47ms p(90)=63.65ms  p(95)=87.35ms 
     http_req_failed................: 0.00%   ✓ 0         ✗ 170
     http_req_receiving.............: avg=131.11µs min=104.51µs med=122.1µs max=680.28µs p(90)=143.92µs p(95)=159.32µs
     http_req_sending...............: avg=24µs     min=15.58µs  med=22.14µs max=84.06µs  p(90)=28.53µs  p(95)=32.52µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s      max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=54.58ms  min=46.45ms  med=50.58ms max=156.08ms p(90)=63.49ms  p(95)=87.19ms 
     http_reqs......................: 170     16.930361/s
     iteration_duration.............: avg=59.04ms  min=50.66ms  med=54.93ms max=160.46ms p(90)=68.78ms  p(95)=91.16ms 
     iterations.....................: 170     16.930361/s
     vus............................: 1       min=1       max=1
     vus_max........................: 1       min=1       max=1

packages/delegate/src/mergeFields.ts Dismissed Show dismissed Hide dismissed
@ardatan ardatan marked this pull request as draft May 7, 2024 13:28
Copy link
Contributor

github-actions bot commented May 7, 2024

💻 Website Preview

The latest changes are available as preview in: https://b21e9462.graphql-tools.pages.dev

@ardatan ardatan marked this pull request as ready for review May 7, 2024 13:33
packages/delegate/src/defaultMergedResolver.ts Outdated Show resolved Hide resolved
packages/delegate/src/defaultMergedResolver.ts Outdated Show resolved Hide resolved
packages/delegate/src/defaultMergedResolver.ts Outdated Show resolved Hide resolved
packages/delegate/src/defaultMergedResolver.ts Outdated Show resolved Hide resolved
packages/stitch/src/createMergedTypeResolver.ts Outdated Show resolved Hide resolved
@ardatan ardatan requested a review from enisdenjo May 8, 2024 10:37
@ardatan ardatan merged commit fc9c71f into master May 8, 2024
30 checks passed
@ardatan ardatan deleted the complex-entity-calls branch May 8, 2024 11:26
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.

2 participants