Open
Description
Example from: https://www.npmjs.com/package/@elysiajs/graphql-yoga
import { Elysia } from 'elysia'
import { yoga } from '@elysiajs/graphql-yoga'
import { createYoga, createSchema } from 'graphql-yoga'
const app = new Elysia()
.use(
yoga({
// yoga property doesn't exist
yoga: createYoga({
schema: createSchema({
typeDefs: `
type Query {
hi: String
}
`,
resolvers: {
Query: {
hi: () => 'Hi from Elysia'
}
}
})
})
)
.listen(8080)
Error
Object literal may only specify known properties, and 'yoga' does not exist in type 'ElysiaYogaConfig<string, MaybePromise<Record<string, unknown>> | ((initialContext: YogaInitialContext) => unknown) | undefined>'
Desired, yoga accepts schema property createSchema()
or from makeExecutableSchema()
, can only do typeDefs
and resolvers
separately.
app.use(yoga({ schema }));
Metadata
Metadata
Assignees
Labels
No labels