-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Hello, I just tried the new 2.x beta in a Nuxt 4.2.1 project and it seems the module isn't auto-generating anything in both server/graphql/ and app/graphql/
This is my setup:
package.json
"dependencies": {
"graphql": "^16.12.0",
"graphql-config": "^5.1.5",
"graphql-yoga": "^5.16.2",
"nitro-graphql": "2.0.0-beta.31",
"nuxt": "^4.2.1",
"vue": "^3.5.24",
"vue-router": "^4.6.3"
},
nuxt.config.ts
import graphql from "nitro-graphql";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [
"nitro-graphql/nuxt",
],
devtools: { enabled: true },
compatibilityDate: "2025-07-15",
nitro: {
modules: [
graphql({ framework: "graphql-yoga" }),
],
},
});server/graphql/schema.graphql
type Query {
version: String!
}
type Mutation {
_: String
}
server/graphql/version.resolver.ts
import { defineQuery } from "nitro-graphql/define";
import { version } from "@@/package.json";
export const versionResolver = defineQuery({
version: () => version,
});
app/graphql/queries/version.query.graphql
query Version {
version
}
Am I missing something ?