kolenkainc-honohub-graphql
Version:
GraphQL middleware for honohub
20 lines (16 loc) • 426 B
Markdown
# /graphql
The `useGraphQL` plugin adds the GraphQL endpoint to the Hono App. You can also enable the GraphQL playground using the `playground` prop.
Here's an example of how to use the `useGraphQL` plugin -
```ts
export default defineHub({
db,
serverUrl: "http://localhost:3000/",
collections: [collection],
plugins: [
useGraphQL({
route: "/graphql",
playground: true,
}),
],
});
```