score:1
for the time being you have to set all three types.
const defaultoptions = {
watchquery: {
fetchpolicy: 'cache-and-network',
errorpolicy: 'ignore',
},
query: {
fetchpolicy: 'cache-and-network',
errorpolicy: 'all',
},
mutate: {
errorpolicy: 'all'
}
}
const client = new apolloclient({
link,
cache,
defaultoptions,
})
Source: stackoverflow.com
Related Query
- React Apollo default fetchPolicy
- Apollo GraphQL: Change default Header INSIDE React Child Component
- React apollo default query variable from redux store
- Default property value in React component using TypeScript
- How to set component default props on React component
- React functional component default props vs default parameters
- How to specify (optional) default props with TypeScript for stateless, functional React components?
- react router v4 default page(not found page)
- Apollo GraphQL React - how to query on click?
- React - defaultProps vs ES6 default params when destructuring (performances issues)
- How to remove the default CRA react favicon?
- What is the default unit of style in React Native?
- Attempted import error: 'uuid' does not contain a default export (imported as 'uuid') In React
- React Input Element : Value vs Default Value
- React Apollo - Make Multiple Queries
- use query hook react Apollo conditional call
- React & TypeScript: Avoid context default value
- React Apollo Error: Invariant Violation: Could not find "client" in the context or passed in as an option
- React | Ant design select default value
- How to declare default props in react functional component
- Can't build React/Next project - found page without a React Component as default export (context api file)
- Default Route With React Router 4
- How to correctly redirect after catching authentication failure with Apollo and React
- What is the necessity of "export default connect" when you are connecting your react component to redux store
- semantic ui react default selected options in dropdown
- How to run a mutation on mount with React Apollo 2.1's Mutation component?
- How to set React default props for object type
- How to use Apollo Client + React Router to implement private routes and redirection based on user status?
- refetchQueries in Mutation Component of React Apollo Client is not working?
- Providing default value for function prop in React
More Query from same tag
- using same props of caller component
- Kendo React PDF and changing from class component to function component
- How to get input text value on click
- Return null from a stateless component/"functional component"
- reactstrap - create-react-app - not found bootstrap/dist/css/bootstrap.css - v.4
- Return key name of array of object
- Calling React Component function from JS function
- firebaseui signInSuccess redirect in callback
- React useState Causing an infinite loop
- How can I add prices for objects
- How can I update singular value of Array in React State
- Unexpected unit "ms" unit-allowed-list, react scss
- How to loop through new input boxes renderer in React and get the values in an array?
- Uncaught TypeError: setState is not a function, why isn't it working?
- reactjs transferring the data between two components
- How do I manage state on a React component that can have state changed from the parent or from events upon it?
- How to bypass typescript type check when props of OwnProps would auto merge by connect?
- Wrap React component with another component in the same file
- TypeError: posts is not iterable returning data from firebase
- React/Jest/Enzyme - Spying on changeHandler fails on .toHaveBeenCalledWith(event) check
- How to setup firewall on ubuntu for digital ocean?
- Get a constructor variable in promise
- Mocking @material-ui/pickers in Jest
- Can getDerivedStateFromProps be used as an alternative to componentWillReceiveProps
- How do I override the defaultValues in useForm and maintain the isDirty function?
- Where to register postcss plugin in react app
- dispatching action creator syntax react-redux
- How to add from ... to ... meta data to antd table pagination
- Why Relay Modern is making new requests, instead of using cache
- Scroll to element in React based on "getElementsByName" function