Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babel-relay-plugin reference to graphql too tight #1400

Closed
sedubois opened this issue Sep 30, 2016 · 2 comments
Closed

babel-relay-plugin reference to graphql too tight #1400

sedubois opened this issue Sep 30, 2016 · 2 comments

Comments

@sedubois
Copy link

sedubois commented Sep 30, 2016

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.

@sedubois
Copy link
Author

Here is some documentation on the currently necessary workarounds: https://github.com/graphcool/babel-plugin-react-relay/pull/11/files

@josephsavona
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants