A standalone Nitro module that integrates GraphQL servers into any Nitro application with automatic type generation, file watching, and seamless framework integration.
undefinedThe easiest way to add GraphQL to any Nitro applicationundefined
[!IMPORTANT]
undefinedv2.0 Beta - Nitro v3 / H3 v2 support. For v1.x (Nitro v2), see thev1branch.
npx nitro-graphql@beta init my-app -t nitro
Available templates: nitro, vite, vite-react, vite-vue, drizzle-orm, better-auth
pnpm add nitro-graphql@beta graphql-yoga graphql graphql-config
// nitro.config.ts
import { defineConfig } from 'nitro'
import graphql from 'nitro-graphql'
export default defineConfig({
serverDir: './',
modules: [
graphql({
framework: 'graphql-yoga',
serverDir: './',
}),
],
})
See the documentation for Nuxt and Vite setup.
MIT License © 2023 productdevbook
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.