summaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-05-15 11:41:41 -0400
committerGitHub <noreply@github.com>2018-05-15 11:41:41 -0400
commitfc43594e43cdcba82930c788012d0e7ad7110ccd (patch)
tree323764f4d91cd5bdf7c658be432c244fde05984e /frontend
parentb70155110425b283e9b550a9c0cfec00f0f93c10 (diff)
parentb5777a7ea315e170ed56240e8fb6f8cdda9d9949 (diff)
Merge pull request #4 from lfades/master
Support for graphql files in both Next and Jest
Diffstat (limited to 'frontend')
-rw-r--r--frontend/next.config.js3
-rw-r--r--frontend/package.json8
2 files changed, 10 insertions, 1 deletions
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": [
"<rootDir>/.next/",
"<rootDir>/node_modules/"
- ]
+ ],
+ "transform": {
+ "\\.(gql|graphql)$": "jest-transform-graphql",
+ ".*": "babel-jest"
+ }
},
"babel": {
"env": {