JSPM

@honohub/graphql

0.2.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q22067F
  • License MIT

Package Exports

  • @honohub/graphql
  • @honohub/graphql/playground

Readme

@honohub/graphql

The useGraphQL plugin adds the GraphQL endpoint to the Hono App. You can also enable the GraphQL playground using the playground prop. {{ className: 'lead' }}

Here's an example of how to use the useGraphQL plugin -

export default defineHub({
  db,
  serverUrl: "http://localhost:3000/",
  collections: [collection],
  plugins: [
    useGraphQL({
      route: "/graphql",
      playground: true,
    }),
  ],
});