Nuxt module that integrates graphql-request, a minimal GraphQL client, into Nuxt.js. Current stable version is 8.1.1 (Nuxt 3) while v6 is available for Nuxt 2. Actively maintained with regular releases. Key differentiators: simple setup, TypeScript support, runtime config for endpoints, multiple client support. Requires graphql peer dependency (14.x || 15.x || 16.x).
npm install nuxt-graphql-requestNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup with GraphQL client, useAsyncData, and template rendering in Nuxt 3.
Access response data via response object: const { data } = await $graphql.default.request(query);Use 'nuxt-graphql-request@v6' for Nuxt 2 projects.
Change import to: import { gql } from 'nuxt-graphql-request/utils';Add "extends": "./.nuxt/tsconfig.json" to your tsconfig.json.
npm install graphql
In tsconfig.json: { "extends": "./.nuxt/tsconfig.json" }Ensure your file is .mjs or add 'type':'module' to package.json.
const { $graphql } = useNuxtApp(); and verify module in nuxt.configimport { gql } from 'nuxt-graphql-request/utils';