babel-relay-plugin reference to graphql too tight
sedubois opened this issue · 2 comments
As this GraphQL issue mentions, there should be a single graphql dependency within node_modules
. However, because babel-relay-plugin
's dependency on graphql
is so tight (currently graphql@^0.6.0
), tools such as babel-plugin-react-relay are unable to meet this requirement, which makes use of graphql-js configuration style quite difficult (discussion).
Would it be possible to loosen the required graphql version, or if not possible for some reason to ensure that it remains up to date with the latest available graphql? It might also help to make graphql a peer dependency? For example in monorepo projects with both frontend and backend, anyway it makes sense to explicitly reference graphql
in package.json
.
Here is some documentation on the currently necessary workarounds: https://github.com/graphcool/babel-plugin-react-relay/pull/11/files
The right answer here is for babel-relay-plugin to be more easily configurable. There are some related issues for this and we're iterating on the plugin at the moment, we'll definitely keep this in mind. Thanks for the feedback!