Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-react-relay

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-relay

Babel plugin for Relay (react-relay) with easy schema configuration in .babelrc

  • 0.9.2-3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

babel-plugin-react-relay npm version

Babel plugin for Relay which works out of the box with your GraphQL endpoint

How does this relate to babel-relay-plugin?

This package uses babel-relay-plugin internally but makes usage more convenient and extends its functionality. For example you no longer need to have a build/babelRelayPlugin.js script.

(The version is the same as babel-relay-plugin by the way.)

Install

$ npm install -D babel-plugin-react-relay

Configuration

Note: We recently switched over to graphql-config, so this might be a breaking change for you.

Step 1: Add plugin to .babelrc

Add the following to your .babelrc file or the corresponding babel configuration.

{
	"plugins": ["react-relay"]
}

Step 2: Configure your GraphQL schema

This plugin uses the graphql-config format and already works out of the box if you're using another GraphQL dev tool such as this great IntelliJ Plugin.

Add one of the following source options to your package.json file. See here for more configuration details.

For your convenience, here is the easiest way to configure your GraphQL endpoint:

export GRAPHQL_ENDPOINT="https://your.api/graphql"

License

MIT License

Help & Community Slack Status

Join our Slack community if you run into issues or have questions. We love talking to you!

Keywords

FAQs

Package last updated on 11 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc