Skip to content

Commit ca8bb8c

Browse files
committed
chore: Fix type error
1 parent 63f6cf2 commit ca8bb8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/routes/grpahql-routes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export const graphqlRoutes = createApp()
4141
}),
4242
response: z
4343
.object({
44-
data: z.any(),
44+
data: z.any().optional(),
45+
errors: z.any().array().optional(),
4546
})
4647
.meta({
4748
example: {
@@ -63,7 +64,7 @@ export const graphqlRoutes = createApp()
6364
},
6465
}),
6566
},
66-
({ request, body }) => graphql.evaluateQuery(request.method, body),
67+
({ request, body }) => graphql.evaluateQuery(request.method, body) as any,
6768
)
6869
.get(
6970
"/playground",

0 commit comments

Comments
 (0)