graphql-yoga middleware for Hono.
import { graphqlServer } from '@honojs/graphqlyoga'
import { Hono } from 'hono'
const app = new Hono()
app.use('*', graphqlServer({
schema: {
typeDefs: /* GraphQL */ `
type Query {
hello: String!
}
`,
resolvers: {
Query: {
hello: () => 'hello',
},
},
},
})
app.get('/', (c) => c.text('foo'))
export default app
hagishi
MIT