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(deps): update dependency @whatwg-node/server to ^0.10.0 #3855

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 5, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@whatwg-node/server (source) ^0.9.71 -> ^0.10.0 age adoption passing confidence

Release Notes

ardatan/whatwg-node (@​whatwg-node/server)

v0.10.0

Compare Source

Minor Changes
  • #​2068
    516bf60
    Thanks @​EmrysMyrddin! - Add new Instruments API

    Introduction of a new API allowing to instrument the graphql pipeline.

    This new API differs from already existing Hooks by not having access to input/output of phases.
    The goal of Instruments is to run allow running code before, after or around the whole process
    of a phase
    , including plugins hooks executions.

    The main use case of this new API is observability (monitoring, tracing, etc...).

Basic usage
import Sentry from '@​sentry/node'
import { createServerAdapter } from '@​whatwg-node/server'

const server = createServerAdapter(
  (req, res) => {
    //...
  },
  {
    plugins: [
      {
        instruments: {
          request: ({ request }, wrapped) =>
            Sentry.startSpan({ name: 'Graphql Operation' }, async () => {
              try {
                await wrapped()
              } catch (err) {
                Sentry.captureException(err)
              }
            })
        }
      }
    ]
  }
)
Multiple instruments plugins

It is possible to have multiple instruments plugins (Prometheus and Sentry for example), they will
be automatically composed by envelop in the same order than the plugin array (first is outermost,
last is inner most).

import { createServerAdapter } from '@​whatwg-node/server'

const server = createServerAdapter(
  (req, res) => {
    //...
  },
  { plugins: [useSentry(), useOpentelemetry()] }
)
sequenceDiagram
  Sentry->>Opentelemetry: ;
  Opentelemetry->>Server Adapter: ;
  Server Adapter->>Opentelemetry: ;
  Opentelemetry->>Sentry: ;
Loading
Custom instruments ordering

If the default composition ordering doesn't suite your need, you can manually compose instruments.
This allows to have a different execution order of hooks and instruments.

import { composeInstruments, createServerAdapter } from '@​whatwg-node/server'

const { instruments: sentryInstruments, ...sentryPlugin } = useSentry()
const { instruments: otelInstruments, ...otelPlugin } = useOpentelemetry()
const instruments = composeInstruments([otelInstruments, sentryInstruments])

const server = createServerAdapter(
  (req, res) => {
    //...
  },
  { plugins: [{ instruments }, sentryPlugin, otelPlugin] }
)
sequenceDiagram
  Opentelemetry->>Sentry: ;
  Sentry->>Server Adapter: ;
  Server Adapter->>Sentry: ;
  Sentry->>Opentelemetry: ;
Loading
Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Mar 5, 2025
Copy link

changeset-bot bot commented Mar 5, 2025

🦋 Changeset detected

Latest commit: 1b304e9

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 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-apollo-usage-report 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 Mar 5, 2025

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 Mar 5, 2025

💻 Website Preview

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

Copy link
Contributor

github-actions bot commented Mar 5, 2025

✅ 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}
     ✓ no_errors{mode:uws}
     ✓ expected_result{mode:uws}

     checks.......................................: 100.00% ✓ 503394      ✗ 0     
     data_received................................: 2.1 GB  14 MB/s
     data_sent....................................: 101 MB  674 kB/s
     http_req_blocked.............................: avg=1.58µs   min=1.03µs   med=1.37µs   max=745.34µs p(90)=2.05µs   p(95)=2.25µs  
     http_req_connecting..........................: avg=4ns      min=0s       med=0s       max=584.11µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=372.64µs min=228.57µs med=339.17µs max=21.6ms   p(90)=485.41µs p(95)=507.64µs
       { expected_response:true }.................: avg=372.64µs min=228.57µs med=339.17µs max=21.6ms   p(90)=485.41µs p(95)=507.64µs
     ✓ { mode:graphql-jit }.......................: avg=298.48µs min=228.57µs med=282.28µs max=19.85ms  p(90)=312.42µs p(95)=325.57µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=512.7µs  min=418.75µs med=487.23µs max=6.57ms   p(90)=527.97µs p(95)=574.69µs
     ✓ { mode:graphql-response-cache }............: avg=354.12µs min=274.84µs med=337.65µs max=7.21ms   p(90)=367.66µs p(95)=378.5µs 
     ✓ { mode:graphql }...........................: avg=378.76µs min=293.53µs med=349.76µs max=21.6ms   p(90)=397.31µs p(95)=455.23µs
     ✓ { mode:uws }...............................: avg=358.22µs min=279.17µs med=338.19µs max=6.39ms   p(90)=373.11µs p(95)=396.84µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 251697
     http_req_receiving...........................: avg=34.15µs  min=16.67µs  med=33.77µs  max=3ms      p(90)=40.57µs  p(95)=43.73µs 
     http_req_sending.............................: avg=8.97µs   min=6.08µs   med=7.95µs   max=350.91µs p(90)=11.4µs   p(95)=12.61µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=329.52µs min=192.7µs  med=297.21µs max=21.41ms  p(90)=441.26µs p(95)=461.87µs
     http_reqs....................................: 251697  1677.961495/s
     iteration_duration...........................: avg=590.89µs min=398.09µs med=552.98µs max=22.82ms  p(90)=707.92µs p(95)=733.93µs
     iterations...................................: 251697  1677.961495/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

@ardatan ardatan merged commit 6ed67e8 into main Mar 5, 2025
25 checks passed
@ardatan ardatan deleted the renovate/whatwg-node branch March 5, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant