From c1bba67bb267adf2597a0ed5d0035d81dbdb412b Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Tue, 15 May 2018 10:24:31 -0500 Subject: Config for .graphql files --- frontend/next.config.js | 3 +++ frontend/package.json | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 frontend/next.config.js (limited to 'frontend') diff --git a/frontend/next.config.js b/frontend/next.config.js new file mode 100644 index 0000000..4aa3ab0 --- /dev/null +++ b/frontend/next.config.js @@ -0,0 +1,3 @@ +const withGraphql = require('next-plugin-graphql') + +module.exports = withGraphql() diff --git a/frontend/package.json b/frontend/package.json index 9979370..ae412be 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -42,6 +42,8 @@ "enzyme-to-json": "^3.3.3", "graphql-tools": "^3.0.1", "jest": "^22.4.3", + "jest-transform-graphql": "^2.1.0", + "next-plugin-graphql": "0.0.1", "waait": "^1.0.2" }, "//": "This is out babel config, I prefer this over a .babelrc file", @@ -50,7 +52,11 @@ "testPathIgnorePatterns": [ "/.next/", "/node_modules/" - ] + ], + "transform": { + "\\.(gql|graphql)$": "jest-transform-graphql", + ".*": "babel-jest" + } }, "babel": { "env": { -- cgit v1.3