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(plugin-response-cache): add @cacheControl compatibility #2887

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

EmrysMyrddin
Copy link
Collaborator

Description

Add a path to use configure response cache with a schema first approach.

This has been implemented in the envelop plugin, this PR is updates dependency and adds the relevant documentation to Yoga.

Issue

fixes #2187

@changeset-bot
Copy link

changeset-bot bot commented Jun 23, 2023

🦋 Changeset detected

Latest commit: f87c2c0

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 Minor
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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 23, 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 Jun 23, 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% ✓ 353158      ✗ 0     
     data_received................................: 1.4 GB  12 MB/s
     data_sent....................................: 71 MB   594 kB/s
     http_req_blocked.............................: avg=1.45µs   min=800ns    med=1.29µs   max=751.69µs p(90)=1.8µs    p(95)=2µs     
     http_req_connecting..........................: avg=8ns      min=0s       med=0s       max=567.59µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=448.08µs min=221.99µs med=360.49µs max=28.28ms  p(90)=647.39µs p(95)=685.29µs
       { expected_response:true }.................: avg=448.08µs min=221.99µs med=360.49µs max=28.28ms  p(90)=647.39µs p(95)=685.29µs
     ✓ { mode:graphql-jit }.......................: avg=329.05µs min=221.99µs med=286.49µs max=27.26ms  p(90)=346.09µs p(95)=379.98µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=703.7µs  min=533.99µs med=643.29µs max=20.92ms  p(90)=729.19µs p(95)=811.69µs
     ✓ { mode:graphql-response-cache }............: avg=383.13µs min=269.79µs med=339.79µs max=17.79ms  p(90)=400.39µs p(95)=433.09µs
     ✓ { mode:graphql }...........................: avg=478.95µs min=338.49µs med=405.69µs max=28.28ms  p(90)=495.67µs p(95)=579.57µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 176579
     http_req_receiving...........................: avg=25.54µs  min=14.09µs  med=21.7µs   max=18.36ms  p(90)=32.99µs  p(95)=37.4µs  
     http_req_sending.............................: avg=10.95µs  min=4.59µs   med=6.5µs    max=5.13ms   p(90)=11.1µs   p(95)=13.8µs  
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=411.58µs min=198.39µs med=327.29µs max=28.22ms  p(90)=617.69µs p(95)=649.19µs
     http_reqs....................................: 176579  1471.455449/s
     iteration_duration...........................: avg=674.56µs min=410.99µs med=585.09µs max=28.56ms  p(90)=862.79µs p(95)=923.3µs 
     iterations...................................: 176579  1471.455449/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

@github-actions
Copy link
Contributor

github-actions bot commented Jun 23, 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/plugin-response-cache 2.1.0-rc-20230623170035-f87c2c0c npm ↗︎ unpkg ↗︎

@github-actions
Copy link
Contributor

github-actions bot commented Jun 23, 2023

💻 Website Preview

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

@EmrysMyrddin EmrysMyrddin force-pushed the feat/reponse-cache/cache-control-directive branch from d180c2a to f87c2c0 Compare June 23, 2023 16:48
@n1ru4l n1ru4l merged commit 9688249 into main Jun 28, 2023
28 checks passed
@n1ru4l n1ru4l deleted the feat/reponse-cache/cache-control-directive branch June 28, 2023 08:10
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.

[response-cache] document path for using SDL directive annotations for caching
2 participants