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

Use the same context object in the entire pipeline #3051

Merged
merged 4 commits into from Oct 13, 2023
Merged

Conversation

ardatan
Copy link
Collaborator

@ardatan ardatan commented Oct 9, 2023

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 9, 2023

🦋 Changeset detected

Latest commit: daaace6

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

This PR includes changesets to release 10 packages
Name Type
graphql-yoga Patch
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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 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 Oct 9, 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% ✓ 345798     ✗ 0     
     data_received................................: 1.4 GB  12 MB/s
     data_sent....................................: 70 MB   582 kB/s
     http_req_blocked.............................: avg=1.56µs   min=900ns   med=1.3µs   max=722.5µs p(90)=1.9µs    p(95)=2.2µs   
     http_req_connecting..........................: avg=5ns      min=0s      med=0s      max=561.4µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=455.81µs min=229.6µs med=375.5µs max=26.15ms p(90)=670.1µs  p(95)=724.9µs 
       { expected_response:true }.................: avg=455.81µs min=229.6µs med=375.5µs max=26.15ms p(90)=670.1µs  p(95)=724.9µs 
     ✓ { mode:graphql-jit }.......................: avg=332.36µs min=229.6µs med=292.7µs max=21.03ms p(90)=349.6µs  p(95)=385.2µs 
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=733.34µs min=576.2µs med=666.7µs max=22.2ms  p(90)=767.36µs p(95)=856.3µs 
     ✓ { mode:graphql-response-cache }............: avg=400.88µs min=287µs   med=365.2µs max=26.15ms p(90)=423.9µs  p(95)=457.35µs
     ✓ { mode:graphql }...........................: avg=467.58µs min=339.4µs med=406.2µs max=21.8ms  p(90)=485.4µs  p(95)=574.66µs
     http_req_failed..............................: 0.00%   ✓ 0          ✗ 172899
     http_req_receiving...........................: avg=26.65µs  min=14.5µs  med=23.1µs  max=7.05ms  p(90)=36.5µs   p(95)=40.2µs  
     http_req_sending.............................: avg=10.86µs  min=5.3µs   med=7µs     max=4.53ms  p(90)=12.4µs   p(95)=15.4µs  
     http_req_tls_handshaking.....................: avg=0s       min=0s      med=0s      max=0s      p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=418.3µs  min=206.4µs med=341.9µs max=26.05ms p(90)=636.5µs  p(95)=680.8µs 
     http_reqs....................................: 172899  1440.79678/s
     iteration_duration...........................: avg=688.71µs min=421.8µs med=606.3µs max=26.47ms p(90)=897.6µs  p(95)=977.4µs 
     iterations...................................: 172899  1440.79678/s
     vus..........................................: 1       min=1        max=1   
     vus_max......................................: 2       min=2        max=2   

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

🚀 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 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/apollo-link 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/urql-exchange 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/redis-event-target 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
graphql-yoga 4.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs 2.2.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs-federation 2.3.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apollo-inline-trace 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apq 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-csrf-prevention 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-defer-stream 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-disable-introspection 1.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-graphql-sse 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-jwt 1.2.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-persisted-operations 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-prometheus 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-response-cache 2.3.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-sofa 2.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/render-graphiql 4.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎
@graphql-yoga/subscription 4.1.0-alpha-20231013122338-daaace65 npm ↗︎ unpkg ↗︎

Copy link
Collaborator

@EmrysMyrddin EmrysMyrddin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great !

@EmrysMyrddin
Copy link
Collaborator

I just though of something, what happens if we have a request containing bashed queries ?

I suppose that with this the context will be shared by all graphql queries of the request.

Is this good or not ? I'm not sure

@ardatan
Copy link
Collaborator Author

ardatan commented Oct 13, 2023

Ok now we handle batched requests differently

@ardatan ardatan merged commit 350bb85 into main Oct 13, 2023
25 of 26 checks passed
@ardatan ardatan deleted the stable-context branch October 13, 2023 12:26
@github-actions
Copy link
Contributor

💻 Website Preview

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

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.

None yet

2 participants