relay-compiler-language-coffeescript
v2.2.1
Published
A language plugin for Relay that adds CoffeeScript support.
Downloads
26
Readme
relay-compiler-language-coffeescript
A language plugin for Relay that adds CoffeeScript support.
Requires relay
>=1.7; if you are using an older version, see this project
for a workaround.
The plugin registers itself for both .js/.jsx and .coffee/.cjsx extensions, since Relay doesn't support composing or using multiple plugins.
To use, install:
npm install --save-dev relay-compiler-language-coffeescript
And then run relay-compiler
by specifying the plugin:
relay-compiler --language coffeescript --schema schema.json --src src
Queries in CoffeeScript work much the same way as in JS, but uses regular quotes instead of backticks:
MyQuery = graphql"
query MyQuery {
...
}
"