nexus/tests/__snapshots__/builder.spec.ts.snap

156 lines
2.6 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`builder can replace the Mutation root type with an alternate type 1`] = `
"schema {
query: Query
mutation: RootMutation
}
type Mutation {
ok: String
}
type Query {
ok: Boolean!
}
type RootMutation {
name: String
}"
`;
exports[`builder can replace the Query root type with an alternate type 1`] = `
"schema {
query: RootQuery
}
type Query {
ok: String
}
type RootQuery {
name: String
}"
`;
exports[`builder can replace the Subscription root type with an alternate type 1`] = `
"schema {
query: Query
subscription: RootSubscription
}
type Query {
ok: Boolean!
}
type RootSubscription {
name: String
}
type Subscription {
ok: String
}"
`;
exports[`builder does not add a placeholder Query type when an alternate queryRoot has been defined 1`] = `
"schema {
query: RootQuery
}
type RootQuery {
name: String
}"
`;
exports[`builder.mergeSchema Merges Mutation & Query types by default: merged mutation 1`] = `
"type Mutation {
externalMutation(a: String): String
localMutation: String
}"
`;
exports[`builder.mergeSchema Merges Mutation & Query types by default: merged query 1`] = `
"type Query {
externalFn(a: String): String
localFn: String
}"
`;
exports[`builder.mergeSchema Merges Mutation & Query types by default: unmerged mutation 1`] = `
"type Mutation {
localMutation: String
}"
`;
exports[`builder.mergeSchema Merges Mutation & Query types by default: unmerged query 1`] = `
"type Query {
localFn: String
}"
`;
exports[`builder.mergeSchema can merge with an externally created schema 1`] = `
"type Author implements Node {
books: [Book]
\\"\\"\\"A Node ID is globally unique\\"\\"\\"
id: ID!
}
type Book implements Node {
id: ID!
name: String
}
interface ExternalNode {
id: ID!
}
type InternalType {
fieldName: String
}
interface Node {
\\"\\"\\"A Node ID is globally unique\\"\\"\\"
id: ID!
}
type Query {
internalNodesByIds(ids: [ID!]!, internal: String!): [Node]!
node(id: ID!): Node
someBook: Book
userByUuids(uuid: UUID): User
}
scalar UUID
type User implements ExternalNode & Node {
id: ID!
name: String
}"
`;
exports[`builder.mergeSchema can merge with local types: merged 1`] = `
"type User implements Node & ExternalNode {
id: ID!
name: String
localName: String
}"
`;
exports[`builder.mergeSchema can merge with local types: unmerged 1`] = `
"type User {
localName: String
}"
`;
exports[`graphql-js interop extend types works with GraphQLNamedType (#88) 1`] = `
"type Query {
viewer: Viewer
}
type Viewer {
name: String
age: Int
}"
`;