-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): Fix dependency patterns, graphql compatibility (#172)
* Fix dependency versions * GraphQL now uses quotes for comments * Fix skipping empty Mutation on newer GraphQL versions * Add test that empty schema works * Upgrade flow * Fix flow errors * Formatting * Lint
- Loading branch information
Showing
21 changed files
with
6,935 additions
and
4,290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
// @flow | ||
|
||
// This script detects if you're running on Node v8 or above; if so it runs the | ||
// code directly, otherwise it falls back to the babel-compiled version | ||
|
||
/*:: | ||
// Trick flow into exporting the types | ||
export type * from './node8plus'; | ||
*/ | ||
|
||
const isNode8Plus = process.versions.node.match(/^([89]|[1-9][0-9]+)\./); | ||
// $FlowFixMe: ignore | ||
module.exports = isNode8Plus ? require("./node8plus") : require("./node7minus"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/graphile-build/__tests__/__snapshots__/emptyMutation.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`generates empty schema (with no Mutation type) 1`] = ` | ||
"\\"\\"\\"An object with a globally unique \`ID\`.\\"\\"\\" | ||
interface Node { | ||
\\"\\"\\" | ||
A globally unique identifier. Can be used in various places throughout the system to identify this single value. | ||
\\"\\"\\" | ||
id: ID! | ||
} | ||
\\"\\"\\"The root query type which gives access points into the data universe.\\"\\"\\" | ||
type Query implements Node { | ||
\\"\\"\\" | ||
Exposes the root query type nested one level down. This is helpful for Relay 1 | ||
which can only query top level fields if they are in a particular form. | ||
\\"\\"\\" | ||
query: Query! | ||
\\"\\"\\" | ||
The root query type must be a \`Node\` to work well with Relay 1 mutations. This just resolves to \`query\`. | ||
\\"\\"\\" | ||
id: ID! | ||
\\"\\"\\"Fetches an object given its globally unique \`ID\`.\\"\\"\\" | ||
node( | ||
\\"\\"\\"The globally unique \`ID\`.\\"\\"\\" | ||
id: ID! | ||
): Node | ||
} | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { printSchema } = require("graphql/utilities"); | ||
const { buildSchema, defaultPlugins } = require("../"); | ||
|
||
test("generates empty schema (with no Mutation type)", async () => { | ||
const schema = await buildSchema([...defaultPlugins]); | ||
expect(printSchema(schema)).toMatchSnapshot(); | ||
}); |
Oops, something went wrong.