Im building an SPA with parse.js and Vue.js and are using queries like these to pull things from my database.
let query = new parse.Query("MyData");
const results = await query.find();
This works fine but my data wont update automatically when there is a change to the database unless I update the page. I guess this is what livequeries
are for?
I tried to subscribe but this didnt work:
const MyClass = parse.Object.extend("MyData");
const query = new parse.Query(MyClass);
let subscription = await query.subscribe();
subscription.on("open", () => {
console.log("subscription opened");
});
Do I misunderstand the concept of livequeries? Or can I get my data to update as soon there are updates to the database?
Any help with an approach to get my data in the frontend to update according to the changes in the database would be very much apreciated!