You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
options: {
fetchPolicy: 'cache-and-network'
}
optimisticResponse: This allows you to pass a function or an object to a mutation for updating your UI before the server responds with the result. This is needed in offline scenarios (and for slower networks) to ensure that the UI is updated when the device has no connectivity. For example, if you were adding a new object to a list you might use the following:
onAdd: post => props.mutate({
variables: post,
optimisticResponse: () => ({ addPost: { __typename: 'Post', ups: 1, downs: 1, content: '', url: '', version: 1, ...post } }),
})
No description provided.
The text was updated successfully, but these errors were encountered: