score:0
Rather reluctantly I have ended up using a different fetch policy to ensure that the data is up to date.
useLazyQuery(GET_MY_ITEMS, { fetchPolicy: 'cache-and-network' });
This means I don't necessarily need to update the list after mutation but this feels suboptimal as every pagination results in the call to the server, I would much rather use cache most of the time and only call server when required.
Source: stackoverflow.com
Related Query
- Apollo Client refetch after mutation when paginating
- Apollo client update after mutation can't map over original result?
- React Apollo updating client cache after mutation
- React Apollo client prop refetchQueries after mutation
- Circular error on Apollo Client when trying to refetch
- Reset store after logout with Apollo client
- Is there a way to detect when data used by a query is evicted from the Apollo Client cache?
- refetchQueries in Mutation Component of React Apollo Client is not working?
- apollo graphql UI is not updating after refetch
- Apollo Client client.readQuery returning null when data is in the cache
- How to set up Apollo client only after user authenticates?
- Apollo Client Reactive variables - not trigger re render after updating the value
- Apollo Client lazy refetch
- Prevent apollo client from automatically refetching queries after updating cache
- How to prevent unnecessary refetch using Apollo Client useQuery hook?
- When trying to call Apollo Client Query, I am always getting loading: true,networkStatus: true
- Update apollo client with response of mutation
- ReactJS: Apollo Client set Authentication Token after User is Authenticated
- Update Apollo cache after Mutation
- Prevent client side re-render when using SSR and Apollo client
- Apollo can't access queryVariables in update: after a mutation
- Apollo React: How to refetch query when a different option is selected from select dropdown?
- Data becomes undefined in usequery of apollo client only when refreshing the page in the browser
- Apollo Mutation - UI not updated after useMutation update
- Refetch queries after Mutation doesn't work
- How to make a GraphQL lazy query with Apollo client after the first query is successful
- Setting Apollo cache / state after mutation
- Not able to add data using mutation on Apollo Client
- express http: 500 error on graphql mutation to create user from apollo client in react
- Is there a way to pass a dynamic GraphQL query to a graphql() decorated Component when using Apollo Client 2.0?
More Query from same tag
- Group array by two different keys and sum values
- trying to set new state with function in componentDidMount: this.setState is not a function
- Getting user information from local storage - getUser
- React - loading images from a remote server (absolute path require/import)?
- Redux-saga - TypeScript error with TakeEvery: TakeableChannel<unknown>
- css pseudo code "li::before" in react inline style
- How to pick React JS form input field value using Axios
- Cannot declare React context in typescript?
- React props not loading the datatable
- Reactjs: Destructuring and formatting of params?
- React - Map Over Array Of Components To Return
- Can you, or should you use localStorage in Redux's initial state?
- Type error: Cannot find type definition file for '__mocks__'
- Math operation in React State
- React Hooks, state not updating from fetch within useEffect
- User login issue in ReactJs
- MERN app in microk8s kubernetes with ingress, page does not display
- How to trigger redux action in react componentDidUpdate method?
- Ionic React + Electron Discord authentication
- React Router "Link to" does not load new data when called from inside the same component
- Where do I initialize state in React
- React Uncaught SyntaxError: Unexpected token
- React: can we impot only selected functionality from npm module while installing using webpack or somthing else?
- Can't trigger setState with react on subsequent data fetch w/ papa parse to pass new props to rerender child component?
- TypeError: this is undefined - {this.props.sections}
- React.Js - Part of the DOM does not render
- React WebWorker using fat arrow syntax insted of class syntax
- How to check email overlap using Axios get and post for SignUp with React?
- How do I edit events in "react-big-calendars"
- How to update hook values after concatenation?