Skip to content

Commit

Permalink
update relay-compiler (#5041)
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
  • Loading branch information
pieh authored and KyleAMathews committed Apr 20, 2018
1 parent 5c9569c commit 7df551e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
10 changes: 5 additions & 5 deletions packages/gatsby/package.json
Expand Up @@ -49,7 +49,7 @@
"eslint-config-react-app": "^2.1.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-flowtype": "^2.46.1",
"eslint-plugin-graphql": "^1.5.0",
"eslint-plugin-graphql": "^2.0.0",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.7.0",
Expand All @@ -65,8 +65,8 @@
"gatsby-link": "^1.6.38-3",
"gatsby-react-router-scroll": "^1.0.12-2",
"glob": "^7.1.1",
"graphql": "^0.11.7",
"graphql-relay": "^0.5.1",
"graphql": "^0.13.2",
"graphql-relay": "^0.5.5",
"graphql-skip-limit": "^1.0.11-2",
"history": "^4.6.2",
"invariant": "^2.2.4",
Expand Down Expand Up @@ -107,7 +107,7 @@
"react-router": "^4.1.1",
"react-router-dom": "^4.1.1",
"redux": "^3.6.0",
"relay-compiler": "1.4.1",
"relay-compiler": "1.5.0",
"remote-redux-devtools": "^0.5.7",
"serve": "^6.5.3",
"shallow-compare": "^1.2.2",
Expand Down Expand Up @@ -174,7 +174,7 @@
"url": "git+https://github.com/gatsbyjs/gatsby.git"
},
"resolutions": {
"graphql": "^0.11.7"
"graphql": "^0.13.2"
},
"scripts": {
"build": "rimraf dist && npm run build:src && npm run build:internal-plugins && npm run build:rawfiles",
Expand Down
Expand Up @@ -26,8 +26,8 @@ import type { DocumentNode, GraphQLSchema } from "graphql"
const { printTransforms } = IRTransforms

const {
ArgumentsOfCorrectTypeRule,
DefaultValuesOfCorrectTypeRule,
ValuesOfCorrectTypeRule,
VariablesDefaultValueAllowedRule,
FragmentsOnCompositeTypesRule,
KnownTypeNamesRule,
LoneAnonymousOperationRule,
Expand All @@ -46,8 +46,8 @@ type RootQuery = {
type Queries = Map<string, RootQuery>

const validationRules = [
ArgumentsOfCorrectTypeRule,
DefaultValuesOfCorrectTypeRule,
ValuesOfCorrectTypeRule,
VariablesDefaultValueAllowedRule,
FragmentsOnCompositeTypesRule,
KnownTypeNamesRule,
LoneAnonymousOperationRule,
Expand Down Expand Up @@ -146,7 +146,12 @@ class Runner {
return compiledNodes
}

const printContext = printTransforms.reduce(
// relay-compiler v1.5.0 added "StripUnusedVariablesTransform" to
// printTransforms. Unfortunately it currently doesn't detect variables
// 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(
(ctx, transform) => transform(ctx, this.schema),
compilerContext
)
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/eslint-config.js
Expand Up @@ -14,7 +14,7 @@ module.exports = schema => {
`error`,
{
env: `relay`,
schemaString: printSchema(schema),
schemaString: printSchema(schema, { commentDescriptions: true }),
tagName: `graphql`,
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-skip-limit/package.json
Expand Up @@ -13,7 +13,7 @@
"@babel/cli": "^7.0.0-beta.42",
"@babel/core": "^7.0.0-beta.42",
"cross-env": "^5.1.4",
"graphql": "^0.11.7"
"graphql": "^0.13.2"
},
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/graphql-skip-limit#readme",
"keywords": [
Expand Down

0 comments on commit 7df551e

Please sign in to comment.