-
Notifications
You must be signed in to change notification settings - Fork 2k
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
GraphQL babel transform collides with react-native packager #414
Comments
As for facebook/react-native@ec5016a - I just complied with the new API of Going forward I hope we could precompile ES6 code before publishing react-native to npm, we'll be sharing 2016 H2 plans in a few weeks |
One solution (maybe over complicated) will be to split graphql-js into smaller package, and build a version of the parser (which aim's to be used client side too) in plain ES5 without babel modules that that can collides with packager. What do you think @leebyron ? |
In the meanwhile we have removed the dependency on You can use this yourself if you run into the problem via this package: https://github.com/apollostack/graphql-tag |
Yep : I migrated my stuff to use this hack. |
Lol, maybe we can remove all of the hacks we put in yesterday :P @abhiaiyer91 time to celebrate! |
A version with this fix in is heading to npm as v0.6.1 right now |
( This was also reported at apollo side : apollographql/apollo-client#261)
I was trying to use Apollo Client on React-Native.
I did get a red error screen.
My
package.json
is:and give I just run
npm install
apollo-client resolve graphql-js to 0.6.0My
<APP_DIR>/.babelrc
is simple:My initial thought is that somehow, react-native packager collides with graphql-js babel regenerator-runtime, used to transform arrow function.
There is a lot of possible stuff which can be made outside of this repo to solve the root problem, like maintaining a graphql/language fork, changing apollo-stack build to include a bundled version of graphql ect. But you may have a better solution.
Given that one week or two ago, on react-native 0.24 and graphql 0.6.0, it was working without issue, it may be related to recent react-native change like facebook/react-native@ec5016a (cc @bestander @benjamn).
The text was updated successfully, but these errors were encountered: