babel-plugin-react-relay
Advanced tools
Comparing version 0.9.3 to 0.10.0
@@ -25,2 +25,3 @@ 'use strict'; | ||
// this error could happen while downloading the schema | ||
if (error) { | ||
@@ -30,2 +31,6 @@ throw error; | ||
if (schema.errors) { | ||
throw new Error(JSON.stringify(schema.errors)); | ||
} | ||
if (schema.data) { | ||
@@ -32,0 +37,0 @@ return (0, _babelRelayPlugin2.default)(schema.data)(babel); |
{ | ||
"name": "babel-plugin-react-relay", | ||
"version": "0.9.3", | ||
"version": "0.10.0", | ||
"description": "Babel plugin for Relay (react-relay) with easy schema configuration in .babelrc", | ||
@@ -42,6 +42,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"babel-relay-plugin": "0.9.3", | ||
"babel-relay-plugin": "^0.10.0", | ||
"deasync": "^0.1.7", | ||
"graphql-config-parser": "^1.1.1" | ||
"graphql-config-parser": "^1.2.0" | ||
} | ||
} |
@@ -42,2 +42,27 @@ # babel-plugin-react-relay [![npm version](https://badge.fury.io/js/babel-plugin-react-relay.svg)](https://badge.fury.io/js/babel-plugin-react-relay) | ||
## Troubleshooting | ||
### Using `graphql-js` as configuration option | ||
For those intending to directly reference their backend `schema.js`, you will need to ensure a single version of `graphql` exists in `node_modules`. However as of this writing, `babel-relay-plugin` and `graphql-config-parser` reference incompatible versions of `graphql` ([context](https://github.com/facebook/relay/issues/1400)). A workaround is to force the graphql dependency within `npm-shrinkwrap.json` at your project's root (make sure to adapt as currently relevant): | ||
``` | ||
{ | ||
"dependencies": { | ||
"babel-relay-plugin": { | ||
"version": "0.9.3", | ||
"from": "babel-relay-plugin@0.9.3", | ||
"dependencies": { | ||
"graphql": { | ||
"version": "0.7.1", | ||
"from": "graphql@0.6.2" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
Then run `npm prune`, `npm install` and `npm dedupe` for good measure. | ||
## License | ||
@@ -44,0 +69,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6256
40
77
+ Addedbabel-relay-plugin@0.10.0(transitive)
+ Addedgraphql@0.8.2(transitive)
- Removedbabel-relay-plugin@0.9.3(transitive)
- Removedgraphql@0.13.20.6.2(transitive)
- Removediterall@1.3.0(transitive)
Updatedbabel-relay-plugin@^0.10.0
Updatedgraphql-config-parser@^1.2.0