commerceql icon indicating copy to clipboard operation
commerceql copied to clipboard

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

Open renovate[bot] opened this issue 8 months ago • 0 comments

Mend Renovate

This PR contains the following updates:

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

Release Notes

dotansimha/graphql-yoga (graphql-yoga)

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

v3.9.1

Compare Source

Patch Changes

v3.9.0

Compare Source

Minor Changes

v3.8.1

Compare Source

Patch Changes

v3.8.0

Compare Source

Minor Changes
Patch Changes

v3.7.3

Compare Source

Patch Changes

v3.7.2

Compare Source

Patch Changes

v3.7.1

Compare Source

Patch Changes

v3.7.0

Minor Changes
Patch Changes

v3.6.1

Patch Changes
  • 3c8c8434 Thanks @​ardatan! - Replace LRU caching with lazy URL construction, avoid unnecessary parse and validate invocation and CORS

v3.6.0

Minor Changes
Patch Changes

v3.5.1

Patch Changes

v3.5.0

Minor Changes
  • #​2364 03597a5a Thanks @​n1ru4l! - export the yoga default format error function.

    import { createYoga, maskError } from 'graphql-yoga'
    
    const yoga = createYoga({
      maskedErrors: {
        maskError(error, message, isDev) {
          if (error?.extensions?.code === 'DOWNSTREAM_SERVICE_ERROR') {
            return error
          }
    
          return maskError(error, message, isDev)
        }
      }
    })
    

v3.4.1

Compare Source

Patch Changes

v3.4.0

Compare Source

Patch Changes

v3.3.0

Compare Source

Minor Changes
Patch Changes

v3.2.1

Compare Source

Patch Changes

v3.2.0

Compare Source

Minor Changes
Patch Changes

v3.1.2

Compare Source

Patch Changes

v3.1.1

Compare Source

Patch Changes

v3.1.0

Compare Source

Minor Changes
Patch Changes

v3.0.3

Compare Source

Patch Changes

v3.0.2

Compare Source

Patch Changes

v3.0.1

Compare Source

Patch Changes

v3.0.0

Compare Source

Major Changes
  • 2e0c4824 Thanks @​b4s36t4! - Drop Node 12 Support

    GraphQL Yoga no longer supports Node 12 which is no longer an LTS version. GraphQL Yoga now needs Node 14 at least.

  • #​2012 720898db Thanks @​saihaj! - Remove .inject method to mock testing. Users should replace to use fetch method for testing.

    Checkout our docs on testing https://www.the-guild.dev/graphql/yoga-server/v3/features/testing.

    import { createYoga } from 'graphql-yoga'
    import { schema } from './schema'
    
    const yoga = createYoga({ schema })
    
    - const { response, executionResult } = await yoga.inject({
    -   document: "query { ping }",
    - })
    
    + const response = await yoga.fetch('http://yoga/graphql', {
    +   method: 'POST',
    +   headers: {
    +     'Content-Type': 'application/json',
    +   },
    +   body: JSON.stringify({
    +     query: 'query { ping }',
    +   }),
    + })
    + const executionResult = await response.json()
    
    console.assert(response.status === 200, 'Response status should be 200')
    console.assert(executionResult.data.ping === 'pong',`Expected 'pong'`)
    
  • #​1753 eeaced00 Thanks @​ardatan! - schema no longer accepts an object of typeDefs and resolvers but instead you can use createSchema to create a GraphQL schema.

  • #​1516 209b1620 Thanks @​ardatan! - Now it is possible to decide the returned Content-Type by specifying the Accept header. So if Accept header has text/event-stream without application/json, Yoga respects that returns text/event-stream instead of application/json.

  • #​1808 02d2aecd Thanks @​enisdenjo! - Drop readinessCheckEndpoint in favor of the useReadinessCheck plugin

    See docs for more information

  • #​1473 c4b3a9c8 Thanks @​ardatan! - Replace GraphQLYogaError in favor of GraphQLError.

    Check the documentation to see how to use GraphQLError

  • #​1660 71554172 Thanks @​saihaj! - Update to the latest version of the envelop useMaskedError plugin.

    • Removed handleValidationErrors and handleParseErrors
    • Renamed formatError to maskError

    Checkout Envelop docs for more details

  • #​2091 1d508495 Thanks @​ardatan! - Export only specific utilities from @envelop/core.

Minor Changes
  • #​1966 6e250209 Thanks @​saihaj! - Use @graphql-tools/executor as a default GraphQL Executor in favor of graphql-js.

  • #​1497 1d7f810a Thanks @​ardatan! - Support a schema factory function that runs per request or a promise to be resolved before the first request.

    createYoga({
      schema(request: Request) {
        return getSchemaForToken(request.headers.get('x-my-token'))
      }
    })
    
    async function buildSchemaAsync() {
      const typeDefs = await fs.promises.readFile('./schema.graphql', 'utf8')
      const resolvers = await import('./resolvers.js')
      return makeExecutableSchema({ typeDefs, resolvers })
    }
    
    createYoga({
      schema: buildSchemaAsync()
    })
    
  • #​1662 098e139f Thanks @​ardatan! - - Batching RFC support with batchingLimit option to enable batching with an exact limit of requests per batch.

    • New onParams hook that takes a single GraphQLParams object
    • Changes in onRequestParse and onRequestParseDone hook
    • Now onRequestParseDone receives the exact object that is passed by the request parser so it can be GraphQLParams or an array of GraphQLParams so use onParams if you need to manipulate batched execution params individually.
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 has been generated by Mend Renovate. View repository job log here.

renovate[bot] avatar Oct 16 '23 17:10 renovate[bot]