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

enhance(federation): optimize the delegation stage, and remove extra subgraph calls when possible #6175

Merged
merged 6 commits into from
May 17, 2024

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented May 13, 2024

If there is a subschema with some selection set, and another with some other selection set.
After the calculation of delegation stage, if one subschema can cover the other selection set as well, then we can merge the two selection sets into one, and remove the other subschema from the stage.

Copy link

changeset-bot bot commented May 13, 2024

🦋 Changeset detected

Latest commit: 4285984

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

This PR includes changesets to release 2 packages
Name Type
@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 13, 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/stitch 9.2.9-alpha-20240516081901-428598465ee326098eddbc2163902943659556ce npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented May 13, 2024

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 316       ✗ 0  
     data_received..................: 37 MB   3.7 MB/s
     data_sent......................: 135 kB  14 kB/s
     http_req_blocked...............: avg=4.6µs    min=2.22µs   med=2.9µs    max=232µs    p(90)=4.09µs   p(95)=4.54µs  
     http_req_connecting............: avg=978ns    min=0s       med=0s       max=154.59µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=58.97ms  min=50.98ms  med=56.42ms  max=149.39ms p(90)=62.92ms  p(95)=86.71ms 
       { expected_response:true }...: avg=58.97ms  min=50.98ms  med=56.42ms  max=149.39ms p(90)=62.92ms  p(95)=86.71ms 
     http_req_failed................: 0.00%   ✓ 0         ✗ 158
     http_req_receiving.............: avg=134.72µs min=110.98µs med=130.66µs max=304.71µs p(90)=152.73µs p(95)=165.94µs
     http_req_sending...............: avg=26.42µs  min=17.87µs  med=25.94µs  max=69.91µs  p(90)=31.66µs  p(95)=36.66µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=58.81ms  min=50.82ms  med=56.26ms  max=149.02ms p(90)=62.73ms  p(95)=86.56ms 
     http_reqs......................: 158     15.762871/s
     iteration_duration.............: avg=63.41ms  min=54.7ms   med=60.47ms  max=154.88ms p(90)=73.5ms   p(95)=90.88ms 
     iterations.....................: 158     15.762871/s
     vus............................: 1       min=1       max=1
     vus_max........................: 1       min=1       max=1

Copy link
Contributor

github-actions bot commented May 13, 2024

💻 Website Preview

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

@ardatan ardatan requested a review from enisdenjo May 15, 2024 14:48
@ardatan ardatan force-pushed the optimization-awareness-of-other-fields branch from 1374df7 to 57f0a5a Compare May 16, 2024 08:16
@ardatan ardatan merged commit 0827497 into master May 17, 2024
30 checks passed
@ardatan ardatan deleted the optimization-awareness-of-other-fields branch May 17, 2024 13:29
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.

None yet

2 participants