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

feat(delegate): deduplicate upstream documents #6138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented May 3, 2024

Deduplicate fields, inline fragment spreads and fragment spreads before sending the operation document to the subschema

See tests for the use cases

Copy link

changeset-bot bot commented May 3, 2024

🦋 Changeset detected

Latest commit: c788f54

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

This PR includes changesets to release 1 package
Name Type
@graphql-tools/delegate 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 3, 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-20240506182333-c8a65aadee77b3e4333990aebbd0ab408f2cbd68 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented May 3, 2024

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 326       ✗ 0  
     data_received..................: 38 MB   3.8 MB/s
     data_sent......................: 140 kB  14 kB/s
     http_req_blocked...............: avg=4.33µs   min=2.12µs   med=2.88µs  max=194.19µs p(90)=4.15µs   p(95)=4.64µs  
     http_req_connecting............: avg=764ns    min=0s       med=0s      max=124.68µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=57.05ms  min=48.19ms  med=53.66ms max=154.81ms p(90)=62.51ms  p(95)=85.69ms 
       { expected_response:true }...: avg=57.05ms  min=48.19ms  med=53.66ms max=154.81ms p(90)=62.51ms  p(95)=85.69ms 
     http_req_failed................: 0.00%   ✓ 0         ✗ 163
     http_req_receiving.............: avg=136.67µs min=106.78µs med=128.8µs max=433.93µs p(90)=149.02µs p(95)=160.59µs
     http_req_sending...............: avg=25.24µs  min=19.13µs  med=24.05µs max=56.74µs  p(90)=30.08µs  p(95)=33.45µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s      max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=56.88ms  min=48.05ms  med=53.51ms max=154.46ms p(90)=62.33ms  p(95)=85.54ms 
     http_reqs......................: 163     16.280437/s
     iteration_duration.............: avg=61.4ms   min=52.23ms  med=57.8ms  max=159.86ms p(90)=70.08ms  p(95)=89.69ms 
     iterations.....................: 163     16.280437/s
     vus............................: 1       min=1       max=1
     vus_max........................: 1       min=1       max=1

Copy link
Contributor

github-actions bot commented May 3, 2024

💻 Website Preview

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

@ardatan ardatan marked this pull request as ready for review May 3, 2024 22:43
@ardatan ardatan marked this pull request as draft May 5, 2024 02:29
@ardatan ardatan marked this pull request as ready for review May 6, 2024 18:08
Changeset

Fix tests

Deduplicate more

Test recursive spreads

Fix tests

Nested

Refactor

Use the new algo in more places
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