Setup

How to setup the urql module


Installation

  1. Add package @bicou/nuxt-urql and graphql to nuxt project dependencies.
npm
npm install --save-dev @bicou/nuxt-urql graphql
yarn
yarn add --dev @bicou/nuxt-urql graphql
pnpm
pnpm add --save-dev @bicou/nuxt-urql graphql
  1. Add module to nuxt.config
nuxt.config
export default defineNuxtConfig({
  modules: ["@bicou/nuxt-urql"],
  // ...
});

Configuration

The endpoint absolute URL must be set under the urql key options :

nuxt.config
export default defineNuxtConfig({
  modules: ["@bicou/nuxt-urql"],
  // ...
  urql: {
    endpoint: "http://",
  },
});

Learn more on available options.

Table of Contents