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(persisted-operations): include in context params #3339

Merged

Conversation

ziolekjj
Copy link
Contributor

@ziolekjj ziolekjj commented Jul 1, 2024

According to the GraphQL Yoga Context, the default provided values in params includes query, operationName, variables, and extensions. When following the the APQ Specification of Apollo, the client sends operationName within the request, which would be helpful to keep in the context values if already exist. The current implementation strips the provided operationName value. I think it would be a good idea to add one, what do you think?

Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: eb8edaf

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

This PR includes changesets to release 1 package
Name Type
@graphql-yoga/plugin-persisted-operations 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

@ziolekjj ziolekjj marked this pull request as ready for review July 1, 2024 17:48
@ardatan
Copy link
Collaborator

ardatan commented Jul 1, 2024

Looks good to me!
Thanks!

@ardatan ardatan merged commit f245472 into dotansimha:main Jul 1, 2024
30 checks passed
Copy link
Contributor

github-actions bot commented Jul 1, 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% ✓ 429386      ✗ 0     
     data_received................................: 1.8 GB  15 MB/s
     data_sent....................................: 87 MB   723 kB/s
     http_req_blocked.............................: avg=1.37µs   min=972ns    med=1.24µs   max=292.89µs p(90)=1.76µs   p(95)=1.99µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=126µs    p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=352.9µs  min=214.86µs med=315.64µs max=24.9ms   p(90)=453.75µs p(95)=474.36µs
       { expected_response:true }.................: avg=352.9µs  min=214.86µs med=315.64µs max=24.9ms   p(90)=453.75µs p(95)=474.36µs
     ✓ { mode:graphql-jit }.......................: avg=276.75µs min=214.86µs med=255.17µs max=18.19ms  p(90)=285.75µs p(95)=298.06µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=477.85µs min=389.62µs med=449.57µs max=9.19ms   p(90)=492.13µs p(95)=521.74µs
     ✓ { mode:graphql-response-cache }............: avg=333.44µs min=264.8µs  med=313.95µs max=5.99ms   p(90)=347.18µs p(95)=357.73µs
     ✓ { mode:graphql }...........................: avg=360.02µs min=271.9µs  med=324.3µs  max=24.9ms   p(90)=374.41µs p(95)=429.94µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 214693
     http_req_receiving...........................: avg=33.18µs  min=15.5µs   med=32.95µs  max=896.54µs p(90)=38.25µs  p(95)=40.42µs 
     http_req_sending.............................: avg=7.57µs   min=5.76µs   med=6.78µs   max=267.12µs p(90)=10.16µs  p(95)=10.91µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=312.13µs min=175.33µs med=275.74µs max=24.72ms  p(90)=412.43µs p(95)=430.99µs
     http_reqs....................................: 214693  1789.087347/s
     iteration_duration...........................: avg=554.3µs  min=376µs    med=513.39µs max=25.65ms  p(90)=658.71µs p(95)=685.92µs
     iterations...................................: 214693  1789.087347/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

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.

2 participants