-
Notifications
You must be signed in to change notification settings - Fork 23
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
Relay Modern #5
Relay Modern #5
Conversation
You're the man :) This is a best example of Relay Modern so far |
package.json
Outdated
@@ -51,6 +52,8 @@ | |||
"clear": "node node_modules/react-native/local-cli/cli.js start --reset-cache", | |||
"lint": "eslint src", | |||
"lint:staged": "lint-staged", | |||
"relay": "relay-compiler --src ./src --schema data/schema.graphql", | |||
"relay:watch": "relay-compiler --src ./src --schema data/schema.graphql --watch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do "relay:watch": "yarn relay -- --watch"
to pass an argument to another yarn script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upgraded tks
.babelrc
Outdated
], | ||
"plugins": [ | ||
"./plugins/babelRelayPlugin" | ||
["relay", {"compat": true, "schema": "data/schema.json"}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can just be ["relay"] unless compatibility mode is needed
https://facebook.github.io/relay/docs/babel-plugin-relay.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm reaching this issue here: facebook/relay#1665
I'll try without compat
mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, didn't know about that
fix #2