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

Real time updates stops working sometimes depending on the query #28

Closed
dortamiguel opened this issue Jun 30, 2017 · 2 comments
Closed

Comments

@dortamiguel
Copy link

dortamiguel commented Jun 30, 2017

I'm not sure if this can be considered as a but when using mongoose and a $populate query the filters stops working and real-time updates stops working.

methods: {
	...mapActions('notifications', { findNotifications: 'find' }),

	fetch() {
		this.findNotifications({ query: { $populate: 'from' } })
	},
},
@dortamiguel dortamiguel changed the title Real time updates stops working when using $populate on a find mapActions Real time updates stops working sometimes depending on the query Jul 10, 2017
@dortamiguel
Copy link
Author

I changed the name because I found more examples where real time updates stop working,

this.findMessages({ query: { from: _id } },

I can see on the network tab on chrome that the notification is arriving but feathers vuex doesn't include it.

@dortamiguel
Copy link
Author

Okay! I found the problem,

The thing is that I was populating "from" on an after hook and that breaks what feathers-vuex was expecting, this is my final populate work that works fine now:

	after: {
		all: [
			populate({
				schema: {
					include: [
						{
							service: 'profiles',
							nameAs: '_from',
							parentField: 'from',
							childField: '_id',
						},
					],
				},
			}),
		],
	},

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

No branches or pull requests

1 participant