Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Figure out how to run Relay without Babel 6 #7

Closed
stubailo opened this issue Feb 9, 2016 · 4 comments
Closed

Figure out how to run Relay without Babel 6 #7

stubailo opened this issue Feb 9, 2016 · 4 comments
Assignees

Comments

@stubailo
Copy link
Contributor

stubailo commented Feb 9, 2016

It's annoying that you need a specific babel plugin to compile Relay.QL template strings at build time. Specifically, you need to:

  1. Compile your server
  2. Run the introspection query and save the result to a file
  3. Pass that result into a Babel 6 plugin to compile your client code
  4. Run your client

This has several unfortunate consequences, in particular:

  1. You absolutely need to use Babel 6
  2. You can't easily develop the client and server in parallel (if one person is working on both) because of the multitude of compilation steps above
  3. You can't easily play around with queries in the browser console

It's pretty easy to run the parser at runtime in development mode, and this will make it much easier to work around the drawbacks above.

I should publish this as an NPM package so that you can use Relay.QL just like you would use any template string.

@stubailo stubailo self-assigned this Feb 9, 2016
@stubailo stubailo changed the title Publish module to run Relay babel plugin on the client against a running server's schema Publish NPM module to run Relay babel plugin on the client against a running server's schema Feb 9, 2016
@stubailo stubailo mentioned this issue Feb 9, 2016
@ramsaylanier
Copy link

Not sure of your progress - but this idea seems to be idea: configuring the GraphQL schema from .babelrc.

facebook/relay#819

@stubailo
Copy link
Contributor Author

@ramsaylanier the goal here is a bit more ambitious. I'd like to run Relay without Babel entirely. I think having to set up a specific build toolchain just to use a client library doesn't make sense, and makes it a lot harder for people to adopt.

@stubailo stubailo changed the title Publish NPM module to run Relay babel plugin on the client against a running server's schema Figure out how to run Relay without Babel 6 Feb 11, 2016
@ramsaylanier
Copy link

Ah okay - if we are trying to remove Babel from the entire equation that makes sense - which of course you mentioned in the OP. Whoops.

@stubailo
Copy link
Contributor Author

I believe I have a working version of this: https://github.com/meteor/relay-runtime-query

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

2 participants