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: execution cancelation #3197

Merged
merged 27 commits into from
Mar 29, 2024
Merged

feat: execution cancelation #3197

merged 27 commits into from
Mar 29, 2024

Conversation

n1ru4l
Copy link
Collaborator

@n1ru4l n1ru4l commented Mar 9, 2024

Since @graphql-tools/executor supports aborting the execution, I wanted to add support in Yoga.

Copy link

changeset-bot bot commented Mar 9, 2024

🦋 Changeset detected

Latest commit: a0b4d86

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

This PR includes changesets to release 24 packages
Name Type
@graphql-yoga/plugin-apollo-inline-trace Major
graphql-yoga Minor
@graphql-yoga/nestjs-federation Patch
@graphql-yoga/nestjs Major
@graphql-yoga/render-graphiql Major
@graphql-yoga/plugin-apq Major
@graphql-yoga/plugin-csrf-prevention Major
@graphql-yoga/plugin-defer-stream Major
@graphql-yoga/plugin-disable-introspection Major
@graphql-yoga/plugin-graphql-sse Major
@graphql-yoga/plugin-jwt Major
@graphql-yoga/plugin-persisted-operations Major
@graphql-yoga/plugin-prometheus Major
@graphql-yoga/plugin-response-cache Major
@graphql-yoga/plugin-sofa Major
apollo-federation-gateway-with-yoga Patch
apollo-subgraph-with-yoga Patch
graphql-lambda Patch
cloudflare-advanced Patch
cloudflare Patch
functions Patch
hackernews Patch
nextjs-app Patch
hello-world-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

@n1ru4l n1ru4l changed the title feat: requets cancellation feat: request cancellation Mar 9, 2024
Copy link
Contributor

github-actions bot commented Mar 9, 2024

Apollo Federation Subgraph Compatibility Results

Federation 1 Support Federation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🟢
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more:

Copy link
Contributor

github-actions bot commented Mar 9, 2024

✅ Benchmark Results

     ✓ no_errors{mode:graphql}
     ✓ expected_result{mode:graphql}
     ✓ no_errors{mode:graphql-jit}
     ✓ expected_result{mode:graphql-jit}
     ✓ no_errors{mode:graphql-response-cache}
     ✓ expected_result{mode:graphql-response-cache}
     ✓ no_errors{mode:graphql-no-parse-validate-cache}
     ✓ expected_result{mode:graphql-no-parse-validate-cache}

     checks.......................................: 100.00% ✓ 396658      ✗ 0     
     data_received................................: 1.6 GB  13 MB/s
     data_sent....................................: 80 MB   667 kB/s
     http_req_blocked.............................: avg=1.44µs   min=961ns    med=1.27µs   max=251.45µs p(90)=1.97µs   p(95)=2.18µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=142.09µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=392.58µs min=217.57µs med=348.54µs max=23.48ms  p(90)=545.32µs p(95)=565.98µs
       { expected_response:true }.................: avg=392.58µs min=217.57µs med=348.54µs max=23.48ms  p(90)=545.32µs p(95)=565.98µs
     ✓ { mode:graphql-jit }.......................: avg=292.97µs min=217.57µs med=269.4µs  max=14.72ms  p(90)=301.86µs p(95)=318.62µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=574.9µs  min=478.18µs med=543.38µs max=9.97ms   p(90)=586.24µs p(95)=626.15µs
     ✓ { mode:graphql-response-cache }............: avg=370.48µs min=294.32µs med=349.68µs max=17.71ms  p(90)=382.8µs  p(95)=395.47µs
     ✓ { mode:graphql }...........................: avg=395.54µs min=305.37µs med=358.16µs max=23.48ms  p(90)=412µs    p(95)=464.11µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 198329
     http_req_receiving...........................: avg=33.7µs   min=16.34µs  med=33.45µs  max=1.44ms   p(90)=39.1µs   p(95)=41.43µs 
     http_req_sending.............................: avg=8.15µs   min=5.78µs   med=7.14µs   max=772.38µs p(90)=10.77µs  p(95)=11.73µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=350.72µs min=188.94µs med=307.41µs max=23.33ms  p(90)=503.66µs p(95)=522.3µs 
     http_reqs....................................: 198329  1652.714339/s
     iteration_duration...........................: avg=600.21µs min=392.31µs med=552.03µs max=24.31ms  p(90)=755.31µs p(95)=780.29µs
     iterations...................................: 198329  1652.714339/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

Copy link
Contributor

github-actions bot commented Mar 9, 2024

💻 Website Preview

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

Copy link
Contributor

github-actions bot commented Mar 9, 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-yoga-cloud-run-guide 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/apollo-link 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/urql-exchange 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
graphql-yoga 5.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs-federation 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apollo-inline-trace 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apq 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-csrf-prevention 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-defer-stream 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-disable-introspection 2.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-graphql-sse 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-jwt 2.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-persisted-operations 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-prometheus 4.2.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-response-cache 3.5.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-sofa 3.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎
@graphql-yoga/render-graphiql 5.3.0-alpha-20240329200130-a0b4d864 npm ↗︎ unpkg ↗︎

@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch 8 times, most recently from f51cf14 to f8cec32 Compare March 21, 2024 13:29
@n1ru4l n1ru4l requested review from ardatan and EmrysMyrddin March 21, 2024 13:31
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch 5 times, most recently from f9133fb to 29065e0 Compare March 28, 2024 15:38
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from 29065e0 to 596f5f1 Compare March 28, 2024 15:39
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from 17ec375 to 3e8d114 Compare March 28, 2024 15:52
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from 1e67cdf to 6fe67d1 Compare March 28, 2024 16:02
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from a110ab6 to 4169e42 Compare March 28, 2024 16:43
@n1ru4l n1ru4l changed the title feat: request cancellation feat: execution cancellation Mar 28, 2024
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from aec7a15 to 4aeeb6c Compare March 28, 2024 20:22
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from 585d113 to 9a07506 Compare March 28, 2024 21:15
@n1ru4l n1ru4l changed the title feat: execution cancellation feat: execution cancelation Mar 28, 2024
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from 101938f to b0174c3 Compare March 28, 2024 21:36
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from e40ab01 to aeba523 Compare March 28, 2024 21:44
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from dd92e06 to 7233a02 Compare March 29, 2024 19:29
@n1ru4l n1ru4l force-pushed the feat-request-cancellation branch from f576fc9 to a1c3467 Compare March 29, 2024 19:50
@n1ru4l n1ru4l merged commit f775b34 into main Mar 29, 2024
26 of 29 checks passed
@n1ru4l n1ru4l deleted the feat-request-cancellation branch March 29, 2024 20:09
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.

3 participants