github mswjs/msw v0.22.0

latest releases: v2.3.0, v2.2.14, v2.2.13...
3 years ago

Breaking changes

Features

  • Supports setting both ctx.data and ctx.errors in GraphQL responses (#401, #403).
graphql.query('GetUser', (req, res, ctx) => {
  return res(
    ctx.data({ id: 'abc-123' }),
    ctx.errors([
      { message: 'Failed to get user posts' }
    ])
  )
})
  • Supports creation of custom response transformers (#440, #441).

Bug fixes

  • Fixes an issue that resulted into inferred response status texts always set to "OK" (#438).

Don't miss a new msw release

NewReleases is sending notifications on new releases.