Skip to content
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

Merged
merged 1 commit into from
Apr 20, 2018
Merged

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Apr 18, 2018

closes #4159

Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@pieh pieh added this to To Do in Gatsby v2 Release via automation Apr 18, 2018
@@ -14,7 +14,7 @@ module.exports = schema => {
`error`,
{
env: `relay`,
schemaString: printSchema(schema),
schemaString: printSchema(schema, { commentDescriptions: true }),
Copy link
Contributor Author

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,
Copy link
Contributor Author

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(
Copy link
Contributor Author

@pieh pieh Apr 18, 2018

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

Copy link
Contributor

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!

Copy link
Contributor Author

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

@pieh pieh moved this from To Do to In progress in Gatsby v2 Release Apr 19, 2018
Copy link
Contributor

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@KyleAMathews KyleAMathews merged commit 7df551e into gatsbyjs:v2 Apr 20, 2018
Gatsby v2 Release automation moved this from In progress to Done Apr 20, 2018
@KyleAMathews
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants