https://github.com/productdevbook/nitro-graphql
A standalone Nitro module that integrates GraphQL servers into any Nitro application with automatic type generation, file watching, and seamless framework integration.
https://github.com/productdevbook/nitro-graphql
apollo-server auto-imports drizzle file-watching graphql graphql-yoga nitro nuxt nuxt3 nuxt4 nuxt5 schema-validation standardschema type-generation typescript valibot zod
Last synced: 2 months ago
JSON representation
A standalone Nitro module that integrates GraphQL servers into any Nitro application with automatic type generation, file watching, and seamless framework integration.
- Host: GitHub
- URL: https://github.com/productdevbook/nitro-graphql
- Owner: productdevbook
- License: mit
- Created: 2025-07-09T14:23:21.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-18T17:53:41.000Z (3 months ago)
- Last Synced: 2025-07-18T22:17:54.118Z (3 months ago)
- Topics: apollo-server, auto-imports, drizzle, file-watching, graphql, graphql-yoga, nitro, nuxt, nuxt3, nuxt4, nuxt5, schema-validation, standardschema, type-generation, typescript, valibot, zod
- Language: TypeScript
- Homepage:
- Size: 375 KB
- Stars: 40
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nuxt - Nitro GraphQL
README
# Nitro GraphQL
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![License][license-src]][license-href]**A standalone Nitro module that integrates GraphQL servers into any Nitro application with automatic type generation, file watching, and seamless framework integration.**
[๐ Quick Start](#-quick-start) โข [๐ Documentation](#-documentation) โข [๐ฎ Playground](#-playground) โข [๐ฌ Community](#-community--contributing)
---
*"GraphQL is not just a query language; it's a new way to think about APIs and client-server interaction."*
## โจ Features
- ๐ **Multi-Framework Support**: Works with GraphQL Yoga and Apollo Server
- ๐ง **Auto-Discovery**: Automatically scans and loads GraphQL schema and resolver files
- ๐ **Type Generation**: Automatic TypeScript type generation from GraphQL schemas (server & client)
- ๐ฎ **Apollo Sandbox**: Built-in GraphQL playground for development
- ๐ฅ **Health Check**: Built-in health check endpoint
- ๐ **Universal Compatibility**: Works with any Nitro-based application (Nuxt, standalone Nitro, etc.)
- ๐ฏ **Zero Configuration**: Sensible defaults with optional customization
- ๐ **File-Based Organization**: Domain-driven resolver and schema organization
- ๐ **Hot Reload**: Development mode with automatic schema and resolver updates
- ๐ฆ **Optimized Bundling**: Smart chunking and dynamic imports for production
- ๐ **Nuxt Integration**: First-class Nuxt.js support with dedicated module## ๐ Quick Start
### Step 1: Installation
Choose your GraphQL framework and install required dependencies:
**For GraphQL Yoga:**
```bash
# npm
npm install nitro-graphql graphql-yoga graphql# pnpm (recommended)
pnpm add nitro-graphql graphql-yoga graphql# yarn
yarn add nitro-graphql graphql-yoga graphql
```**For Apollo Server:**
```bash
# npm
npm install nitro-graphql @apollo/server graphql# pnpm (recommended)
pnpm add nitro-graphql @apollo/server graphql# yarn
yarn add nitro-graphql @apollo/server graphql
```### Step 2: Setup Your Project
๐ง For Standalone Nitro Projects
1. **Update your `nitro.config.ts`:**
```ts
import { defineNitroConfig } from 'nitropack/config'export default defineNitroConfig({
modules: ['nitro-graphql'],
graphql: {
framework: 'graphql-yoga', // or 'apollo-server'
},
})
```2. **Create the GraphQL directory structure:**
```bash
mkdir -p server/graphql
```๐ข For Nuxt.js Projects
1. **Update your `nuxt.config.ts`:**
```ts
export default defineNuxtConfig({
modules: [
'nitro-graphql/nuxt',
],
nitro: {
modules: ['nitro-graphql'],
graphql: {
framework: 'graphql-yoga',
},
},
})
```2. **Create the GraphQL directory structure:**
```bash
mkdir -p server/graphql
```### Step 3: Create Your First Schema
Create your main schema file:
```graphql
# server/graphql/schema.graphql
scalar DateTime
scalar JSONtype Query {
hello: String!
greeting(name: String!): String!
}type Mutation {
_empty: String
}
```### Step 4: Create Your First Resolver
Create a resolver for your queries:
```ts
// server/graphql/hello.resolver.ts
import { defineResolver } from 'nitro-graphql/utils/define'export const helloResolver = defineResolver({
Query: {
hello: () => 'Hello from GraphQL!',
greeting: (_, { name }) => `Hello, ${name}!`,
},
})// You can also export multiple resolvers from the same file
export const additionalResolver = defineResolver({
Query: {
// Additional query resolvers
},
})
```### Step 5: Start Your Server
```bash
# For Nitro
pnpm dev# For Nuxt
pnpm dev
```### Step 6: Test Your GraphQL API
๐ **That's it!** Your GraphQL server is now running at:
- **GraphQL Endpoint**: `http://localhost:3000/api/graphql`
- **Apollo Sandbox**: `http://localhost:3000/api/graphql` (in browser)
- **Health Check**: `http://localhost:3000/api/graphql/health`## ๐ Documentation
### Project Structure
The module uses a domain-driven file structure under `server/graphql/`:
```
server/
โโโ graphql/
โ โโโ schema.graphql # Main schema with scalars and base types
โ โโโ hello.resolver.ts # Global resolvers (use named exports)
โ โโโ users/
โ โ โโโ user.graphql # User schema definitions
โ โ โโโ user-queries.resolver.ts # User query resolvers (use named exports)
โ โ โโโ create-user.resolver.ts # User mutation resolvers (use named exports)
โ โโโ posts/
โ โ โโโ post.graphql # Post schema definitions
โ โ โโโ post-queries.resolver.ts # Post query resolvers (use named exports)
โ โ โโโ create-post.resolver.ts # Post mutation resolvers (use named exports)
โ โโโ config.ts # Optional GraphQL configuration
โ โโโ schema.ts # Changing Special Return types
```> [!TIP]
> **New Named Export Pattern**: The module now supports named exports for GraphQL resolvers, allowing you to export multiple resolvers from a single file. This provides better organization and flexibility in structuring your resolver code.### Building Your First Feature
Let's create a complete user management feature:
๐ค Step 1: Define User Schema
```graphql
# server/graphql/users/user.graphql
type User {
id: ID!
name: String!
email: String!
createdAt: DateTime!
}input CreateUserInput {
name: String!
email: String!
}extend type Query {
users: [User!]!
user(id: ID!): User
}extend type Mutation {
createUser(input: CreateUserInput!): User!
}
```๐ Step 2: Create Query Resolvers
```ts
// server/graphql/users/user-queries.resolver.ts
import { defineQuery } from 'nitro-graphql/utils/define'export const userQueries = defineQuery({
users: async (_, __, { storage }) => {
return await storage.getItem('users') || []
},
user: async (_, { id }, { storage }) => {
const users = await storage.getItem('users') || []
return users.find(user => user.id === id)
}
})// You can also split queries into separate named exports
export const additionalUserQueries = defineQuery({
userCount: async (_, __, { storage }) => {
const users = await storage.getItem('users') || []
return users.length
},
})
```โ๏ธ Step 3: Create Mutation Resolvers
```ts
// server/graphql/users/create-user.resolver.ts
import { defineMutation } from 'nitro-graphql/utils/define'export const createUserMutation = defineMutation({
createUser: async (_, { input }, { storage }) => {
const users = await storage.getItem('users') || []
const user = {
id: Date.now().toString(),
...input,
createdAt: new Date()
}
users.push(user)
await storage.setItem('users', users)
return user
}
})// You can also export multiple mutations from the same file
export const updateUserMutation = defineMutation({
updateUser: async (_, { id, input }, { storage }) => {
const users = await storage.getItem('users') || []
const userIndex = users.findIndex(user => user.id === id)
if (userIndex === -1)
throw new Error('User not found')users[userIndex] = { ...users[userIndex], ...input }
await storage.setItem('users', users)
return users[userIndex]
}
})
```๐งช Step 4: Test Your Feature
Open Apollo Sandbox at `http://localhost:3000/api/graphql` and try:
```graphql
# Create a user
mutation {
createUser(input: {
name: "John Doe"
email: "john@example.com"
}) {
id
name
createdAt
}
}# Query users
query {
users {
id
name
}
}
```### Type Generation
The module automatically generates TypeScript types for you:
- **Server types**: `.nitro/types/nitro-graphql-server.d.ts`
- **Client types**: `.nitro/types/nitro-graphql-client.d.ts`
- **Auto-imports**: Available for `defineResolver` and other utilitiesYour IDE will automatically provide type safety and autocomplete!
#### Using Generated Types
You can import and use the generated types in your code:
**Client-side types** (`#graphql/client`):
```ts
// Import generated types for queries, mutations, and operations
import type { GetUsersQuery, CreateUserInput } from '#graphql/client'// Use in Vue components
const users = ref([])// Use in composables
export function useUsers() {
const createUser = async (input: CreateUserInput) => {
// Type-safe input
}
}
```**Server-side types** (`#graphql/server`):
```ts
// Import generated types and interfaces
import type { User, Post, CreateUserInput } from '#graphql/server'// Use types in your server code
function validateUser(user: User): boolean {
return user.email.includes('@')
}// Use in data layer
async function getUserPosts(user: User): Promise {
// user is fully typed with all fields
return await db.posts.findMany({ where: { authorId: user.id } })
}// Use input types for validation
function validateCreateUserInput(input: CreateUserInput): void {
if (!input.email || !input.name) {
throw new Error('Email and name are required')
}
}
```These imports provide full TypeScript support with autocompletion, type checking, and IntelliSense in your IDE.
> [!TIP]
> **Nitro Auto-Imports**: Thanks to Nitro's auto-import feature, you don't need to manually import `defineResolver`, `defineQuery`, `defineMutation`, and other utilities in your resolver files. They're available globally! However, if you prefer explicit imports, you can use:
> ```ts
> import { defineResolver } from 'nitro-graphql/utils/define'
> ```### Configuration
โ๏ธ Runtime Configuration
```ts
// nitro.config.ts
export default defineNitroConfig({
modules: ['nitro-graphql'],
graphql: {
framework: 'graphql-yoga', // or 'apollo-server'
},
runtimeConfig: {
graphql: {
endpoint: {
graphql: '/api/graphql', // GraphQL endpoint
healthCheck: '/api/graphql/health' // Health check endpoint
},
playground: true, // Enable Apollo Sandbox
}
}
})
```๐ง Advanced Configuration
```ts
// server/graphql/config.ts
import { defineGraphQLConfig } from 'nitro-graphql/utils/define'export default defineGraphQLConfig({
// Custom GraphQL Yoga or Apollo Server configuration
plugins: [
// Add custom plugins
],
context: async ({ request }) => {
// Enhanced context with custom properties
return {
user: await authenticateUser(request),
db: await connectDatabase(),
}
},
})
```## ๐ฎ Playground
Try out the examples:
- **Standalone Nitro**: [`playground/`](playground/)
- **Nuxt.js Integration**: [`playground-nuxt/`](playground-nuxt/)Both examples include working GraphQL schemas, resolvers, and demonstrate the module's capabilities.
## ๐ง API Reference
### Core Utilities
> [!NOTE]
> **Auto-Import Available**: All utilities are automatically imported in your resolver files thanks to Nitro's auto-import feature. You can use them directly without import statements, or use explicit imports if you prefer:
> ```ts
> import { defineMutation, defineQuery, defineResolver } from 'nitro-graphql/utils/define'
> ```> [!IMPORTANT]
> **Named Exports Required**: All GraphQL resolvers must now use named exports instead of default exports. This allows you to export multiple resolvers from a single file, providing better organization and flexibility. For example:
> ```ts
> // โ Correct - Named exports
> export const userQueries = defineQuery({ ... })
> export const userMutations = defineMutation({ ... })
>
> // โ Incorrect - Default exports (deprecated)
> export default defineQuery({ ... })
> ```defineResolver - Define complete resolvers
```ts
import { defineResolver } from 'nitro-graphql/utils/define'export const mainResolver = defineResolver({
Query: {
// Query resolvers
},
Mutation: {
// Mutation resolvers
},
// Custom type resolvers
})// You can also export multiple resolvers from the same file
export const additionalResolver = defineResolver({
Query: {
// Additional query resolvers
},
})
```defineQuery - Define only Query resolvers
```ts
import { defineQuery } from 'nitro-graphql/utils/define'export const userQueries = defineQuery({
users: async (_, __, { storage }) => {
return await storage.getItem('users') || []
},
user: async (_, { id }, { storage }) => {
const users = await storage.getItem('users') || []
return users.find(user => user.id === id)
}
})// You can also split queries into separate named exports
export const userStatsQueries = defineQuery({
userCount: async (_, __, { storage }) => {
const users = await storage.getItem('users') || []
return users.length
},
})
```defineMutation - Define only Mutation resolvers
```ts
import { defineMutation } from 'nitro-graphql/utils/define'export const userMutations = defineMutation({
createUser: async (_, { input }, { storage }) => {
const users = await storage.getItem('users') || []
const user = {
id: Date.now().toString(),
...input,
createdAt: new Date()
}
users.push(user)
await storage.setItem('users', users)
return user
}
})// You can also export multiple mutations from the same file
export const userUpdateMutations = defineMutation({
updateUser: async (_, { id, input }, { storage }) => {
const users = await storage.getItem('users') || []
const userIndex = users.findIndex(user => user.id === id)
if (userIndex === -1)
throw new Error('User not found')users[userIndex] = { ...users[userIndex], ...input }
await storage.setItem('users', users)
return users[userIndex]
}
})
```defineSubscription - Define Subscription resolvers
```ts
import { defineSubscription } from 'nitro-graphql/utils/define'export const userSubscriptions = defineSubscription({
userAdded: {
subscribe: () => pubsub.asyncIterator('USER_ADDED'),
},
postUpdated: {
subscribe: withFilter(
() => pubsub.asyncIterator('POST_UPDATED'),
(payload, variables) => payload.postUpdated.id === variables.postId
),
}
})// You can also export multiple subscriptions from the same file
export const notificationSubscriptions = defineSubscription({
notificationAdded: {
subscribe: () => pubsub.asyncIterator('NOTIFICATION_ADDED'),
},
})
```defineType - Define custom type resolvers
```ts
import { defineType } from 'nitro-graphql/utils/define'export const userTypes = defineType({
User: {
posts: async (parent, _, { storage }) => {
const posts = await storage.getItem('posts') || []
return posts.filter(post => post.authorId === parent.id)
},
fullName: parent => `${parent.firstName} ${parent.lastName}`,
},
})// You can also export multiple type resolvers from the same file
export const postTypes = defineType({
Post: {
author: async (parent, _, { storage }) => {
const users = await storage.getItem('users') || []
return users.find(user => user.id === parent.authorId)
},
},
})
```defineSchema - Define custom schema with validation
You can override schema types if needed. StandardSchema supported โ Zod, Valibot, anything works:
```ts
# server/graphql/schema.ts
import { defineSchema } from 'nitro-graphql/utils/define'
import { z } from 'zod'export default defineSchema({
Todo: z.object({
id: z.string(),
title: z.string(),
completed: z.boolean(),
createdAt: z.date(),
}),
User: z.object({
id: z.string(),
name: z.string(),
email: z.string().email(),
age: z.number().min(0),
}),
})
```**With Drizzle Schema:**
```ts
import { defineSchema } from 'nitro-graphql/utils/define'
import { z } from 'zod'
import { userSchema } from './drizzle/user'export default defineSchema({
Todo: z.object({
id: z.string(),
title: z.string(),
}),
User: userSchema, // Import from Drizzle schema
})
```## ๐จ Troubleshooting
Common Issues
### GraphQL endpoint returns 404
**Solution**: Make sure you have:
1. Added `nitro-graphql` to your modules
2. Set the `graphql.framework` option
3. Created at least one schema file### Types not generating
**Solution**:
1. Restart your dev server
2. Check that your schema files end with `.graphql`
3. Verify your resolver files end with `.resolver.ts`### Hot reload not working
**Solution**:
1. Make sure you're in development mode
2. Check file naming conventions
3. Restart the dev server### Import errors with utilities
**Solution**:
```ts
// โ Incorrect import path
import { defineResolver } from 'nitro-graphql'// โ Correct import path
import { defineResolver } from 'nitro-graphql/utils/define'
```### Export pattern errors
**Solution**:
```ts
// โ Incorrect - Default exports (deprecated)
export default defineResolver({ ... })// โ Correct - Named exports
export const myResolver = defineResolver({ ... })
export const anotherResolver = defineResolver({ ... })
```## ๐ Framework Support
GraphQL Yoga
```ts
// nitro.config.ts
export default defineNitroConfig({
graphql: {
framework: 'graphql-yoga',
},
})
```Apollo Server
```ts
// nitro.config.ts
export default defineNitroConfig({
graphql: {
framework: 'apollo-server',
},
})
```## ๐ฅ Advanced Features
Custom Scalars
```ts
// server/graphql/scalars/DateTime.resolver.ts
import { GraphQLScalarType } from 'graphql'
import { Kind } from 'graphql/language'
import { defineResolver } from 'nitro-graphql/utils/define'export const dateTimeScalar = defineResolver({
DateTime: new GraphQLScalarType({
name: 'DateTime',
serialize: (value: Date) => value.toISOString(),
parseValue: (value: string) => new Date(value),
parseLiteral: (ast) => {
if (ast.kind === Kind.STRING) {
return new Date(ast.value)
}
return null
}
})
})// You can also export multiple scalars from the same file
export const jsonScalar = defineResolver({
JSON: new GraphQLScalarType({
name: 'JSON',
serialize: value => value,
parseValue: value => value,
parseLiteral: (ast) => {
if (ast.kind === Kind.STRING) {
return JSON.parse(ast.value)
}
return null
}
})
})
```Error Handling
```ts
// server/graphql/users/user-queries.resolver.ts
import { defineQuery } from 'nitro-graphql/utils/define'export const userQueries = defineQuery({
user: async (_, { id }, { storage }) => {
try {
const user = await storage.getItem(`user:${id}`)
if (!user) {
throw new Error(`User with id ${id} not found`)
}
return user
}
catch (error) {
console.error('Error fetching user:', error)
throw error
}
}
})// You can also export additional error handling queries
export const safeUserQueries = defineQuery({
userSafe: async (_, { id }, { storage }) => {
try {
const user = await storage.getItem(`user:${id}`)
return user || null // Return null instead of throwing
}
catch (error) {
console.error('Error fetching user:', error)
return null
}
}
})
```Nuxt Integration
For Nuxt.js applications, the module provides enhanced integration:
```ts
// nuxt.config.ts
export default defineNuxtConfig({
modules: [
'nitro-graphql/nuxt',
],
nitro: {
modules: ['nitro-graphql'],
graphql: {
framework: 'graphql-yoga',
},
},
})
```Client-side GraphQL files are automatically detected in the `app/graphql/` directory.
### Client-Side Usage
The module automatically generates a GraphQL SDK and provides type-safe client access for frontend usage.
๐ GraphQL File Structure
Create your GraphQL queries and mutations in the `app/graphql/` directory:
```
app/
โโโ graphql/
โ โโโ queries.graphql # GraphQL queries
โ โโโ mutations.graphql # GraphQL mutations
โ โโโ subscriptions.graphql # GraphQL subscriptions (optional)
```๐ฅ Creating GraphQL Files
**Query File Example:**
```graphql
# app/graphql/queries.graphql
query GetUsers {
users {
id
name
createdAt
}
}query GetUser($id: ID!) {
user(id: $id) {
id
name
createdAt
}
}
```**Mutation File Example:**
```graphql
# app/graphql/mutations.graphql
mutation CreateUser($input: CreateUserInput!) {
createUser(input: $input) {
id
name
createdAt
}
}mutation UpdateUser($id: ID!, $input: UpdateUserInput!) {
updateUser(id: $id, input: $input) {
id
name
createdAt
}
}
```โก Using the Generated SDK
The module automatically generates a type-safe SDK based on your GraphQL files:
```ts
// The SDK is automatically generated and available as an import
import { createGraphQLClient } from '#graphql/client'// Create a client instance
const client = createGraphQLClient({
endpoint: '/api/graphql',
headers: {
Authorization: 'Bearer your-token-here'
}
})// Use the generated methods with full type safety
const getUsersData = await client.GetUsers()
console.log(getUsersData.users) // Fully typed responseconst newUser = await client.CreateUser({
input: {
name: 'John Doe',
email: 'john@example.com'
}
})
console.log(newUser.createUser) // Fully typed response
```๐ฏ Basic Usage Examples
**Fetching Data:**
```ts
// Import the generated client
import { createGraphQLClient } from '#graphql/client'const client = createGraphQLClient()
// Query users
const { users } = await client.GetUsers()
console.log(users) // Array of User objects with full typing// Query specific user
const { user } = await client.GetUser({ id: '123' })
console.log(user) // User object or null
```**Creating Data:**
```ts
// Create a new user
const { createUser } = await client.CreateUser({
input: {
name: 'Jane Doe',
email: 'jane@example.com'
}
})
console.log(createUser) // Newly created user with full typing
```**Error Handling:**
```ts
try {
const { users } = await client.GetUsers()
console.log(users)
}
catch (error) {
console.error('GraphQL Error:', error)
// Handle GraphQL errors appropriately
}
```๐ง Client Configuration
```ts
import { createGraphQLClient } from '#graphql/client'// Basic configuration
const client = createGraphQLClient({
endpoint: '/api/graphql',
headers: {
'Authorization': 'Bearer your-token',
'X-Client-Version': '1.0.0'
},
timeout: 10000
})// Advanced configuration with dynamic headers
const client = createGraphQLClient({
endpoint: '/api/graphql',
headers: async () => {
const token = await getAuthToken()
return {
'Authorization': token ? `Bearer ${token}` : '',
'X-Request-ID': crypto.randomUUID()
}
},
retry: 3,
timeout: 30000
})
```## ๐ ๏ธ Development
### Scripts
- `pnpm build` - Build the module
- `pnpm dev` - Watch mode with automatic rebuilding
- `pnpm lint` - ESLint with auto-fix
- `pnpm playground` - Run the Nitro playground example
- `pnpm release` - Build, version bump, and publish### Requirements
- Node.js 20.x or later
- pnpm (required package manager)## ๐ฌ Community & Contributing
> [!TIP]
> **Want to contribute?** We believe you can play a role in the growth of this project!### ๐ฏ How You Can Contribute
- **๐ก Share your ideas**: Use [GitHub Issues](https://github.com/productdevbook/nitro-graphql/issues) for new feature suggestions
- **๐ Report bugs**: Report issues you encounter in detail
- **๐ Improve documentation**: Enhance README, examples, and guides
- **๐ง Code contributions**: Develop bug fixes and new features
- **๐ Support the project**: Support the project by giving it a star### ๐ฌ Discussion and Support
- **GitHub Issues**: Feature requests and bug reports
- **GitHub Discussions**: General discussions and questions
- **Pull Requests**: Code contributions### ๐ Contribution Process
1. **Open an issue**: Let's discuss what you want to do first
2. **Fork & Branch**: Fork the project and create a feature branch
3. **Write code**: Develop according to existing code standards
4. **Test**: Test your changes
5. **Send PR**: Create a pull request with detailed description> [!IMPORTANT]
> Please don't forget to read the [Contribution Guidelines](CONTRIBUTING.md) document before contributing.## ๐ Community TODOs
Help us improve nitro-graphql! Pick any item and contribute:
### ๐ Framework Examples
- [ ] Nitro-compatible framework integrations
- [ ] Nuxt + Pinia Colada example
- [ ] StackBlitz playground demos### ๐งน Code Quality
- [ ] Performance benchmarks
- [ ] Bundle size optimization
- [ ] Testing utilities
- [ ] Error handling patterns### ๐ Documentation
- [ ] Video tutorials
- [ ] Migration guides
- [ ] Best practices guide### ๐ง Developer Tools
- [ ] VS Code extension
- [ ] CLI tools
- [ ] Debug utilities### ๐ Integrations
- [ ] Database adapters (Prisma, Drizzle)
- [ ] Cache strategies
- [ ] Deployment guides> [!NOTE]
> Have other ideas? Open an issue to discuss!## ๐ ๏ธ VS Code Extensions
For the best development experience with GraphQL, install these recommended VS Code extensions:
- **[GraphQL: Language Feature Support](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql)** - Provides GraphQL language features like autocompletion, go-to definition, and schema validation
- **[GraphQL: Syntax Highlighting](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql-syntax)** - Adds syntax highlighting for GraphQL queries, mutations, subscriptions, and schema filesThese extensions will enable:
- ๐จ Syntax highlighting for `.graphql` files
- ๐ IntelliSense and autocompletion based on your schema
- โ Real-time validation of GraphQL queries
- ๐ Go-to definition for types and fields
- ๐ก Hover information for GraphQL elements---
### ๐ Thank You
Thank you for using and developing this project. Every contribution makes the GraphQL ecosystem stronger!
## Sponsors
## License
[MIT](./LICENSE) License ยฉ 2023 [productdevbook](https://github.com/productdevbook)
[npm-version-src]: https://img.shields.io/npm/v/nitro-graphql?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/nitro-graphql
[npm-downloads-src]: https://img.shields.io/npm/dm/nitro-graphql?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/nitro-graphql
[bundle-src]: https://deno.bundlejs.com/badge?q=nitro-graphql@0.0.4
[bundle-href]: https://deno.bundlejs.com/badge?q=nitro-graphql@0.0.4
[license-src]: https://img.shields.io/github/license/productdevbook/nitro-graphql.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/productdevbook/nitro-graphql/blob/main/LICENSE
[jsdocs-href]: https://www.jsdocs.io/package/nitro-graphql