@urql/vue for Nuxt.js! ⚡️
- Provide urql client to your application
- Configurable URL in
nuxt.config.ts
- SSR support with ssrExchange
yarn add -D @nuxt3-graphql/urql @urql/vue graphql
# npm i -D @nuxt3-graphql/urql @urql/vue graphql
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.
For Nuxt config typescript support, add the following to tsconfig.json
:
{
"compilerOptions": {
"types": [
"@nuxt3-graphql/urql"
]
}
}
- Integration with GraphQL Code Generator
- Normalized caching with Graphcache