Description
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 ?