-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[v2] relay-compiler update #5041
Conversation
Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@@ -14,7 +14,7 @@ module.exports = schema => { | |||
`error`, | |||
{ | |||
env: `relay`, | |||
schemaString: printSchema(schema), | |||
schemaString: printSchema(schema, { commentDescriptions: true }), |
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.
for reference: graphql/graphql-js#927
ArgumentsOfCorrectTypeRule, | ||
DefaultValuesOfCorrectTypeRule, | ||
ValuesOfCorrectTypeRule, | ||
VariablesDefaultValueAllowedRule, |
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.
from graphql v.0.12 release notes:
Code which relied on repeating the standard validation rules, or filtered them down using whitelists or blacklists may need to be updated. The rules ArgumentsOfCorrectTypeRule and DefaultValuesOfCorrectTypeRule have been removed and are replaced with two new rules ValuesOfCorrectTypeRule and VariablesDefaultValueAllowedRule. While the quality of validation errors are improved by this change, this does not actually cause any existing valid documents to become invalid or vice-versa.
// in input objects widely used in gatsby, and therefore removing | ||
// variable declaration from queries. | ||
// As a temporary workaround remove that transform by slicing printTransforms. | ||
const printContext = printTransforms.slice(0, -1).reduce( |
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.
this is very hacky - I pinned relay-compiler to 1.5.0 and have working fix for that locally ( pieh/relay@ccfa12a ). Will need to get to know contributing rules on relay monorepo, run tests etc to send PR upstream
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.
😅 glad you're on this!
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.
For reference - facebook/relay#2417
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.
LGTM!
Thanks! |
closes #4159