ardatan / graphql-tools

:wrench: Utility library for GraphQL to build, stitch and mock GraphQL schemas in the SDL-first approach
https://www.graphql-tools.com
MIT License
5.35k stars 818 forks source link

Cancel SSE stream even while waiting for next event #6658

Closed enisdenjo closed 2 weeks ago

enisdenjo commented 2 weeks ago

SSE stream generator from the HTTP executor was not returning while waiting for next event. The return would just get stuck and never resolve.

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 2ac9e1050169794e41701eb759bd949d0733c31a

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

This PR includes changesets to release 6 packages | Name | Type | | ---------------------------- | ----- | | @graphql-tools/executor-http | Patch | | @graphql-tools/federation | Patch | | @graphql-tools/github-loader | Patch | | @graphql-tools/url-loader | Patch | | federation-benchmark | Patch | | @graphql-tools/prisma-loader | 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

theguild-bot commented 2 weeks ago

🚀 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/executor-http 1.1.8-alpha-20241108150005-2ac9e1050169794e41701eb759bd949d0733c31a npm ↗︎ unpkg ↗︎
@graphql-tools/federation 2.2.26-alpha-20241108150005-2ac9e1050169794e41701eb759bd949d0733c31a npm ↗︎ unpkg ↗︎
@graphql-tools/github-loader 8.0.3-alpha-20241108150005-2ac9e1050169794e41701eb759bd949d0733c31a npm ↗︎ unpkg ↗︎
@graphql-tools/prisma-loader 8.0.16-alpha-20241108150005-2ac9e1050169794e41701eb759bd949d0733c31a npm ↗︎ unpkg ↗︎
@graphql-tools/url-loader 8.0.14-alpha-20241108150005-2ac9e1050169794e41701eb759bd949d0733c31a npm ↗︎ unpkg ↗︎
github-actions[bot] commented 2 weeks ago

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 324       ✗ 0  
     data_received..................: 38 MB   3.8 MB/s
     data_sent......................: 139 kB  14 kB/s
     http_req_blocked...............: avg=4.42µs   min=2.09µs   med=2.81µs   max=189.36µs p(90)=4.22µs   p(95)=4.54µs  
     http_req_connecting............: avg=792ns    min=0s       med=0s       max=128.33µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=57.39ms  min=49.03ms  med=53.73ms  max=153.46ms p(90)=64ms     p(95)=89.12ms 
       { expected_response:true }...: avg=57.39ms  min=49.03ms  med=53.73ms  max=153.46ms p(90)=64ms     p(95)=89.12ms 
     http_req_failed................: 0.00%   ✓ 0         ✗ 162
     http_req_receiving.............: avg=136.79µs min=103.87µs med=130.31µs max=333.33µs p(90)=154.63µs p(95)=169.15µs
     http_req_sending...............: avg=25.9µs   min=19.9µs   med=25.07µs  max=77.9µs   p(90)=30.96µs  p(95)=35.78µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=57.23ms  min=48.85ms  med=53.58ms  max=153.08ms p(90)=63.85ms  p(95)=88.95ms 
     http_reqs......................: 162     16.171391/s
     iteration_duration.............: avg=61.81ms  min=52.95ms  med=58.07ms  max=160.34ms p(90)=70.66ms  p(95)=93.44ms 
     iterations.....................: 162     16.171391/s
     vus............................: 1       min=1       max=1
     vus_max........................: 1       min=1       max=1
github-actions[bot] commented 2 weeks ago
### 💻 Website Preview The latest changes are available as preview in: [https://7c904056.graphql-tools.pages.dev](https://7c904056.graphql-tools.pages.dev)