React-Relay depends on an exact-version of babel-relay-plugin as a peerDependency
babel-relay-plugin depends on an exact-version of graphql-js
Using npm3, you can do one of two things if you want to use graphql in your application.
- Keep an exact-match of the graphql dependency in babel-relay-plugin in your package.json
- Not include graphql as a dependency, which will cause babel-relay-plugin to cause the installation of graphql. This provides more flexibility to the application at the risk of no longer having explicit dependencies.
Keeping an inaccurate version of graphql (such as
^0.4.12) will cause two versions of graphql to be installed. One is used by the babel-relay-plugin and one by the application. This difference can cause incompatibilities which are hard to diagnose.