Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
1 answer
23 views

'npm run dev' result: [Error: ENOENT: no such file or directory, open '/ddev/project-name/node_modules/@vue/apollo-composable/src/useApolloClient.ts']

I took over a Craft CMS project, which I successfully upgraded to the latest version of Craft 5. When I run the command needed to build the JS and CSS files npm run dev I get the following error: ...
cjhdev82's user avatar
0 votes
0 answers
16 views

Implementing mTLS for WebSocket Connection in Next.js with Apollo Client

I'm working on a Next.js app that connects to our GraphQL server using Apollo Client. Recently, I was asked to set up mTLS (mutual TLS) for this GraphQL connection. I successfully created an internal ...
Jairo Py's user avatar
  • 868
0 votes
0 answers
16 views

Datasource is undefined when running the Apollo GraphQL server

I am getting datasource undefined on resolvers when trying to query getTracking. I have a FedexAPI class that extends RESTDataSource from "@apollo/datasource-rest" as a Data source. The ...
Anamol Acharya's user avatar
0 votes
1 answer
53 views

Apollo client + zustand?

I’m currently working on a personal sports tracking project using React Native and GraphQL, and I’m wondering about the use of Apollo Client in combination with Zustand. Apollo Client handles data ...
Jeff's user avatar
  • 11
0 votes
1 answer
30 views

undefined is not a function. Graphql + apollo + react native

In my react native project I'm using graphql codegen to generate types and hooks. I'm using react native 0.74.5. But I don't know why I have an error, so that is why I can't launch my app. also here ...
rakhlinskyi's user avatar
0 votes
1 answer
18 views

Apollo Client Caching Issue with fetchPolicy: 'no-cache' in Next.js Server Component

I'm working on a Next.js server component to fetch events from a GraphQL server, but I'm encountering an issue where the cache seems to be used despite setting fetchPolicy: 'no-cache'. Here is my ...
James Nganga's user avatar
0 votes
0 answers
21 views

Vue JS how to properly load and refresh Vue app with Apollo and Auth0 JWT tokens

In main.js we have the below code to load the Vue app with Apollo and Auth0. This works but has always felt hacky and is now running into an issue where if the JWT token expires the user gets errors ...
AndyW's user avatar
  • 1,044
-1 votes
0 answers
22 views

Issues with Alert Modal Closing Instantly Before Mutation Completes and Inconsistent Modal Backdrop Behavior in Shadcn UI

I'm working on a React project where I use Apollo Client for GraphQL queries and mutations. The UI framework I'm using is Shadcn UI. I have a component (Contacts) where users can delete contacts, and ...
iddi Msangi's user avatar
1 vote
1 answer
32 views

Best practise to typePolicies with Apollo

I want to have centralized client-only fields. Example: Server: type Name { first: String last: String } type User { name: Name } Client: extend type User { fullName: String! } import { ...
Anton S's user avatar
  • 49
1 vote
1 answer
20 views

GraphQl is not able to execute mutation with apollo

I have given mutation query for adding book details. I have to accept 3 params dynamically. this is my bookQuery.js const ADD_BOOK = gql`{ mutation ($name: String!, $genre: String!, $authorId: ID!)...
Ashish Khokhariya's user avatar
0 votes
0 answers
44 views

Codegen graphql hooks and functions into separate files but in the same folder and without generating a base types?

I'm using graphql-codegen to generate apoollo mutations and queries into separate files (I noticed tree shaking does not work at all with a single generated graphql file). This is where I'm at in my ...
meds's user avatar
  • 22.7k
0 votes
1 answer
24 views

Apollo Client is not using cached data and instead makes a network request

I have this weird behavior that I've been wrapping my head around for the past couple of hours. Let's consider these two queries as examples: A query that returns and array of authors query Authors { ...
As above so below's user avatar
2 votes
1 answer
27 views

Issue with new React 18 initialization and ApolloProvider component

I have the following index.js in my React 18 + Apollo Client demo project: index.js: import { createRoot } from 'react-dom/client'; import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/...
Victor Polo De Gyves Montero's user avatar
1 vote
1 answer
36 views

Why does ApolloClient InMemoryCache entityStore getFieldValue need to use maybeDeepFreeze?

I'm currently using Apollo Client v3.8.6 in dev mode. I've noticed that when I query a large amount of data (around 6000 objects), it takes approximately 300ms on an M2 MacBook and 800ms on an iPhone ...
Yu-Lin Hsiao's user avatar
0 votes
1 answer
42 views

AWS AppSync subscription with ApolloClient in React: 2024

Is anyone still able to work with AppSync, and ApolloClient in React in 2024? I see a lot of discussions, sadly all the solutions are suggesting a different approach. And despite me following the ...
Akshit Aggarwal's user avatar
1 vote
1 answer
22 views

React Router: Persisting Previous Route After Logout Without Using LocalStorage

Description: I'm working on a React project where I need to persist the previous route a user was on even after they log out, without using localStorage. I'm using React Router v6 and Apollo Client ...
iddi Msangi's user avatar
0 votes
1 answer
131 views

Angular 18 error did not render in 30 seconds on consume apollo

i discovered an error using Angular 18 SSR trying to control error response from grapqhl-apollo, the server method return error after 30 seconds and from angular client with the observable i must only ...
Dr oscar's user avatar
  • 417
0 votes
0 answers
38 views

Apolloclient graphql query data and previous is undefined when loading is true

we are using @graphql-codegen to create hooks for our queries. We have a framework-query-hook called useFrameworkQuery, which contains important framework data such as viewport. The idea here is that ...
Kim Vu's user avatar
  • 668
1 vote
1 answer
26 views

App Crash when using ReactNativeFile in apollo upload client to upload file

Issue Description I’m encountering a ClassNotFoundException related to okhttp3.internal.Util while trying to upload a file using ReactNativeFile with apollo-upload-client. Additionally, when using a ...
daniel meyer's user avatar
0 votes
0 answers
16 views

Missing generation from graphql-codegen for Upload

The following is the nestjs and react native related code. I expect it will generate useGetNumbersQuery, but it only generate the QueryDocument. nestjs "graphql-upload": "^15.0.0", ...
vin5dev's user avatar
  • 53
0 votes
0 answers
27 views

Slurp pages with useBackgroundQuery in Apollo Client

A component needs to fetch all data from a paginated GrapQl API. I'd like to use Suspend to suspend the component until all data has been fetched. Here's a query query Get($first: Int!, $after: String)...
Aleksandar Dimitrov's user avatar
-1 votes
1 answer
41 views

Is it possible to pass a Apollo Client GraphQL error from the server to the client

I am using Apollo client. I have a GraphQL error from the Apollo error: const { data, loading, error } = useyQuery();. I can see (and log) this error?.graphQLErrors on server side. On the client the ...
meez's user avatar
  • 4,580
0 votes
1 answer
294 views

Nuxt - Component is already mounted, please use $fetch instead

I have this code const redirectToPayment = async () => { const { data } = await useAsyncQuery( createCheckoutMutation, { variantId: product.value.productByHandle.variants.edges[0].node.id}...
Bernardao's user avatar
  • 480
0 votes
0 answers
30 views

Refreshing data client side after mutations when data initially loaded using apollo in SSR component in Next 14

So until now my general pattern with Apollo has been to fetch and cache data on the client. Then when I fire off am mutation I do an optimistic update to the cache, my UI immediately gets the ...
Stewart Alan's user avatar
  • 1,583
0 votes
0 answers
33 views

How do I make ApolloClient use multipart/form-data when sending requests to django graphql endpoint

I am writing a Django/GraphQL/Apollo/Vuetify app, and I am struggling to navigate the CORS/CRSF consequences. As far as I understand, I think that Django and GraphQL are doing the right thing on the ...
spierepf's user avatar
  • 2,856
0 votes
1 answer
31 views

Having problems with vue devserver proxy not redirecting

I have a simple vue applicaition which I am running on port 8080. I also have a graphql server running on port 3000. There is a vue component on my app which calls the function getData(); This get ...
Alici-EdOna's user avatar
2 votes
4 answers
68 views

How to bypass useEffect dependency for custom hook?

Here's my sample code: const { getConversionList, conversionList } = useConversion(); useEffect(() => { getConversionList(); }, []); useConversion is a GraphQL resolver hook, I'm getting ...
AKG's user avatar
  • 21
0 votes
0 answers
14 views

Apollo GraphQL client: programmatically extract pagination cursors

I am working on a Kotlin project where we use the Apollo GraphQL client library to execute complex GraphQL queries, each containing multiple sub-queries with individual pagination. For example: query ...
mstrap's user avatar
  • 17.3k
0 votes
0 answers
18 views

HOW GENERATE PRISMA SECRET in Express js using typescript?

I am having difficulty finding the prism secret, I have run the command: yarn prisma:generate but it only generates a folder without a secret key enter image description here My expectation is to get ...
Arga Fauzianto's user avatar
0 votes
0 answers
19 views

Apollo Client cache invalidated by separate query

I am working on building a site at the moment that, among other things, allows you to see a table of financial transactions. This table is infinite scrolling and continues to get pages of transactions ...
Nathan Hughes's user avatar
1 vote
0 answers
18 views

Apollo Client cannot create multiple items at once using directus

Alright I have a event_datetime data model in directus, I am trying too create multiple of these at once, using the apollo client in react native. This is my mutation: mutation CreateEventDatetimes ($...
Moiz_Ali's user avatar
1 vote
0 answers
30 views

Apollo client cursor based using only first and last

I am using Apollo client (with react) to get result (graphQl + relay ), and server-side pagination I have read that using cursor-based pagination is the most reliable way, so previously I was using ...
yaminoyuki's user avatar
0 votes
0 answers
35 views

I try to integrate GraphQL PHP in backend with Apollo client and React in front end) but I get an undefined post response

1st response give this message. <br/><b>Warning</b>: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in <...
Eng Tawfik Alkady's user avatar
0 votes
0 answers
30 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 <...
IzVitox's user avatar
1 vote
1 answer
30 views

In the custom React hook does useEffect fires before the return statement?

I have created a custom react hook to fetch the data using useQuery. When the user scolls the table , then next set of data is loaded. When the custom react hook is called with the next set of props, ...
Kumud Raghav's user avatar
1 vote
0 answers
121 views

I Got ERROR : Cannot query field \"queryName\" on type \"Query\".", Even if it is published in schema

In my project I am using ApolloStudio for publishing my graphql queries, Using rover script I published my new query and it reflected in the changeLogs also in the API schema. But when I tried it on ...
Niraj C S's user avatar
0 votes
1 answer
40 views

ApolloServer 4: Client Can't Connect to Subscriptions?

I've got my new ApolloServer 4 client and server setup. It's working for queries and mutations, but not for subscriptions. Subscriptions aren't connecting at all. It's sending context to queries and ...
VikR's user avatar
  • 5,024
0 votes
0 answers
39 views

Error in apollo client with refresh token code

import Toast from 'react-native-simple-toast'; import { ApolloClient, InMemoryCache, ApolloLink } from '@apollo/client'; import { onError } from '@apollo/client/link/error'; import { createUploadLink }...
Rover's user avatar
  • 738
0 votes
0 answers
23 views

Pagination query is not accepting variable

I am using next.js and apollo client to to query graphql api. I have following code for cursor based pagination. const GET_COMMENT_DATA = gql` query Comments($cursor: String, $limit: Int) { ...
Roshan Ojha's user avatar
0 votes
0 answers
79 views

Vite throws error: Could not resolve "subscriptions-transport-ws"

I'm migrating an existing react app from create-react-app to vite. After the basic setup, I ran "npm start" and received the error below: [ERROR] Could not resolve "subscriptions-...
Lucky King's user avatar
0 votes
0 answers
52 views

Why graphql apollo-client request's has different response timeout in local and cloud

I have a nestjs application which uses graphql apollo-client data fetching, using nginx for load-balancing. I have encountered 2 different timeout while connecting to the local and cloud backend. ...
a-humanthing's user avatar
0 votes
1 answer
65 views

Updating Apollo client cache directly and not part of a mutation

I'm trying to get something working as part of a proof of concept project and essentially want to be able to run a query that results in a bunch of objects being cached and then write directly to the ...
Stewart Alan's user avatar
  • 1,583
0 votes
0 answers
26 views

Not able to use the union types on graphql using apollo client

I have a query that uses union types inside it. sample query person { ... on jedi{ id lightsaber } ... on mandalorian{ id beskar } } when I ...
Gowthaman Ganesan's user avatar
0 votes
1 answer
37 views

Apollo-Client optimistic response only works once

I am using optimistic responses in Apollo to add a new object to a list instantly in the UI. I use the cache.modify() function to update the query and it works fine for the first time but only once, ...
TheBrenolibre's user avatar
0 votes
1 answer
30 views

How to use noStore in apollo client wrapper in nextJS app router?

I'm using the app router of nextJS for the first time and I need to implement apollo client with using env variables on runtime: app/layout.tsx import { ApolloWrapper } from './ApolloWrapper' import '....
user3142695's user avatar
0 votes
0 answers
22 views

Could not pass variable to graphql query in next.js app router using APollo Client

"use client" import { gql, useSuspenseQuery } from "@apollo/client" import { query } from "../ApolloClient" interface breedprop{ breed:string } const GET_DOG_PHOTO ...
Roshan Ojha's user avatar
2 votes
1 answer
284 views

next js 14 how to call graphql query as a ssr

I have created a next js project and setup apolo-client. I have rapped my children with it. this is my layout.tsx file code import { Inter } from "next/font/google"; import "./globals....
Asit singh's user avatar
1 vote
0 answers
33 views

Apollo Client - Recursively fetch all relay style paginated results

With apollo client, I'd like to fetch all data on a paginated query on page load. I essentially want to do: 1. Fetch initial data and page info 2. Fetch all subsequent data until there is no more ...
coler-j's user avatar
  • 2,019
0 votes
1 answer
24 views

Issue dealing with the apollo client

I am making a full stack app with aws amplify. I am using app sync sdk because I was having issue with generating a aws amplify client. But now it's showing this problem with apollo client. Without ...
S-NaN-WaR's user avatar
0 votes
1 answer
55 views

Apollo client returning Unknown Type Error when executing a mutation

I've got a problem with running my graphql mutation due to the following error: "errors": [ { "message": "Unknown type \"GenderInput\".", ...
julek5119's user avatar

1
2 3 4 5
69