Releases: productdevbook/nitro-graphql
v1.8.0
🚀 Features
- Add server: false mode and simplify external services config - by @productdevbook and Claude Opus 4.5 in #60 (d10c4)
🏡 Chore
- Release v1.8.0 - by @productdevbook (a0af9)
View changes on GitHub
v1.7.1
💅 Refactors
- Remove logging of virtual module generation and type generation success messages - by @productdevbook (75b9f)
- Rename isSafari function to _isSafari and remove unnecessary line - by @productdevbook (64b66)
🏡 Chore
- Release v1.7.1 - by @productdevbook (b9e00)
View changes on GitHub
v1.7.0
🚀 Features
- GraphQL Subscriptions with WebSocket, SSE, and Auto Mode - by @productdevbook and Claude in #57 (870ed)
- codegen: Add TypedDocumentNode support for urql/Apollo Client - by @productdevbook and Claude in #58 (842fa)
- security: Add automatic production security defaults - by @productdevbook and Claude in #59 (9f1ee)
🐞 Bug Fixes
- Update error parameter name in formatError function for clarity - by @productdevbook (21ecd)
🏡 Chore
- Release v1.7.0 - by @productdevbook (7218e)
- changelog: Update changelog generation logic and add configuration file - by @productdevbook (4f856)
View changes on GitHub
v2.0.0-beta.36
No significant changes
View changes on GitHub
v2.0.0-beta.34
No significant changes
View changes on GitHub
v2.0.0-beta.33
❄️ Nitro GraphQL v2.0.0-beta.33 ❄️
A Fresh Winter Release ✨
* . * . * . * . * . *
. ❄️ . ❄️ . ❄️ . ❄️
. * . * . * . * . *
❄️ ❄️ ❄️ ❄️
The first public beta of the next generation Nitro GraphQL!
🎉 What's New in v2?
This is a complete rewrite bringing modern framework support and powerful new features. If you're coming from v1.x, this is a significant upgrade!
⚡ Core Framework Migration
| Before (v1) | After (v2) |
|---|---|
| Nitro v2 | Nitro v3 |
| H3 v1 | H3 v2 |
| Nitro Module only | Vite Plugin + Nitro Module |
| Limited path control | Full path customization |
✨ Major Features
🔌 Dual Plugin Architecture
The module now works as both a Vite Plugin AND a Nitro Module:
// vite.config.ts
import graphql from 'nitro-graphql'
import { nitro } from 'nitro/vite'
export default defineConfig({
plugins: [
graphql(), // Must be before nitro()
nitro()
]
})🎛️ Full File Generation Control
Complete control over every generated file:
graphql: {
scaffold: {
graphqlConfig: false, // Skip graphql.config.ts
serverSchema: 'lib/schema.ts', // Custom path
},
paths: {
serverGraphql: 'packages/api/graphql',
clientGraphql: 'packages/web/graphql',
}
}🛠️ New Debug Dashboard
Visual debugging at `/_nitro/graphql/debug` (dev mode):
- Inspect loaded schemas
- View registered resolvers
- Check virtual file system
- Monitor configuration
🚀 Smart Chunk Optimization
GraphQL code now split into optimized chunks:
- ~98% size reduction in main bundle
- Automatic chunking for schemas, resolvers, directives
- Rolldown-ready for Vite 7+
📦 Client Utilities with ofetch
Modern client generation using `ofetch`:
// Auto-generated SDK
import { sdk } from '#graphql/client'
const { data } = await sdk.getUser({ id: '1' })🔧 Breaking Changes from v1
Import Path Changes
// ❌ Before (v1)
import { defineQuery } from 'nitro-graphql'
import { something } from 'h3'
// ✅ After (v2)
import { defineQuery } from 'nitro-graphql/define'
import { something } from 'nitro/h3'Context Declaration
// server/graphql/context.d.ts
declare module 'nitro/h3' {
interface H3EventContext {
// Your custom context
}
}API Renames
- `defineType()` → `defineField()`
🐛 Bug Fixes
-
Type System Improvements
- Handle `__typename` property correctly
- Better literal type inference
- Enhanced `ResolverReturnType` helper
-
Framework Fixes
- Custom status codes in GraphQL Yoga responses
- Apollo Server multiple `start()` calls resolved
- Custom type paths respected in TS config
📚 New Examples & Documentation
📖 Documentation Site
Live at nitro-graphql.pages.dev
🎮 New Examples
- Drizzle ORM - Full database integration with Docker
- Better Auth - Authentication middleware pattern
- Vite + React - Modern React SPA setup
- Vite + Vue - Vue 3 integration
📦 Installation
# npm
npm install nitro-graphql@beta graphql graphql-yoga
# pnpm
pnpm add nitro-graphql@beta graphql graphql-yoga
# yarn
yarn add nitro-graphql@beta graphql graphql-yoga🏗️ Architecture Improvements
❄️ Modularized Setup (15 orchestrated steps)
❄️ AST-based resolver scanning with oxc-parser
❄️ Virtual modules for runtime imports
❄️ Multi-layer Nuxt support
❄️ Apollo Federation subgraph support
❄️ External GraphQL service types
🙏 Contributors
@productdevbook & Claude AI 🤖
❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️
Happy coding this winter!
❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️ ❄️
📋 Full Changelog
🚀 Features
- Add full file generation control and custom path system - #43
- Migrate to Nitro v3 and H3 v2 with Vite support - #40
- Add Nitro v3 Vite plugin integration with nitro: hook - #50
- Add comprehensive GraphQL debug dashboard - #42
- Add Apollo Federation subgraph support - #34
- Modularize codebase and improve code generation - #56
- Update client utils generation to support all frameworks
- Update client generation to use 'ofetch'
- Improve chunk naming logic for better optimization
- Add `defineField()` function for type resolvers
🐞 Bug Fixes
- Respect custom type paths in TypeScript configuration - #48
- Handle custom status codes in GraphQL Yoga response
- Resolve Apollo Server multiple start() calls issue - #39
- Integrate Apollo Federation support in type generation - #37
- Enhance ResolverReturnType to handle __typename and literal types
- Update imports from 'h3' to 'nitro/h3'
📖 Documentation
- Add comprehensive VitePress documentation site - #47
- Improve resolver error detection and documentation - #41
🧪 Examples
- Add Drizzle ORM integration example with Docker
- Add Better Auth session middleware example
- Add Vite + React integration example
- Add Vite + Vue integration example
- Add Nitro standalone example
Full Changelog: v1.5.0...v2.0.0-beta.33
v1.6.1
No significant changes
View changes on GitHub
v1.6.0
✨ What's New
🎁 defineField Function
A brand new way to define your GraphQL field resolvers!
// ✅ New way (recommended)
export const myResolver = defineField({
User: {
fullName: (parent) => `${parent.firstName} ${parent.lastName}`
}
})
// ⚠️ Old way (deprecated)
export const myResolver = defineType({ ... })💡 Note:
defineTypestill works but will be removed in a future version
🐛 Bug Fixes
- 🔧 Fixed custom type paths in TypeScript configuration (#48)
📊 Release Info
| 🏷️ Version 1.6.0 |
📅 Date Dec 2025 |
📦 Package npm |
v1.5.0
🚀 Features
Adds a new comprehensive debug dashboard at /_nitro/graphql/debug for inspecting GraphQL setup, resolver exports, and generated virtual modules.
- Improve resolver error detection and documentation - by @productdevbook and Claude in #41 (fb034)
- Add comprehensive GraphQL debug dashboard with VFS inspection - by @productdevbook and Claude in #42 (02f51)
🐞 Bug Fixes
- Generate _directives.graphql - by @productdevbook (f79d9)
- Integrate Apollo Federation support in type generation - by @productdevbook in #37 (c70e1)
- Resolve Apollo Server multiple start() calls issue - by @productdevbook in #39 (aceee)
View changes on GitHub
v1.4.0
🚀 Features
- Add comprehensive Nuxt layer support with codebase cleanup - by @productdevbook in #36 (0e746)
- Add Apollo Federation subgraph support - by @productdevbook in #34 (ba6c6)
