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

Persisted Queries Plugin #1137

Merged
merged 4 commits into from
Jul 27, 2022
Merged

Persisted Queries Plugin #1137

merged 4 commits into from
Jul 27, 2022

Conversation

ardatan
Copy link
Collaborator

@ardatan ardatan commented Apr 26, 2022

@github-actions
Copy link
Contributor

github-actions bot commented Apr 26, 2022

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

@graphql-yoga/[email protected]
@graphql-yoga/[email protected]
[email protected]
@graphql-yoga/[email protected]
@graphql-yoga/[email protected]
@graphql-yoga/[email protected]
@graphql-yoga/[email protected]

@github-actions
Copy link
Contributor

github-actions bot commented Apr 26, 2022

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 97178       ✗ 0    
     data_received..................: 13 MB   431 kB/s
     data_sent......................: 5.6 MB  186 kB/s
     http_req_blocked...............: avg=2.53µs   min=1.1µs   med=2µs     max=3.02ms  p(90)=2.6µs    p(95)=3.1µs   
     http_req_connecting............: avg=55ns     min=0s      med=0s      max=2.71ms  p(90)=0s       p(95)=0s      
   ✓ http_req_duration..............: avg=479.32µs min=216.7µs med=381µs   max=24.02ms p(90)=627.8µs  p(95)=830.39µs
       { expected_response:true }...: avg=479.32µs min=216.7µs med=381µs   max=24.02ms p(90)=627.8µs  p(95)=830.39µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 48589
     http_req_receiving.............: avg=37.82µs  min=16.2µs  med=30µs    max=6.51ms  p(90)=47.2µs   p(95)=70µs    
     http_req_sending...............: avg=15.25µs  min=5.6µs   med=9.7µs   max=5.73ms  p(90)=21µs     p(95)=25.5µs  
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s      max=0s      p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=426.23µs min=190.1µs med=333µs   max=23.89ms p(90)=558.92µs p(95)=750.61µs
     http_reqs......................: 48589   1619.524486/s
     iteration_duration.............: avg=608.12µs min=280.2µs med=500.5µs max=27.29ms p(90)=791.03µs p(95)=1.02ms  
     iterations.....................: 48589   1619.524486/s
     vus............................: 1       min=1         max=1  
     vus_max........................: 1       min=1         max=1  

@ardatan ardatan force-pushed the persisted-queries-plugin branch from 25d464f to 524b29d Compare May 2, 2022 10:02
@ardatan ardatan force-pushed the new-plugin-system branch from 73e27eb to 811b45b Compare May 2, 2022 11:29
@ardatan ardatan force-pushed the persisted-queries-plugin branch from 524b29d to e09ee65 Compare May 2, 2022 12:11
@ardatan ardatan force-pushed the new-plugin-system branch from 811b45b to b0b3a6b Compare May 2, 2022 17:35
@ardatan ardatan force-pushed the persisted-queries-plugin branch from e09ee65 to 1aacf16 Compare May 2, 2022 17:37
@ardatan ardatan force-pushed the new-plugin-system branch from b0b3a6b to 6e629e3 Compare May 4, 2022 20:52
Base automatically changed from new-plugin-system to master May 4, 2022 20:59
@ardatan ardatan force-pushed the persisted-queries-plugin branch from 1aacf16 to d2a7c22 Compare May 4, 2022 23:39
@ardatan ardatan force-pushed the persisted-queries-plugin branch from d2a7c22 to 4fd66f3 Compare May 9, 2022 15:43
@ardatan ardatan force-pushed the master branch 2 times, most recently from f0f8d91 to 5f031ea Compare May 9, 2022 16:19
@ardatan ardatan force-pushed the persisted-queries-plugin branch from 4fd66f3 to 77439dd Compare May 9, 2022 16:20
@ardatan ardatan force-pushed the persisted-queries-plugin branch 2 times, most recently from ab65da9 to 9cf6869 Compare June 6, 2022 10:30
@SirensOfTitan
Copy link

I've been playing with this and it feels pretty great! The only small issue that I've stumbled upon is that a PersistedQueryNotFound error results in a 500, but in the apollo-server implementation (which I'm assuming as reference), results in a 200 with a cache header, see:

https://github.com/apollographql/apollo-server/blob/444c403011209023b5d3b5162b8fb81991046b23/packages/apollo-server-core/src/requestPipeline.ts#L578-L582

@ardatan
Copy link
Collaborator Author

ardatan commented Jun 8, 2022

Oh i think my other PR that returns 200 even for the errors would solve this! Good catch!

@Urigo Urigo mentioned this pull request Jul 6, 2022
4 tasks
@ardatan ardatan self-assigned this Jul 20, 2022
renovate bot and others added 4 commits July 27, 2022 14:34
* chore(deps): update actions/checkout action to v3 (#1431)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency ioredis to v5.2.2 (#1450)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Replace cross-undici-fetch with @whatwg-node/fetch

* chore(deps): update dependency vite to v3

* Fix GraphiQL build

* Go

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Arda TANRIKULU <[email protected]>
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