-
-
Notifications
You must be signed in to change notification settings - Fork 569
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests): cleaner GraphQL schema snapshots (#533)
- Loading branch information
1 parent
7007a43
commit d407d8e
Showing
53 changed files
with
48,323 additions
and
47,995 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
22 changes: 11 additions & 11 deletions
22
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 |
---|---|---|
@@ -1,32 +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\`.\\"\\"\\" | ||
"""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.\\"\\"\\" | ||
"""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\`.\\"\\"\\" | ||
"""Fetches an object given its globally unique \`ID\`.""" | ||
node( | ||
\\"\\"\\"The globally unique \`ID\`.\\"\\"\\" | ||
"""The globally unique \`ID\`.""" | ||
id: ID! | ||
): Node | ||
} | ||
" | ||
`; |
30 changes: 15 additions & 15 deletions
30
packages/graphile-build/__tests__/__snapshots__/enum.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 |
---|---|---|
@@ -1,40 +1,40 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`generated schema 1`] = ` | ||
"enum MyEnum { | ||
ONE @deprecated(reason: \\"We no longer support numbers smaller than PI\\") | ||
TWO @deprecated(reason: \\"We no longer support numbers smaller than PI\\") | ||
THREE @deprecated(reason: \\"We no longer support numbers smaller than PI\\") | ||
enum MyEnum { | ||
ONE @deprecated(reason: "We no longer support numbers smaller than PI") | ||
TWO @deprecated(reason: "We no longer support numbers smaller than PI") | ||
THREE @deprecated(reason: "We no longer support numbers smaller than PI") | ||
FOUR | ||
} | ||
\\"\\"\\"An object with a globally unique \`ID\`.\\"\\"\\" | ||
"""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.\\"\\"\\" | ||
"""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\`.\\"\\"\\" | ||
"""Fetches an object given its globally unique \`ID\`.""" | ||
node( | ||
\\"\\"\\"The globally unique \`ID\`.\\"\\"\\" | ||
"""The globally unique \`ID\`.""" | ||
id: ID! | ||
): Node | ||
enum: MyEnum | ||
} | ||
" | ||
`; |
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
48 changes: 24 additions & 24 deletions
48
packages/graphile-build/__tests__/__snapshots__/watch.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 |
---|---|---|
@@ -1,73 +1,73 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`generated schema n = 0, n = 3 1`] = ` | ||
"type Dummy0 { | ||
type Dummy0 { | ||
n: Int! | ||
} | ||
\\"\\"\\"An object with a globally unique \`ID\`.\\"\\"\\" | ||
"""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.\\"\\"\\" | ||
"""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\`.\\"\\"\\" | ||
"""Fetches an object given its globally unique \`ID\`.""" | ||
node( | ||
\\"\\"\\"The globally unique \`ID\`.\\"\\"\\" | ||
"""The globally unique \`ID\`.""" | ||
id: ID! | ||
): Node | ||
dummy: Dummy0 | ||
} | ||
" | ||
`; | ||
|
||
exports[`generated schema n = 0, n = 3 2`] = ` | ||
"type Dummy3 { | ||
type Dummy3 { | ||
n: Int! | ||
} | ||
\\"\\"\\"An object with a globally unique \`ID\`.\\"\\"\\" | ||
"""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.\\"\\"\\" | ||
"""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\`.\\"\\"\\" | ||
"""Fetches an object given its globally unique \`ID\`.""" | ||
node( | ||
\\"\\"\\"The globally unique \`ID\`.\\"\\"\\" | ||
"""The globally unique \`ID\`.""" | ||
id: ID! | ||
): Node | ||
dummy: Dummy3 | ||
} | ||
" | ||
`; |
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,7 +1,6 @@ | ||
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(); | ||
expect(schema).toMatchSnapshot(); | ||
}); |
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
Oops, something went wrong.