nuxt3-apollo-module's People
nuxt3-apollo-module's Issues
Please update dependencies to work with NUXT v3.0.0-rc.9
Does not work with nuxt3
The package installs without any problems. However the moment when I start my dev server I get this error:
ERROR Failed to resolve import "@vue/apollo-composable"
.
When I look deeper in the node_modules
that package is indeed missing.
The moment I want to install the package my self I get a peer dependency error.
This happens with nuxt 3.0.0-rc.3
and nuxt 3.0.0-rc.4 (latest)
On Login helper
Hello, can we set the token for future requests after logging in?
In vue2 version there was $apollohelpers.onlogin()
If don`t how i add bearer token before request?
[nuxt] [request error] [unhandled] [500] __DEV__ is not defined
I have this error in nuxt3 - production build only (npm run build - > npm run preview)
Works fine in dev mode (npm run dev)
It probably has to do with SSR?
Stack:
"nuxt": "^3.0.0-rc.11"
"@nuxt3/apollo-module": "^0.1.1",
Nuxi 3.0.0-rc.11
information_source Node.js version: 16.14.0
information_source Preset: node-server
information_source Working dir: .output
information_source Loading .env. This will not be loaded when running the server in production.
information_source Starting preview command: node ./server/index.mjs
Listening http://[::]:3000
Error:
[nuxt] [request error] [unhandled] [500] DEV is not defined
at createHttpLink (./server/chunks/app/server.mjs:4252:3)
at ./server/chunks/app/server.mjs:10723:22
at fn (./server/chunks/app/server.mjs:238:27)
at Object.callAsync (./server/node_modules/unctx/dist/index.mjs:49:19)
at callWithNuxt (./server/chunks/app/server.mjs:240:23)
at applyPlugin (./server/chunks/app/server.mjs:209:39)
at applyPlugins (./server/chunks/app/server.mjs:218:11)
at async createNuxtAppServer (./server/chunks/app/server.mjs:10843:7)
at async Object.renderToString (./server/node_modules/vue-bundle-renderer/dist/runtime.mjs:172:19)
at async ./server/chunks/handlers/renderer.mjs:367:21
link not support
nuxt3-apollo-module/src/plugin.ts
Line 76 in 9b029ac
link is being overrided. it is not possible to use any other custom link option for ApolloClient
Cannot start nuxt: Cannot find module 'nuxt3'
No way to pass options to InMemoryCache constructor
Problem
There is no way to neither pass cache options nor pass custom cache.
Scenario
In my particular scenario I need to pass possibleTypes to cache constructor.
Proposed solutions
- Allow user to pass path to the config file. For example:
export default defineNuxtConfig({
apollo: {
clientConfigs: {
default: "@/apollo.client.js"
}
}
})
Where apollo.client.js
file exports a function that returns client options see https://www.apollographql.com/docs/react/api/core/ApolloClient/#the-apolloclient-constructor.
For example:
import {InMemoryCache} from "@apollo/client";
import possibleTypes from "./possibleTypes.json"
export default () => ({cache: new InMemoryCache({ possibleTypes })})
- Allow to pass options into cache constructor.
For example in your nuxt.config.js
{
apollo: {
clientConfigs: {
default: {
uri: "http://localhost:3000/api",
// These options will be passed into InMemoryCache constructor
cache: {
possibleTypes
}
},
}
Doesnt properly work with ssr: false; nuxt3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.