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 response cache usage with subscriptions #3006

Merged
merged 8 commits into from
Sep 28, 2023

Conversation

EmrysMyrddin
Copy link
Collaborator

@EmrysMyrddin EmrysMyrddin commented Sep 20, 2023

@changeset-bot
Copy link

changeset-bot bot commented Sep 20, 2023

🦋 Changeset detected

Latest commit: 3004ae1

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

This PR includes changesets to release 2 packages
Name Type
@graphql-yoga/plugin-response-cache 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

@EmrysMyrddin EmrysMyrddin force-pushed the fix/response-cache-subscriptions branch from 715a48d to 9e2740d Compare September 20, 2023 13:31
@EmrysMyrddin EmrysMyrddin force-pushed the fix/response-cache-subscriptions branch from 9e2740d to 2f11690 Compare September 20, 2023 19:04
@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Apollo Federation Subgraph Compatibility Results

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

Learn more:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

✅ 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% ✓ 285532      ✗ 0     
     data_received................................: 1.2 GB  9.7 MB/s
     data_sent....................................: 58 MB   480 kB/s
     http_req_blocked.............................: avg=1.8µs    min=1µs      med=1.5µs    max=942.91µs p(90)=2.29µs   p(95)=2.6µs   
     http_req_connecting..........................: avg=8ns      min=0s       med=0s       max=618.41µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=570.69µs min=299.2µs  med=465.5µs  max=48.72ms  p(90)=806.61µs p(95)=860.79µs
       { expected_response:true }.................: avg=570.69µs min=299.2µs  med=465.5µs  max=48.72ms  p(90)=806.61µs p(95)=860.79µs
     ✓ { mode:graphql-jit }.......................: avg=431.49µs min=299.2µs  med=372.9µs  max=20.48ms  p(90)=446.5µs  p(95)=515.61µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=894.67µs min=727.41µs med=799.61µs max=24.86ms  p(90)=901.11µs p(95)=1.25ms  
     ✓ { mode:graphql-response-cache }............: avg=500.69µs min=357.9µs  med=443.7µs  max=17.97ms  p(90)=505µs    p(95)=577.61µs
     ✓ { mode:graphql }...........................: avg=580.16µs min=421.9µs  med=500.11µs max=48.72ms  p(90)=611.01µs p(95)=753.21µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 142766
     http_req_receiving...........................: avg=32.77µs  min=17.2µs   med=28.4µs   max=12.14ms  p(90)=40.9µs   p(95)=44.9µs  
     http_req_sending.............................: avg=14.35µs  min=6.5µs    med=9.29µs   max=6.76ms   p(90)=15µs     p(95)=17.6µs  
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=523.56µs min=268.9µs  med=423.7µs  max=48.64ms  p(90)=764.61µs p(95)=807.11µs
     http_reqs....................................: 142766  1189.697044/s
     iteration_duration...........................: avg=834.28µs min=512.71µs med=721.31µs max=49.04ms  p(90)=1.06ms   p(95)=1.14ms  
     iterations...................................: 142766  1189.697044/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

🚀 Snapshot Release (rc)

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

Package Version Info
graphql-yoga-cloud-run-guide 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/apollo-link 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/urql-exchange 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
graphql-yoga 4.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs 2.1.1-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs-federation 2.2.1-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apollo-inline-trace 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apq 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-csrf-prevention 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-defer-stream 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-disable-introspection 1.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-graphql-sse 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-jwt 1.0.2-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-persisted-operations 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-prometheus 2.0.6-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-response-cache 2.2.0-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-sofa 2.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎
@graphql-yoga/render-graphiql 4.0.5-rc-20230928094344-3004ae10 npm ↗︎ unpkg ↗︎

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

💻 Website Preview

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

@theguild-bot theguild-bot mentioned this pull request Sep 27, 2023
@ardatan ardatan force-pushed the fix/response-cache-subscriptions branch from 37bdcd0 to 562a250 Compare September 27, 2023 21:48
EmrysMyrddin and others added 6 commits September 28, 2023 11:03
chore(dependencies): updated changesets for modified dependencies

use metadata helper

chore(dependencies): updated changesets for modified dependencies

add tests for stream and defer directives

changeset

update envelop plugin to stable release

chore(dependencies): updated changesets for modified dependencies

add documentation

fix response cache usage with subscriptions

chore(dependencies): updated changesets for modified dependencies
@EmrysMyrddin EmrysMyrddin force-pushed the fix/response-cache-subscriptions branch from b005e8b to 1e9bc6c Compare September 28, 2023 09:13
@EmrysMyrddin EmrysMyrddin merged commit 2a12236 into main Sep 28, 2023
27 checks passed
@EmrysMyrddin EmrysMyrddin deleted the fix/response-cache-subscriptions branch September 28, 2023 13:34
This was referenced May 7, 2024
This was referenced May 23, 2024
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.

Yoga's useResponseCache plugin breaks subscriptions
3 participants