Skip to content

hagishi/hono-graphql-yoga

Repository files navigation

graphql-yoga middleware for Hono

graphql-yoga middleware for Hono.

Usage

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

Author

hagishi

License

MIT

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published