# jest-graphql-transform

> Jest transformer for .gql imports

Latest version **1.0.3** (published 2023-05-16) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-05-16 |
| First published | 2022-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vinccool96 |
| Maintainers | vinccool96 |
| Keywords | jest, graphql |

## Links

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

## Dependencies (4)

- [jest](https://npm.io/package/jest.md) x
- [@jest/core](https://npm.io/package/@jest/core.md) ^29.5.0
- [graphql-tag](https://npm.io/package/graphql-tag.md) >=2
- [@jest/transform](https://npm.io/package/@jest/transform.md) ^29.5.0

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

- 1.0.3 (latest) — 2023-05-16
- 1.0.2 — 2022-11-29
- 1.0.1 — 2022-11-29
- 1.0.0 — 2022-11-29

## 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-graphql-transform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
