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

Relay Modern #2001

Closed
bogdansoare opened this issue Apr 20, 2017 · 13 comments
Closed

Relay Modern #2001

bogdansoare opened this issue Apr 20, 2017 · 13 comments
Milestone

Comments

@bogdansoare
Copy link
Contributor

Any plans to support Relay Modern without ejecting in the future?

@Xuhao
Copy link
Contributor

Xuhao commented Apr 28, 2017

@gaearon
Copy link
Contributor

gaearon commented May 1, 2017

Eventually, but not in the nearest future.

@lpalmes
Copy link
Contributor

lpalmes commented May 24, 2017

@gaearon I've built a react-scripts fork that has babel-relay-plugin and a get-schema script when the user needs to download it's schema from the graphql server. I'm using this for my projects that were created with react-scripts and it works perfectly.

Im working on detecting whenever the user has react-relay in their dependencies to install babel-relay-plugin on demand. Then it could be merged to cra?

@gaearon
Copy link
Contributor

gaearon commented May 25, 2017

I’m not really opposed to adding babel-relay-plugin by default either: #2343. But I want to better understand if it breaks anyone else.

@cbranch101
Copy link

@lpalmes We're building off of your fork and would like to make some modifications, but it looks like you haven't linked the github repo yet. Would it be possible to do that when you get a chance?

@lpalmes
Copy link
Contributor

lpalmes commented Jun 13, 2017

Sure @cbranch101, i was using it only for my projects, but i'm glad it helps others. I will push it to github, sorry about that

@lpalmes
Copy link
Contributor

lpalmes commented Jun 14, 2017

Hey @cbranch101, there you go: https://github.com/lpalmes/relay-modern-scripts,
I've added a small script that i use for my projects, react-scripts get-schema http://yourapi.com/graphql that downloads your schema and saves it as schema.graphql, i'm constantly modifying my schema, so it's really handy to have a script in your package with your server url

@cbranch101
Copy link

cbranch101 commented Jun 14, 2017

@lpalmes Thanks a lot! And get-schema works great. It's actually what we want to extend. We need to add one more step to also download the introspection query needed for the GraphQL eslint plugin.

@lpalmes
Copy link
Contributor

lpalmes commented Jun 14, 2017

That sounds very handy, if you do so please send a pr so we can all benefit, thanks!

@koistya
Copy link
Contributor

koistya commented Aug 7, 2017

Here is an example, how to use create-react-app with Relay Modern (without ejecting):

https://github.com/kriasoft/react-static-boilerplate

@maletor
Copy link

maletor commented Aug 17, 2017

@gaearon
Copy link
Contributor

gaearon commented Jan 8, 2018

That's incredibly fragile. I think it's irresponsible to advertise this to beginners when it can break in any patch version. 😞

Filed as kriasoft/react-firebase-starter#278.

@gaearon
Copy link
Contributor

gaearon commented Aug 14, 2018

This is going to be supported in the next release of Relay via Babel macros.
#2343 (comment)

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

No branches or pull requests

7 participants