Skip to content

fix(deps): update dependency graphql-yoga to v5 #210

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 5, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
graphql-yoga (source) 3.9.1 -> 5.13.4 age adoption passing confidence

Release Notes

graphql-hive/graphql-yoga (graphql-yoga)

v5.13.4

Compare Source

Patch Changes

v5.13.3

Compare Source

Patch Changes

v5.13.2

Compare Source

Patch Changes

v5.13.1

Compare Source

Patch Changes

v5.13.0

Compare Source

Minor Changes
  • #​3793
    63b78d5
    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 { createYoga } from 'graphql-yoga'
import Sentry from '@​sentry/node'
import schema from './schema'

const server = createYoga({
  schema,
  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 { createYoga } from 'graphql-yoga'
import schema from './schema'

const server = createYoga({
  schema,
  plugins: [useSentry(), useOpentelemetry()]
})
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, createYoga } from 'graphql-yoga'
import schema from './schema'

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

const server = createYoga({
  schema,
  plugins: [{ instrumentation }, useSentry(), useOpentelemetry()]
})
Patch Changes

v5.12.2

Compare Source

Patch Changes

v5.12.1

Patch Changes

v5.12.0

Minor Changes
Patch Changes

v5.11.0

Compare Source

Minor Changes
  • #​3727
    5fd15b8
    Thanks @​EmrysMyrddin! - Allow to configure the endpoint used by
    GraphiQL to send requests.

  • #​3736
    d13b8a4
    Thanks @​ardatan! - Now it is possible to replace or wrap the logic
    how GraphQLParams handled;

    By default Yoga calls Envelop to handle the parameters, but now you can replace it with your own
    logic.

    Example: Wrap the GraphQL handling pipeline in an AsyncLocalStorage

    function myPlugin(): Plugin {
      const context = new AsyncLocalStorage();
      return {
        onParams({ paramsHandler, setParamsHandler }) {
          const store = { foo: 'bar' }
          setParamsHandler(payload => context.run(store, paramsHandler, payload))
       }
    }

v5.10.11

Compare Source

Patch Changes

v5.10.10

Compare Source

Patch Changes

v5.10.9

Compare Source

Patch Changes

v5.10.8

Compare Source

Patch Changes
  • #​3588
    ed344ea
    Thanks @​ardatan! - Mark createLRUCache utility as deprecated, and
    export it as _createLRUCache marking it as an internal utility

v5.10.7

Compare Source

Patch Changes

v5.10.6

Compare Source

Patch Changes

v5.10.5

Compare Source

Patch Changes

v5.10.4

Compare Source

Patch Changes

v5.10.3

Compare Source

Patch Changes

v5.10.2

Compare Source

Patch Changes
  • #​3491
    7a413bc
    Thanks @​n1ru4l! - dependencies updates:

  • #​3491
    7a413bc
    Thanks @​n1ru4l! - Fix issue where context values being shared between
    batched requests.

    A bug within @whatwg-node/server caused properties assigned to a batched requests context to be
    propagated to all other batched requests contexts. It is resolved by updating the dependency of
    @whatwg-node/server to 0.9.55.

v5.10.1

Compare Source

Patch Changes

v5.10.0

Compare Source

Minor Changes

v5.9.0

Compare Source

Minor Changes
Patch Changes

v5.8.0

Compare Source

Minor Changes
Patch Changes

v5.7.0

Compare Source

Minor Changes
  • #​3331
    5dae4ab
    Thanks @​EmrysMyrddin! - Expose server context in
    onResultProcessHook. In particular, this gives access to the waitUntil method to cleanly
    handle hanging promises.

  • #​3331
    5dae4ab
    Thanks @​EmrysMyrddin! - New hook: onExecutionResult which is
    triggered when an execution is done on the pipeline. If it is a batched operation, this is called
    per each operation in the batch

  • #​3331
    5dae4ab
    Thanks @​EmrysMyrddin! - Expose the already existing waitUntil
    method from the server context.

Patch Changes

v5.6.3

Compare Source

Patch Changes

v5.6.2

Compare Source

Patch Changes

v5.6.1

Compare Source

Patch Changes

v5.6.0

Compare Source

Minor Changes
  • #​3333
    9f3f945
    Thanks @​ardatan! - By default, Yoga does not allow extra parameters
    in the request body other than query, operationName, extensions, and variables, then
    throws 400 HTTP Error. This change adds a new option called extraParamNames to allow extra
    parameters in the request body.

    import { createYoga } from 'graphql-yoga'
    
    const yoga = createYoga({
      /* other options */
      extraParamNames: ['extraParam1', 'extraParam2']
    })
    
    const res = await yoga.fetch('/graphql', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        query: 'query { __typename }',
        extraParam1: 'value1',
        extraParam2: 'value2'
      })
    })
    
    console.assert(res.status === 200)

v5.5.0

Compare Source

Minor Changes
  • #​3332
    0208024
    Thanks @​ardatan! - Customize the landing page by passing a custom
    renderer that returns Response to the landingPage option

    import { createYoga } from 'graphql-yoga'
    
    const yoga = createYoga({
      landingPage: ({ url, fetchAPI }) => {
        return new fetchAPI.Response(
          /* HTML */ `
            <!doctype html>
            <html>
              <head>
                <title>404 Not Found</title>
              </head>
              <body>
                <h1>404 Not Found</h1>
                <p>Sorry, the page (${url.pathname}) you are looking for could not be found.</p>
              </body>
            </html>
          `,
          {
            status: 404,
            headers: {
              'Content-Type': 'text/html'
            }
          }
        )
      }
    })

v5.4.0

Compare Source

Minor Changes
  • #​3314
    d5dfe99
    Thanks @​EmrysMyrddin! - Allow for full customization of the
    GraphiQL page.

    Props from the YogaGraphiQL are now forwarded to the underlying GraphiQL components.

    The graphiql option field type of the Yoga server as also been updated to document which options
    are configurable from the server side. Only serializable options are available.

  • #​3255
    7335a82
    Thanks @​nissy-dev! - support shouldPersistHeaders option in
    GraphiQL plugin

Patch Changes

v5.3.1

Compare Source

Patch Changes
  • #​3237
    3324bbab
    Thanks @​ardatan! - dependencies updates:

  • #​3237
    3324bbab
    Thanks @​ardatan! - In such environments like CloudFlare Workers, the
    request object in the context always has the initial request object, so it was impossible to
    access the actual Request object from the execution context. Now Yoga ensures that the request
    in the context is the same with the actual Request.

v5.3.0

Compare Source

Minor Changes
  • #​3197
    f775b341
    Thanks @​n1ru4l! - Experimental support for aborting GraphQL execution
    when the HTTP request is canceled.

    The execution of subsequent GraphQL resolvers is now aborted if the incoming HTTP request is
    canceled from the client side. This reduces the load of your API in case incoming requests with
    deep GraphQL operation selection sets are canceled.

    import { createYoga, useExecutionCancellation } from 'graphql-yoga'
    
    const yoga = createYoga({
      plugins: [useExecutionCancellation()]
    })

    Learn more in our docs

    Action Required In order to benefit from this new feature, you need to update your integration
    setup for Fastify, Koa and Hapi.

    - const response = await yoga.handleNodeRequest(req, { ... })
    + const response = await yoga.handleNodeRequestAndResponse(req, res, { ... })

    Please refer to the corresponding integration guides for examples.

Patch Changes

v5.2.0

Compare Source

Minor Changes
Patch Changes

v5.1.1

Compare Source

Patch Changes

v5.1.0

Compare Source

Minor Changes

v5.0.2

Compare Source

Patch Changes

v5.0.1

Compare Source

Patch Changes

v5.0.0

Compare Source

Major Changes
Patch Changes

v4.0.5

Compare Source

Patch Changes

v4.0.4

Compare Source

Patch Changes

v4.0.3

Compare Source

Patch Changes

v4.0.2

Compare Source

Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes
Patch Changes

Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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 added the dependencies Pull requests that update a dependency file label Jun 5, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2023

⚠️ No Changeset found

Latest commit: 301c728

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

@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 2 times, most recently from b28cffd to 9804d63 Compare June 22, 2023 17:23
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 9804d63 to e23280b Compare June 28, 2023 11:38
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from e23280b to 7133ec4 Compare August 10, 2023 18:52
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 7133ec4 to f316ff3 Compare September 28, 2023 22:20
@renovate renovate bot changed the title fix(deps): update dependency graphql-yoga to v4 fix(deps): update dependency graphql-yoga to v5 Oct 16, 2023
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from f316ff3 to e700a52 Compare October 16, 2023 15:33
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from e700a52 to d389141 Compare November 30, 2023 13:00
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from d389141 to cb75de3 Compare December 8, 2023 10:55
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from cb75de3 to f182573 Compare December 22, 2023 12:13
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from f182573 to 8aed719 Compare January 3, 2024 15:57
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 8aed719 to b5218a8 Compare March 13, 2024 15:47
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from b5218a8 to fd787a3 Compare March 29, 2024 23:13
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from fd787a3 to 967a198 Compare May 8, 2024 10:02
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 967a198 to 4d6ba4c Compare June 18, 2024 10:05
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 2 times, most recently from 94cf318 to 658b4e1 Compare July 1, 2024 11:08
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 658b4e1 to 2b9fb79 Compare July 18, 2024 07:40
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 2b9fb79 to 69a9203 Compare July 25, 2024 19:26
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 3 times, most recently from 3302aea to 619da6b Compare August 8, 2024 11:15
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 2 times, most recently from 91c0aa8 to 1a390df Compare August 16, 2024 01:00
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 1a390df to 1901a28 Compare August 26, 2024 05:07
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 1901a28 to a1a8156 Compare September 16, 2024 04:33
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from a1a8156 to ba35509 Compare October 14, 2024 03:07
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from ba35509 to 744ef98 Compare October 21, 2024 03:27
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 2 times, most recently from 560f07b to e086375 Compare November 4, 2024 03:52
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 4 times, most recently from 76c3b3f to 6509b7a Compare November 14, 2024 14:09
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 2 times, most recently from 379d664 to 395291c Compare November 25, 2024 03:43
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 395291c to eec442b Compare November 29, 2024 17:15
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 2 times, most recently from 56080e2 to 2e9ae0c Compare December 14, 2024 15:01
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 3 times, most recently from 39fea28 to e1a32df Compare December 30, 2024 04:35
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from e1a32df to 37448c4 Compare January 6, 2025 12:26
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 37448c4 to 30a3fb6 Compare January 16, 2025 17:45
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 30a3fb6 to bdc5594 Compare January 27, 2025 16:42
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from bdc5594 to 5ea1c23 Compare February 6, 2025 16:40
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 2 times, most recently from df93875 to 6224b6f Compare February 24, 2025 13:06
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch 3 times, most recently from 9bad695 to 227d62b Compare March 6, 2025 16:31
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 227d62b to b0ed48f Compare March 17, 2025 18:10
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from b0ed48f to 588f033 Compare March 31, 2025 07:03
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 588f033 to 53a3343 Compare April 9, 2025 12:34
@renovate renovate bot force-pushed the renovate/major-graphql-yoga branch from 53a3343 to 301c728 Compare April 15, 2025 16:07
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.

0 participants