Skip to content

chore(deps): update dependency @whatwg-node/server to ^0.10.0#931

Merged
ardatan merged 1 commit intomainfrom
renovate/all-whatwg-node-dependencies
Mar 25, 2025
Merged

chore(deps): update dependency @whatwg-node/server to ^0.10.0#931
ardatan merged 1 commit intomainfrom
renovate/all-whatwg-node-dependencies

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Mar 25, 2025

This PR contains the following updates:

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

Release Notes

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

v0.10.3

Compare Source

Patch Changes
  • #​2208
    ff052a3
    Thanks @​ardatan! - When any Request method is called outside
    server adapter scope, it used to hang. This PR prevents it to hang and throw an error if the
    readable stream is destroyed earlier.

    let request: Request
    const adapter = createServerAdapter(req => {
      request = req
      return new Response('Hello World')
    })
    
    await request.text() // Was hanging but now throws an error

v0.10.2

Compare Source

Patch Changes

v0.10.1

Compare Source

Patch Changes

v0.10.0

Compare Source

Minor Changes
  • #​2068
    516bf60
    Thanks @​EmrysMyrddin! - Add new Instrumentation 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 Instrumentation 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: [
      {
        instrumentation: {
          request: ({ request }, wrapped) =>
            Sentry.startSpan({ name: 'Graphql Operation' }, async () => {
              try {
                await wrapped()
              } catch (err) {
                Sentry.captureException(err)
              }
            })
        }
      }
    ]
  }
)
Multiple instrumentation plugins

It is possible to have multiple instrumentation 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 instrumentation ordering

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

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

const { instrumentation: sentryInstrumentation, ...sentryPlugin } = useSentry()
const { instrumentation: otelInstrumentation, ...otelPlugin } = useOpentelemetry()
const instrumentation = composeInstrumentation([otelInstrumentation, sentryInstrumentation])

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

v0.9.71

Compare Source

Patch Changes

v0.9.70

Compare Source

Patch Changes

v0.9.69

Compare Source

Patch Changes
  • #​2093
    31f021a
    Thanks @​ardatan! - Fixes the
    TypeError: bodyInit.stream is not a function error thrown when @whatwg-node/server is used
    with node:http2 and attempts the incoming HTTP/2 request to parse with Request.json,
    Request.text, Request.formData, or Request.blob methods.

  • Updated dependencies
    [31f021a]:

v0.9.68

Compare Source

Patch Changes

v0.9.67

Compare Source

Patch Changes
  • #​2057
    7d28669
    Thanks @​ardatan! - When two plugins use the onResponse hook and
    the first one modifies the response, the second one should get the modified one;

    ;[
      {
        onResponse({ setResponse, fetchAPI }) {
          setResponse(
            fetchAPI.Response.json(
              {
                foo: 'bar'
              },
              { status: 418 }
            )
          )
        }
      },
      {
        onResponse({ response }) {
          console.log(response.status) // 418
        }
      }
    ]

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 this update 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 enabled auto-merge (squash) March 25, 2025 15:55
@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-tools/batch-delegate 9.0.34-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-tools/batch-execute 9.0.15-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-tools/delegate 10.2.16-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-tools/executor-http 1.3.2-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-tools/federation 3.1.7-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/fusion-runtime 0.11.6-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-hive/gateway 1.13.2-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-hive/nestjs 1.0.6-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-hive/plugin-aws-sigv4 1.0.3-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/hmac-upstream-signature 1.2.24-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-opentelemetry 1.3.50-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-prometheus 1.3.38-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-runtime 1.6.4-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-hive/signal 1.0.0-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-tools/stitch 9.4.21-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-tools/stitching-directives 3.1.31-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-common 0.7.32-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-http 0.6.37-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-http-callback 0.5.24-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-ws 1.0.7-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎
@graphql-tools/wrap 10.0.34-alpha-275873d8ef981b4c12152558add2b266a6474320 npm ↗︎ unpkg ↗︎

@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (Binary for Linux-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (Binary for Linux-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (Binary for macOS-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (Bun Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:1.13.2-alpha-275873d8ef981b4c12152558add2b266a6474320-bun

@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (Node Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:1.13.2-alpha-275873d8ef981b4c12152558add2b266a6474320

@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (Binary for macOS-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Copy Markdown
Collaborator

theguild-bot commented Mar 25, 2025

🚀 Snapshot Release (Binary for Windows-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@ardatan ardatan disabled auto-merge March 25, 2025 16:27
@ardatan ardatan enabled auto-merge (squash) March 25, 2025 16:28
@ardatan ardatan force-pushed the renovate/all-whatwg-node-dependencies branch from 2867af3 to 275873d Compare March 25, 2025 16:28
@ardatan ardatan merged commit 777872d into main Mar 25, 2025
59 of 62 checks passed
@ardatan ardatan deleted the renovate/all-whatwg-node-dependencies branch March 25, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants