diff --git a/packages/plugin-drizzle/tests/__snapshots__/index.test.ts.snap b/packages/plugin-drizzle/tests/__snapshots__/index.test.ts.snap index ae605ce49..6e74f06bc 100644 --- a/packages/plugin-drizzle/tests/__snapshots__/index.test.ts.snap +++ b/packages/plugin-drizzle/tests/__snapshots__/index.test.ts.snap @@ -6,6 +6,11 @@ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the \`da """ scalar DateTime +type Error { + message: String + stack: String +} + type Mutation { commentOnPost(input: MutationCommentOnPostInput!): comments createPost(input: MutationCreatePostInput!): Post @@ -65,12 +70,19 @@ type Query { node(id: ID!): Node nodes(ids: [ID!]!): [Node]! post(id: ID!): Post + postWithErrors(id: ID!): QueryPostWithErrorsResult posts(after: String, before: String, category: String, first: Int, last: Int): QueryPostsConnection user(id: ID!): User userWithInput(input: QueryUserWithInputInput!): User users(id: ID!): [User!] } +union QueryPostWithErrorsResult = Error | QueryPostWithErrorsSuccess + +type QueryPostWithErrorsSuccess { + data: Post! +} + type QueryPostsConnection { edges: [QueryPostsConnectionEdge] pageInfo: PageInfo! diff --git a/packages/plugin-drizzle/tests/example/builder.ts b/packages/plugin-drizzle/tests/example/builder.ts index 6ad09c629..96baaf96c 100644 --- a/packages/plugin-drizzle/tests/example/builder.ts +++ b/packages/plugin-drizzle/tests/example/builder.ts @@ -1,9 +1,9 @@ import SchemaBuilder from '@pothos/core'; import AddGraphQL from '@pothos/plugin-add-graphql'; +import ErrorsPlugin from '@pothos/plugin-errors'; import ScopeAuthPlugin from '@pothos/plugin-relay'; import RelayPlugin from '@pothos/plugin-scope-auth'; import WithInputPlugin from '@pothos/plugin-with-input'; -import ErrorsPlugin from '@pothos/plugin-errors'; import { drizzle } from 'drizzle-orm/libsql'; import DrizzlePlugin from '../../src'; import { type DrizzleSchema, client, db, schema } from './db';