Skip to content

Latest commit

 

History

History
 
 

urql

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@nuxt3-graphql/urql

@urql/vue for Nuxt.js! ⚡️

Features

  • Provide urql client to your application
  • Configurable URL in nuxt.config.ts
  • SSR support with ssrExchange

Install

yarn add -D @nuxt3-graphql/urql @urql/vue graphql
# npm i -D @nuxt3-graphql/urql @urql/vue graphql

Usage

Within your nuxt.config.js add the following:

import { defineNuxtConfig } from "nuxt3";

export default defineNuxtConfig({
  buildModules: [
    "@nuxt3-graphql/urql",
  ],
  urql: {
    url: "https://rickandmortyapi.com/graphql/"
  },
});

Refer to the @urql/vue documentation for more information.

Typescript

For Nuxt config typescript support, add the following to tsconfig.json:

{
  "compilerOptions": {
    "types": [
      "@nuxt3-graphql/urql"
    ]
  }
}

Roadmap