Notable Peru Mariachis

    @graphql-tools/jest-transform
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.1 • Public • Published

    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
        }
      }
    }

    Keywords

    none

    Install

    npm i @graphql-tools/jest-transform

    DownloadsWeekly Downloads

    18,318

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    5.06 kB

    Total Files

    7

    Last publish

    Collaborators

    • dotansimha
    • urigo
    • ardatan