3,395 questions
0
votes
1
answer
40
views
Cannot import @apollo/client in Vinxi/Vite/Tanstack Start
The following line works fine in the browser and in Bun:
import { ApolloProvider } from "@apollo/client";
but when I run it in SSR (inside Tanstack Start / Vite / Vinxi) I get an error ...
0
votes
2
answers
53
views
Apollo client cache not being reset after calling client.resetStore()
I am getting an unexpected behaviour. That is, I have put a skip condition in the query and even when the skip condition is supposed to be true, the query is being run. I have made a minimal ...
0
votes
0
answers
42
views
Connection to the Express/Apollo Server fails from certain networks
I have a React frontend using Apollo Client to interact with a backend GraphQL server. The GraphQL server is a Node.js application utilizing Express and Apollo Server, and it communicates with ...
0
votes
0
answers
13
views
Angular Graphql JWTToken Http Only
I want to use the standard approach from Apollo client to automatically get a refreshed token when I face an error related to authentication.
I initially wanted to use the following approach:
const ...
0
votes
0
answers
31
views
useQuery with useEffect not causing infinite re-render
I have below code snippet:
const [state, setState] = useState(null);
{data, loading, error} = useQuery(SOME_QUERY, {fetchPolicy: 'no-cache'});
useEffect(() => {
setState(data)
}, [data]);
This ...
1
vote
1
answer
41
views
Parse JSON response to apollo-client query
How can I parse a stored JSON response in React and pass to a component that is expecting graphQL response?
Is there a way to add the __typenames from the query RatingQuery?
This is what I am trying, ...
0
votes
0
answers
23
views
Are inline fragments recommended for GraphQL for native mobile app consumption?
New to GraphQL. Working on designing integration for native mobile app (kotlin/swift).
Planning to use Apollo GraphQL
Architecture:
native app(app) -> graphQL server (server) -> REST endpoint (...
1
vote
2
answers
82
views
getting cookies from apollo client on next js
I want to get the cookie with my client component, but somehow, it always return undefined or empty string. I am using js-cookie since someone recommend it.
ApolloProviderClient.tsx:
"use client&...
0
votes
1
answer
31
views
setContext not setting the token call before API call when token expires
Token API should get called before the GraphQL API but it's being called at the same time
I am fetching the headers inside setContext
Inside commonAuthHeaders I am calling the API to get refresh token
...
0
votes
0
answers
16
views
How do I invalidate all objects of a certain type at once?
In apollo-client, cache.modify() lets me invalidate individual objects by ID.
However, I need to invalidate all objects of a certain type at once without knowing individual IDs or having a top-level ...
1
vote
1
answer
57
views
Apollo client cache returns a bad data
First, I call useGetData with parameters that include filters for test1 and test2 (this is correct). The data is fetched and stored in the cache. Then, I disable the test2 filter and make a new ...
0
votes
0
answers
18
views
Apollo client type policy on fetch instead of cache?
I know I can set a type policy on the client side cache, where I can convert a field from one type to another with some processing, but this only works on queries that are cached. If I don't cache a ...
1
vote
0
answers
11
views
Cannot throw specific error to the frontend from backend in apollo/spring app
I want to throw a custom exception from the my reactive spring-boot backend to the browser front end over graphql apollo. I want to front end browser to know about the specific information in this ...
0
votes
1
answer
69
views
Getting "reobserveAsConcast is not a function" error after updating to Apollo Client 3.12.0
I recently updated my Apollo Client version from 3.5.8 to 3.12.0, and now I'm encountering an error when using the useLazyQuery hook. The error states:
observable.reobserveAsConcast is not a function
...
1
vote
0
answers
32
views
Unknown logs in registered persisted query
I am trying to implement registered persisted query. when i am running a query which is not there in my PQL, with apq as enabled it is logging the query in router logs with error code “...