338 questions
0
votes
1
answer
85
views
Vue 3 apollo client UseLazyQuery for multiple results
I am trying to run the useLazyQuery in my vue to get data from Apollo client. I am passing the parameter and query return different results based on the parameter being passed.
My issue is that result ...
0
votes
0
answers
63
views
Nuxt 3 & nuxt/apollo cant call mutate function if called from @click
When I am trying to call the mutate function with a button I get no response and the mutation is not working yet when I call it on page reload everything is working fine.
This is my login.vue
<...
0
votes
1
answer
110
views
how to send a fetch request for getting new data after the mutation request gets done nuxt apollo
I'm sending a mutation request for adding new product to my API in nuxt 3 app like this:
<script setup>
const myProducts = ref([]);
const addNewProductData= ref({id:1,name:'test'});
const ...
0
votes
0
answers
283
views
Get Result from apollo client error undefined
I'm trying to use the result I'm getting from my apollo client. but it keeps giving me error of undefined although the request send was success in network. It means I cannot get access to the result ...
0
votes
1
answer
956
views
Can not access data of useQuery result - _rawValue - Uncaught (in promise) ReferenceError | Vue 3 Apollo 4
I'm trying a simple API request with Vue 3 and Apollo 4 with the composition API. I want to get the backend data into a pinia store, so I have the API call in the store under actions {}. Then I want ...
0
votes
1
answer
208
views
auth0 getAccessTokenSilently returns empty object when trying to set vue apollo client bearer token
We have a Vue application that connects to a Hasura API via the vue apollo client and uses auth0 for authentication.
The app runs fine when we give the apollo client the Hasura admin secret header (...
1
vote
0
answers
297
views
Vue apollo client keeps getting self-signed certificate error
I'm new to vue-apollo 4 and I just can't get it to work with my simple Graphql API
I already:
- allowed edge://flags/#allow-insecure-localhost (enabled)
- created and added to trusted authories ...
0
votes
1
answer
37
views
Missing analytics attribute on result
apollo: {
analytics: gql `
query getAnalyticsViews {
viewer {
zones(filter: { zoneTag: "tag" }) {
...
4
votes
0
answers
203
views
vue-apollo refetch result called twice?
I wonder is this expected or not, but everytime i do refetch the result or onResult is called twice.
const {onResult,refetch}=useQuery(GQLendpoint,options)
onResult(data=>{
console.log(data)})
...
0
votes
0
answers
174
views
Changes done in the VS code not reflecting in the Apollo Sandbox in graphQL
I have been learning graphQL from few days. I am new to it. I've created a GraphQL project in VS code. For running the code I am writing 'node index.js' at first and code runs on Apollo sandbox ...
1
vote
1
answer
1k
views
Vue3 Vue-Apollo Error Uncaught (in promise) Error: Apollo client with id default not found
I use Vue3 with the composition API and vue-apollo. Now I want to send a mutation to an graphql enpoint with useMutation() as follows. The thing is, useQuery works just fine.
Everything worked fine, ...
0
votes
1
answer
674
views
Laravel/Lighthouse, Graphql, Vue3: File Upload doesn't work
I'm trying to upload a file in my Vue3 (Vite) project using graph-QL, Apollo and Lighthouse but the documentation doesn't help me much.
I followed all instructions written in the official lighthouse ...
0
votes
1
answer
227
views
Failing to setup Websocket link
Been trying to get a Subscription working with Hasura and Vue Apollo with a websocket link with Vue Apollo with Vue3. Have it all seemingly setup.
The subscription works in Hasura so that’s right.
The ...
0
votes
1
answer
780
views
How to show return data from vue apollo within a <script setup> syntax
I followed this tutorial in Vue Apollo for retrieving data with fake api https://www.apollographql.com/blog/frontend/getting-started-with-vue-apollo/.
I however have a code where I use <script ...
0
votes
1
answer
888
views
Does Vue Apollo saves queries in cache?
I am currently trying to force Vue Apollo to query the latest data on an event. However, when the apollo query re-query on an event (i.e. on route change) it still loads old results (although the data ...
1
vote
0
answers
257
views
Vue3 apollo displaying query results using composition API
So I am using vue router and trying to display the graphql results on my page.
Here is the router link on index.js
{
path: '/clients/:id',
name: 'client_profile',
component: () => ...
1
vote
1
answer
530
views
Reactive queries Apollo graphql in Vue 3
Trying to make a reactive query as per https://v4.apollo.vuejs.org/guide-option/queries.html#reactive-query-definition, but I can't get them to work.
Error:
Uncaught (in promise) Error: Invalid AST ...
1
vote
0
answers
192
views
Apollo Websocket - Unable to initiate with new connection with latest JWT token
I have a vue application that connects to a graphQL server using vue apollo. The vue-apollo.js code is as follows
const httpEndpoint = process.env.XXX;
const wsEndpoint = process.env.XXX;
let ...
3
votes
0
answers
618
views
How to write the unit test for test apollo useQuery in vuejs3
I have a problem with the unit test. I try to check useQuery that has been called with toHaveBeenCalledTimes() but no luck it always returns zero time. I'm not sure which part I mistake.
export ...
0
votes
1
answer
437
views
Firebase Dynamic Links with Vue.js and Apollo client bad request 400
I have a vue app and I am trying to do a POST request to firebase dynamic links API with apollo client mutation method but I'm getting a 400 bad request error.
I wraopped all the fields with ...
0
votes
1
answer
792
views
Add header to all apollo query
As the title suggest, I am trying to add a header to all queries and mutations made by apollo. I know I can do
context: {
headers: {
'Accept-Language': $this.i18n.current;
}
}
but that is ...
0
votes
1
answer
392
views
Vue Apollo Query error module build failed
so basically i want to do a query using Apollo Query in Vue 2 CLI. but it is not working, i dont know what is the problem. maybe someone can help me? i have stuck for 3 hours withour any progress
here ...
0
votes
1
answer
3k
views
how to integrate Vue Apollo in Vue Vite project?
I'm trying to integrate Vue Apollo in a a Vite project using the composition API.
My main.js file look like this:
import { createApp } from 'vue'
import App from './App.vue'
import * as apolloProvider ...
1
vote
0
answers
163
views
Vue3 how to fix error when running "vue add apollo"?
I created an app with Vue 3.
I ran vue add apollo and run into an error.
how do I fix this
0
votes
1
answer
1k
views
Vue-apollo subscriptions not working as expected
I am working on vue-apollo and was able to use mutations and queries, but am facing issue using subscriptions. The apollo-express server with subscriptions is working fine. When a new event is created ...