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 native API when possible #3338

Merged
merged 15 commits into from
Jul 1, 2024
Merged

Use native API when possible #3338

merged 15 commits into from
Jul 1, 2024

Conversation

ardatan
Copy link
Collaborator

@ardatan ardatan commented Jul 1, 2024

  • Use Promise.withResolvers to create Deferred when available
  • Use setTimeout from timers/promises instead of new Promise(resolve => setTimeout(...

Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: 2ea9d47

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

This PR includes changesets to release 24 packages
Name Type
@graphql-yoga/graphiql Patch
graphql-yoga Patch
@graphql-yoga/nestjs Patch
@graphql-yoga/render-graphiql Patch
@graphql-yoga/plugin-apollo-inline-trace Patch
@graphql-yoga/apollo-managed-federation Patch
@graphql-yoga/plugin-apq Patch
@graphql-yoga/plugin-csrf-prevention Patch
@graphql-yoga/plugin-defer-stream Patch
@graphql-yoga/plugin-disable-introspection Patch
@graphql-yoga/plugin-graphql-sse Patch
@graphql-yoga/plugin-jwt Patch
@graphql-yoga/plugin-persisted-operations Patch
@graphql-yoga/plugin-prometheus Patch
@graphql-yoga/plugin-response-cache Patch
@graphql-yoga/plugin-sofa Patch
apollo-federation-gateway-with-yoga Patch
apollo-subgraph-with-yoga Patch
graphql-lambda Patch
cloudflare-advanced Patch
cloudflare Patch
nextjs-app Patch
hello-world-benchmark Patch
@graphql-yoga/nestjs-federation 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

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% ✓ 430150      ✗ 0     
     data_received................................: 1.8 GB  15 MB/s
     data_sent....................................: 87 MB   724 kB/s
     http_req_blocked.............................: avg=1.4µs    min=922ns    med=1.27µs   max=274.9µs  p(90)=1.84µs   p(95)=2.06µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=153.25µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=350.74µs min=195.81µs med=316.89µs max=24.2ms   p(90)=456.88µs p(95)=475.48µs
       { expected_response:true }.................: avg=350.74µs min=195.81µs med=316.89µs max=24.2ms   p(90)=456.88µs p(95)=475.48µs
     ✓ { mode:graphql-jit }.......................: avg=274.49µs min=195.81µs med=254.76µs max=20.42ms  p(90)=284.54µs p(95)=295.23µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=475.73µs min=376.97µs med=453.89µs max=8.64ms   p(90)=490.72µs p(95)=510.92µs
     ✓ { mode:graphql-response-cache }............: avg=331.51µs min=250.08µs med=314.76µs max=5.86ms   p(90)=346.48µs p(95)=356.47µs
     ✓ { mode:graphql }...........................: avg=357.96µs min=255.2µs  med=327.29µs max=24.2ms   p(90)=369.63µs p(95)=398.66µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 215075
     http_req_receiving...........................: avg=32.89µs  min=15.35µs  med=32.83µs  max=5.78ms   p(90)=38.1µs   p(95)=40.25µs 
     http_req_sending.............................: avg=7.95µs   min=5.55µs   med=7.15µs   max=344.32µs p(90)=10.61µs  p(95)=11.26µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=309.89µs min=166.68µs med=276.71µs max=24.08ms  p(90)=415.43µs p(95)=432.08µs
     http_reqs....................................: 215075  1792.273474/s
     iteration_duration...........................: avg=553.2µs  min=351.48µs med=516.3µs  max=24.86ms  p(90)=664.21µs p(95)=687.65µs
     iterations...................................: 215075  1792.273474/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

Copy link
Contributor

github-actions bot commented Jul 1, 2024

Apollo Federation Subgraph Compatibility Results

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

Learn more:

Copy link
Contributor

github-actions bot commented Jul 1, 2024

🚀 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/apollo-link 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/urql-exchange 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/graphiql 4.3.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
graphql-yoga 5.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs-federation 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apollo-inline-trace 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/apollo-managed-federation 0.3.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apq 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-csrf-prevention 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-defer-stream 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-disable-introspection 2.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-graphql-sse 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-jwt 2.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-persisted-operations 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-prometheus 5.3.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-response-cache 3.8.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-sofa 3.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎
@graphql-yoga/render-graphiql 5.6.1-alpha-20240701194318-2ea9d478 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented Jul 1, 2024

💻 Website Preview

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

@ardatan ardatan merged commit 4252e3d into main Jul 1, 2024
35 checks passed
@ardatan ardatan deleted the use-native-api branch July 1, 2024 19:43
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