Skip to main content

All Questions

Tagged with
0 votes
1 answer
43 views

How to implement cursor based pagination when elements can be deleted, which can invalidate the stored cursor?

I have a GraphQL query which looks like so query Person($cursor: ID, $limit: Int) { items:{ ... } name ... cursor } While making the query for the next page, I fetch using the returned ...
dumbPotato21's user avatar
  • 5,695
0 votes
3 answers
29 views

Is Apollo client polling 'long' or 'short'?

I can't see anything in the Apollo docs to suggest whether the Apollo client implements short or long polling - can someone please confirm(?)
JoeTidee's user avatar
  • 26k
0 votes
1 answer
32 views

After some requests it losts the cookies and gives GraphQL Error "Cannot read properties of undefined (reading '_id'). "

I am using Query and resolver for fetching the articles data. In one request it fetches the 15 records. Fetching data limit is 15. After some request it lost the user Info/cookies an gives error ...
Priya Kumari's user avatar
0 votes
1 answer
34 views

Pagination of Data with Apollo GraphQL and SSR NextJS pages

I am using Next.js v14, graphql, ApolloClient and ApolloGraphQL Experimental support for NextJS { "@apollo/client": "^3.12.0-rc.3", "@apollo/experimental-nextjs-app-...
randomuser5767124's user avatar
1 vote
0 answers
21 views

apollo-client-maven-plugin: How to flatten fragments in generated models

I'm using the apollo-client-maven-plugin version 7.1.0, and I'm trying to flatten fragments in my response models, but I'm encountering an issue where the fragments are wrapped in a nested object. ...
Denis Cucchietti's user avatar
0 votes
0 answers
12 views

Has anyone got FilePond working with apollo-upload-client?

I use a GraphQL API and Next.js frontend and they're integrated with Apollo Upload Client. There's a section of my website where the user can upload files, and upon uploading each file I'd like an ...
Candace Wong's user avatar
0 votes
0 answers
20 views

How to handle multiple field updates in a form with GraphQL mutations in React?

I'm building a React form where I need to update multiple settings using GraphQL mutations. However, I want to optimize the process by calling the API only once to update all fields at once, instead ...
Md Mohosin Ali Shah's user avatar
0 votes
0 answers
19 views

How can I inform my user if a GraphQLWsLink is disconnected?

I have multiple subscriptions in my angular app in a service like this: getNewHouses(name: String): Observable<Partial<House>[] | void> { return this.apollo.subscribe<{ onNewHouses: ...
Hugo Fernandes's user avatar
0 votes
1 answer
30 views

Data Retrieval not getting updated until after a few requests in my Apollo GraphQL request

I have this weird issue in my react application. My graphQL request does not seem to be fetching the most recent data even when the graphQL server returns the data. I am not really sure what is going ...
oleksii pytts's user avatar
1 vote
1 answer
128 views

NextJs Error at build: ApolloError: Dynamic server usage. Couldn't be rendered statically because it used revalidate: 0 fetch

When we build nextJs yarn build when it goes to the step Generating static pages we have this error: Error occurred prerendering page "/partners/partner-with-us". Read more: https://nextjs....
Alan's user avatar
  • 10.1k
0 votes
1 answer
31 views

Cannot mock useMutation using MockProvider

I have been using MockProvider from Apollo Client successfully in mocking normal GQL queries, but when I try to mock mutations it does not seem to work. If I try to mock a useMutation using the ...
Oliver Watkins's user avatar
1 vote
0 answers
83 views

Why does querying Strapi with "DRAFT" status return both published and drafted items in GraphQL?

I'm using Strapi as a headless CMS with the Draft & Publish feature enabled, and I'm querying the data using GraphQL in my project. The problem I'm facing is with filtering drafted and published ...
david's user avatar
  • 67
0 votes
1 answer
25 views

Can I use Apollo refetchQueries with a different client

We are in the process of migrating some calls from one server to another. I currently have an existing call that works with refetchQueries const refetchQueries = ['MyComponent', { query: MY_QUERY, ...
Baptiste Pernet's user avatar
0 votes
0 answers
17 views

ApolloError: Variable "$sku_id" of required type "Int!" was not provided

Here's a more refined version of your problem formatted for Stack Overflow: Problem with Apollo Client: "Variable $sku_id of required type Int! was not provided." I'm working on a task ...
Omar Ashraf.Othman's user avatar
0 votes
1 answer
82 views

Use GraphQL Documents on Apollo Client queries

I have created a Rest API application in Typescript, using NestJS and querying a GraphQL server using Apollo Client. I currently have my queries hard-coded like this: const query = "query { ...
Matheus Maximo's user avatar

15 30 50 per page
1
2 3 4 5
128