monorepo for Hono third-party middleware/helpers/wrappers
 
 
Go to file
Yusuke Wada ae6ed501c9
fix: bump up Hono and make it `peerDependencies` to fix type mismatch (#21)
* fix: bump up Hono and make it 'peerDependencies' to fix type mismatch

* fix for lint
2022-12-13 16:32:51 +09:00
.github/workflows feat(tag): auto tag release (#16) 2022-08-02 11:03:36 +08:00
bun_test fix: bump up Hono and make it `peerDependencies` to fix type mismatch (#21) 2022-12-13 16:32:51 +09:00
deno_dist fix: bump up Hono and make it `peerDependencies` to fix type mismatch (#21) 2022-12-13 16:32:51 +09:00
deno_test fix: bump up Hono and make it `peerDependencies` to fix type mismatch (#21) 2022-12-13 16:32:51 +09:00
src fix: bump up Hono and make it `peerDependencies` to fix type mismatch (#21) 2022-12-13 16:32:51 +09:00
.eslintignore feat(lint): enable lint (#11) 2022-07-30 21:36:01 +08:00
.eslintrc.js feat(lint): enable lint (#11) 2022-07-30 21:36:01 +08:00
.gitignore chore: remove and ignore `yarn-error.log` (#3) 2022-07-27 21:25:34 +08:00
.prettierrc feat(lint): enable lint (#11) 2022-07-30 21:36:01 +08:00
README.md Update line 23. (#18) 2022-08-11 21:04:08 +08:00
jest.config.js init 2022-07-21 08:43:43 +08:00
package.json fix: bump up Hono and make it `peerDependencies` to fix type mismatch (#21) 2022-12-13 16:32:51 +09:00
tsconfig.build.json chore: don't emit test files not needed (#4) 2022-07-27 21:25:11 +08:00
tsconfig.json init 2022-07-21 08:43:43 +08:00
yarn.lock fix: bump up Hono and make it `peerDependencies` to fix type mismatch (#21) 2022-12-13 16:32:51 +09:00

README.md

GraphQL Server Middleware

Requirements

This middleware depends on GraphQL.js.

npm i @honojs/graphql-server

or

yarn add @honojs/graphql-server

Usage

index.js:

import { Hono } from 'hono'
import { graphqlServer } from '@honojs/graphql-server'
import { buildSchema } from 'graphql'

export const app = new Hono()

const schema = buildSchema(`
type Query {
  hello: String
}
`)

const rootResolver = (ctx) => {
  return {
    hello: () => 'Hello Hono!',
  }
}

app.use(
  '/graphql',
  graphqlServer({
    schema,
    rootResolver,
  })
)

app.fire()