2.0.0 • Published 12 months ago

@graphql-tools/jest-transform v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

GraphQL Jest Transform

A Jest transformer to preprocess GraphQL Documents (operations, fragments and SDL)

yarn add @graphql-tools/jest-transform

In your package.json:

{
  "jest": {
    "transform": {
      "\\.(gql|graphql)$": "@graphql-tools/jest-transform"
    }
  }
}

or jest.config.js:

module.exports = {
  // ...
  transform: {
    '\\.(gql|graphql)$': '@graphql-tools/jest-transform'
  }
}

How is it different from jest-transform-graphql? It doesn't use graphql-tag/loader under the hood but our own, more optimized and customisable @graphql-tools/webpack-loader.

Options

  • noDescription (default: false) - removes descriptions
  • esModule (default: false) - uses import and export statements instead of CommonJS
{
  "globals": {
    "graphql": {
      "noDescription": true
    }
  }
}
2.0.0

12 months ago

1.2.3

1 year ago

1.2.2

2 years ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.0.0

3 years ago