A Relay compiler language plugin that generates Scala.js bindings (js.native traits) instead of Flow types for GraphQL-driven Scala.js applications. Compatible with Relay 11.0.2, graphql ^15.4.0, and relay-runtime ^11.0.2. The plugin outputs compiled queries as Scala.js native traits, supports custom output via @scalajs directives (extends, useNulls), and uses artifactDirectory for flat package generation. Release cadence is irregular with minor version bumps for dependency updates. Differentiator: enables Relay for Scala.js/React.js integration, not maintained by the core Relay team.
npm install relay-compiler-language-scalajsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs required packages and shows relay-compiler invocation to generate Scala.js bindings.
Ensure relay-compiler version is pinned to 11.0.2.
Configure artifactDirectory to a dedicated output directory, not mixed with sources.
Ensure the extended class exists in Scala.js scope.
Use GraphQL 15.4.x or compatible.
Run: npm install --save-dev relay-compiler-language-scalajs
Ensure relay-compiler@11.0.2 is installed and package is in node_modules.
Provide valid .graphql schema path via --schema.
Only use @scalajs on fragments, fields, or inline fragments.