Skip to content

Commit

Permalink
Finish upgrade to Relay 1
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed May 30, 2017
1 parent 1e7b392 commit a8e42af
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
"babel-loader": "^7.0.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-relay": "^1.0.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-latest": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"babel-register": "^6.24.1",
"babel-relay-plugin": "^0.10.0",
"chai": "^3.5.0",
"cross-env": "^5.0.0",
"eslint": "^3.19.0",
Expand Down
2 changes: 1 addition & 1 deletion test/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"react"
],
"plugins": [
"./fixtures/babelRelayPlugin"
["relay", { "schema": "test/fixtures/schema.graphql" }]
]
}
1 change: 0 additions & 1 deletion test/fixtures/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions test/fixtures/babelRelayPlugin.js

This file was deleted.

8 changes: 8 additions & 0 deletions test/fixtures/schema.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type Query {
widget: Widget
widgetByArg(name: String!): Widget
}

type Widget {
name: String
}
18 changes: 5 additions & 13 deletions test/fixtures/updateSchema.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import fs from 'fs';
import { graphql } from 'graphql';
import { introspectionQuery } from 'graphql/utilities';
import { printSchema } from 'graphql/utilities';
import path from 'path';

import schema from './schema';

(async () => {
const result = await graphql(schema, introspectionQuery);
if (result.errors) {
throw new Error(result.errors);
}

fs.writeFileSync(
path.join(__dirname, 'schema.json'),
JSON.stringify(result, null, 2),
);
})();
fs.writeFileSync(
path.join(__dirname, 'schema.graphql'),
printSchema(schema),
);

0 comments on commit a8e42af

Please sign in to comment.