Questions tagged [apollo-client]
Apollo Client is a JavaScript library for building client UIs that fetch data using GraphQL.
apollo-client
3,397
questions
0
votes
0
answers
3
views
Apolloclient graphql query data and previous is undefined when loading is true
we are using @graphql-codegen to create hooks for our queries. And we have a framework-query-hook called useFrameworkQuery, which contains important framework data such as viewport. The idea here is ...
1
vote
1
answer
19
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 ...
0
votes
0
answers
9
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",
...
0
votes
0
answers
16
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)...
-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 ...
0
votes
1
answer
87
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}...
0
votes
0
answers
21
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 ...
0
votes
0
answers
20
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 ...
0
votes
1
answer
25
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 ...
-1
votes
0
answers
15
views
How to refresh JWT using Apollo GraphQL in Remix (SSR)
Has anyone figured out how to refresh a JWT using Remix and Apollo Client?
I've been trying (and failing) to refresh a JWT using Apollo Client and Remix. I've seen a number of solutions, and none of ...
-1
votes
0
answers
11
views
Throwing an error from Apollo setContext and catching in onError
I'm trying to throw an error from within a setContext call and have that error caught by the onError link within Apollo. The problem is that it seems onError is never triggered when the error is ...
0
votes
4
answers
63
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 ...
0
votes
0
answers
22
views
WebSocket connection to 'ws://localhost:4000/graphql' failed
i am trying to use subscription in my react app but its throwing error of webscoket connection failed
import { PropsWithChildren, useMemo } from 'react';
import {
ApolloClient,
InMemoryCache,
...
0
votes
0
answers
9
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 ...
0
votes
0
answers
17
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 ...