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

Can't parse Relay.QL... in coffeescript #1153

Closed
huan-ji opened this issue May 19, 2016 · 1 comment
Closed

Can't parse Relay.QL... in coffeescript #1153

huan-ji opened this issue May 19, 2016 · 1 comment

Comments

@huan-ji
Copy link

huan-ji commented May 19, 2016

Currently I am unable to write Relay queries next to React components because there is no way to escape the Relay queries in coffeescript. Is there some way to even implement a local hotfix to allow writing of Relay queries in coffeescript? Thanks.

@wincent
Copy link
Contributor

wincent commented May 19, 2016

Thanks for the question @huan-ji. We don't use CoffeeScript here at FB, so for now we're focusing on supporting JS. As it is, you need to run the Babel plug-in to transform those template literals into the corresponding runtime representation, so if you could solve the syntax issue on the CoffeeScript side, you'd still need to set things up carefully such that Babel could run over the transformed JS that comes out of your CoffeeScript build pipeline.

I think in the interim your best bet may be to follow the suggestion in jashkenas/coffeescript#1504 (which I can see you commented on), and put the fragments in JS files instead. Not ideal, but it is a workaround.

I'm going to close this, but if anybody has grappled with this issue before and wants to add some insight, please feel free to go ahead.

@wincent wincent closed this as completed May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants