Skip to content
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

New posts not shown in the list without reload #9

Open
hankolsen opened this issue Aug 23, 2017 · 1 comment
Open

New posts not shown in the list without reload #9

hankolsen opened this issue Aug 23, 2017 · 1 comment

Comments

@hankolsen
Copy link

hankolsen commented Aug 23, 2017

I tried the angular-appollo example and it runs alright.
However, changes made to the list of posts are not automatically reflected in the UI.
If I for example add a new post from the UI, it doesn't add it to the feed without reload.
If I change something on the server it doesn't either get pushed out, which I guess is due to no sw setup. But shouldn't a new post added in the UI update the feed at least?

Steps to reproduce:

  1. Start the angular-graphql/quickstart-with-apollo example locally.
  2. Go to localhost:3000 where you see a list of current posts.
  3. Click the "+ New Post" button in the top right corner
  4. On the /create page, create a new Post by adding a Description and an URL.
  5. Click Create and you are now redirected back to the list page.

Outcome: The list of post is shown, but the newly added post is not visible until after a reload.
Expected outcome: The newly added post should be shown in the list

Further investigation:
Delete one of the existing posts
Outcome: The list of posts is shown with the deleted item removed, but the newly added post is still not visible.
Expected outcome: The newly added post should be shown in the list

@hankolsen
Copy link
Author

hankolsen commented Aug 23, 2017

Debugging shows that ngOnInit is correctly called when redirected back to the feed view.
However, the watchQuery subscribe results in an allPosts list that is not updated to the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant