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

Support for Relay Modern with babel-plugin-relay #2907

Closed
renatonmendes opened this issue Aug 5, 2017 · 4 comments
Closed

Support for Relay Modern with babel-plugin-relay #2907

renatonmendes opened this issue Aug 5, 2017 · 4 comments

Comments

@renatonmendes
Copy link

I´m building my first GraphQL and Relay project using a GraphQL server, a create-react-app client and following the instructions on babel-plugin-relay to make my code recognize the graphql syntax graphql.

After setting up the whole environment, I´ve build the GraphQL server. All fine and working.

When I moved to client, I simply could not use babel-plugin-relay as instructed in the official documentation. After hours trying to solve I found out that the babel-plugin-relay can only be added to create-react-app if we eject the project.

Both create-react-app and babel-plugin-relay were born at Facebook, as well as Relay, and I see no reason why create-react-app does not support babel-plugin-relay without ejecting. Seens to be a couple of lines addition to current create-react-app babel configuration version, so:

a) Is is planned a version of create-react-app that will support the babel-plugin-relay required for Relay Modern ?

b) Considering the current situation, what is the best approach to include babel-plugin-relay to create-react-app without ejecting ?

@shanewilson
Copy link

Maybe this will help?
https://github.com/shanewilson/jailbreak-react-scripts#adding-relay-to-cra

There are some other project along the same lines if that one doesn't work for you.

@renatonmendes
Copy link
Author

renatonmendes commented Aug 10, 2017

I have already included create-react-app in my project, but my proposal is to adopt it natively in the create-react-app project. It is a proposal.

@maletor
Copy link

maletor commented Aug 11, 2017

#2343

@gaearon
Copy link
Contributor

gaearon commented Jan 8, 2018

Closing as a duplicate of #2001.

@gaearon gaearon closed this as completed Jan 8, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants