-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete button issue #16
Comments
the console.log brings the getposts aray perfectly, but the console throw a "can't read property getPosts of undefined" |
Hello @ArielPenna , this might solve your issue: You should add a poll interval to your useQuery in your Homepage.js, like this:
|
Hi, @mariusflorescu thats not working either |
Agh sorry, I didn't read the issue carefully enough. |
@mariusflorescu thanks, but it didn't solve py issue, the problem is tha when i press de delete button, it actually delet the post but no reload (when in home) or redirect to home (when in singlepost) |
I had the same issue and fixed it using proxy.modify. proxy.modify({
fields: {
getPosts( existingPostRefs, { readField }) {
return existingPostRefs.filter( postRef => postId !== readField("id", postRef ));
}
}
}) |
Instead of modifying data.getPosts and passing it into proxy.writeQuery, just set a data element directly:
|
the delete button does not automatically update the render, I have to reload, and in the single post page i doesn't redirec me to home either.
Any Idea?
The text was updated successfully, but these errors were encountered: