Skip to content

jagi/jest-transform-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@jagi/jest-transform-graphql

This package allows you to import your GraphQL queries directly from the *.gql files in Jest.

import USER_QUERY from "./graphql/userQuery.gql";

Usage

In your package.json file:

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

Or in your jest.config.js file:

module.exports = {
  transform: {
    "\\.(gql|graphql)$": "@jagi/jest-transform-graphql"
    /* ... */
  }
  /* ... */
};

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published