Skip to content

Conversation

@pieh
Copy link
Contributor

@pieh pieh commented Apr 18, 2018

closes #4159

Signed-off-by: Michal Piechowiak <[email protected]>
{
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

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
@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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants