[SOLVED] Live query question about sync event

Hi guys, I’m facing some questions: I have a SM code that create a bid then emit an event and now moralis i’m using will get all historical data that my contract addresse emit that type of event. But there is any way for me to get realtime when moralis watch a new event ? I tried live queries but it work only if I create new row on my own by code

You can create a subscription to a live query. So when there is a change in the database you receive an event on your app.

maybe you tried to listen on create instead of on update for the subscription

live query should work fine for the new events synced in the database

1 Like

I have try subscription on create but it didn’t work :frowning:

can you give me some example code ? I tried but it doesn’t work it only listen when i create new row by code instead of listening events on the contract

try on update instead of on create

1 Like

Thank you for your time , it works !

1 Like