chore(example): Implement GraphQL Subscriptions with Yoga and WebSockets in BunJS
This PR provides an example of integrating GraphQL subscriptions using WebSockets in BunJS, leveraging makeHandler api provided by graphql-ws.
👉 https://github.com/dotansimha/graphql-yoga/discussions/3041
⚠️ No Changeset found
Latest commit: d8bcfa91c0df0f900d50039c9e85bb2f1b2b764e
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
✅ 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% ✓ 390848 ✗ 0
data_received................................: 1.6 GB 13 MB/s
data_sent....................................: 79 MB 657 kB/s
http_req_blocked.............................: avg=1.55µs min=952ns med=1.34µs max=5.82ms p(90)=2µs p(95)=2.22µs
http_req_connecting..........................: avg=2ns min=0s med=0s max=144.75µs p(90)=0s p(95)=0s
http_req_duration............................: avg=397.42µs min=219.2µs med=352.8µs max=24.54ms p(90)=552.69µs p(95)=575.05µs
{ expected_response:true }.................: avg=397.42µs min=219.2µs med=352.8µs max=24.54ms p(90)=552.69µs p(95)=575.05µs
✓ { mode:graphql-jit }.......................: avg=299.39µs min=219.2µs med=277.82µs max=18.46ms p(90)=310.41µs p(95)=323.79µs
✓ { mode:graphql-no-parse-validate-cache }...: avg=581.96µs min=481.86µs med=551.51µs max=10.38ms p(90)=599.74µs p(95)=637.21µs
✓ { mode:graphql-response-cache }............: avg=377.49µs min=294.1µs med=357.15µs max=16.31ms p(90)=390.72µs p(95)=403.09µs
✓ { mode:graphql }...........................: avg=394.33µs min=302.07µs med=360.1µs max=24.54ms p(90)=410.41µs p(95)=457.76µs
http_req_failed..............................: 0.00% ✓ 0 ✗ 195424
http_req_receiving...........................: avg=34.3µs min=17.58µs med=33.95µs max=810.98µs p(90)=40.72µs p(95)=44.42µs
http_req_sending.............................: avg=8.57µs min=6.03µs med=7.51µs max=652.54µs p(90)=11.17µs p(95)=12.56µs
http_req_tls_handshaking.....................: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
http_req_waiting.............................: avg=354.54µs min=190.45µs med=310.54µs max=24.4ms p(90)=509.17µs p(95)=529.64µs
http_reqs....................................: 195424 1628.511231/s
iteration_duration...........................: avg=609.17µs min=403.2µs med=560.87µs max=25.24ms p(90)=768.21µs p(95)=794.56µs
iterations...................................: 195424 1628.511231/s
vus..........................................: 1 min=1 max=1
vus_max......................................: 2 min=2 max=2