relay-compiler-language-scalajs
A compiler tool for building GraphQL-driven Scala.js applications.
Last updated 18 days ago by dispalt .
Apache-2.0 · Repository · Original npm · Tarball · package.json
$ cnpm install relay-compiler-language-scalajs 
SYNC missed versions from official npm registry.

relay-compiler-language-scalajs

The purpose of this project is to generate Scala.js bindings for the relay-compiler. Typically the relay-compiler generates flow bindings along with the compiled queries. This project replaces that generation and outputs js.native traits instead. It should work on most "normal" gql features. If I personally run across something not supported I try to add it, but it is by no means totally complete.

This project uses flow because it's what relay uses, and its better than raw javascript.

It uses artifactDirectory to generate all the source files and whatnot in the same package. So its a big flat package repository in the same directory. Typically (resourceManaged in Compile).value / "relay-compiler-out" is where it outputs in sbt parlance.

Versions

  • 0.22.2 - Relay 6.0.0
  • 0.20.1 - Relay 2,0,0
  • 0.11.0 - Relay 1.6.2
  • 0.9.0 - Relay 1.5.0
  • 0.8.2 - Relay 1.4.0

Example

$ ./node_modules/bin/relay-compiler --language scalajs --src example/src/ --schema example/schema.graphql --artifactDirectory example/out

Features

  • Handles names elegantly by scoping them to the companion object.
  • Provides two ways to customize the output
  • @scalajs(extends: String) This can give you a parent class to mixin. It's your job to verify it.
  • @scalajs(useNulls: Boolean) this can give you finer control on using A | Null on a Fragment, field or inline fragment.

Example

Looking at the sbt tests is the best way to get a handle on how things work.

Basic Test

Dev

Current Tags

  • 0.23.0                                ...           latest (18 days ago)

35 Versions

  • 0.23.0                                ...           18 days ago
  • 0.22.12                                ...           4 months ago
  • 0.22.11                                ...           4 months ago
  • 0.22.8                                ...           5 months ago
  • 0.22.7                                ...           6 months ago
  • 0.22.6                                ...           6 months ago
  • 0.22.5                                ...           7 months ago
  • 0.22.4                                ...           7 months ago
  • 0.22.3                                ...           7 months ago
  • 0.22.2                                ...           7 months ago
  • 0.22.1                                ...           7 months ago
  • 0.22.0                                ...           7 months ago
  • 0.21.5                                ...           10 months ago
  • 0.21.4                                ...           10 months ago
  • 0.21.3                                ...           a year ago
  • 0.21.2                                ...           a year ago
  • 0.21.1                                ...           a year ago
  • 0.21.0                                ...           a year ago
  • 0.20.6                                ...           a year ago
  • 0.20.5                                ...           a year ago
  • 0.20.4                                ...           a year ago
  • 0.20.3                                ...           a year ago
  • 0.20.3-SNAPSHOT                                ...           a year ago
  • 0.1.5-8                                ...           a year ago
  • 0.1.5-7                                ...           a year ago
  • 0.1.5-6                                ...           a year ago
  • 0.1.5-5                                ...           a year ago
  • 0.1.5-4                                ...           a year ago
  • 0.1.5-3                                ...           a year ago
  • 0.1.5-2                                ...           a year ago
  • 0.1.5-1                                ...           a year ago
  • 0.1.5                                ...           a year ago
  • 0.1.4                                ...           a year ago
  • 0.1.3                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 13
Dependencies (9)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |