# jest-transform-graphql

> Jest transformer for .gql imports

Latest version **2.1.0** (published 2017-05-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install jest-transform-graphql
pnpm add jest-transform-graphql
yarn add jest-transform-graphql
bun add jest-transform-graphql
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2017-05-16 |
| First published | 2016-12-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 122 |
| Author | Turadg Aleahmad |
| Maintainers | remind |
| Keywords | jest, graphql |

## Links

- npm: https://www.npmjs.com/package/jest-transform-graphql
- Repository: https://github.com/remind101/jest-transform-graphql
- Homepage: https://github.com/remind101/jest-transform-graphql#readme
- Issues: https://github.com/remind101/jest-transform-graphql/issues
- npm.io page: https://npm.io/package/jest-transform-graphql

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2017-05-16
- 2.0.0 — 2017-04-26
- 1.0.0 — 2016-12-16

## README

# jest-transform-graphql

[`graphql-tag` loader for Webpack](http://dev.apollodata.com/react/webpack.html) lets you keep GraphQL queries in separate files.

This lib makes those work in Jest.

## Usage

In your package.json,
```
  "jest": {
    "transform": {
      "\\.(gql|graphql)$": "jest-transform-graphql",
      ".*": "babel-jest"
    }
```


You have to include the `.*` matcher because once you define the `transform` property, it overrides that default.

For more on configuring Jest mappers, see Jest's [Webpack tutorial](https://facebook.github.io/jest/docs/tutorial-webpack.html).

---
_Source: https://npm.io/package/jest-transform-graphql · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
