graph-network-subgraph icon indicating copy to clipboard operation
graph-network-subgraph copied to clipboard

Subgraph should expose field like `lastUpdatedAt` to identify if new data is synced

Open stevepro-lab opened this issue 4 years ago • 4 comments

Currently subgraph clients has no way to identify if any update is made in entities synced. Field like lastUpdatedAt can be an indication to client that new data is synced by subgraph.

This will help subgraph clients to make decision on when to query data.

This field can exists at subgraph level possible under _Meta_ entity.

stevepro-lab avatar Feb 04 '21 18:02 stevepro-lab

It should be easy to add this in in the next subgraph update!

davekay100 avatar Feb 05 '21 00:02 davekay100

@davekaj will lastUpdatedAt be at entity level or entity_row level?

abhayait avatar Feb 05 '21 08:02 abhayait

I think this one slipped through, right? @davekaj

@stevepro-lab your idea is to have a "global" lastUpdatedAt which would let you know the last time any entity had changes within this subgraph? or would it be something like having a lastUpdatedAt field on all entities, so you can know if that specific entity has received any updates?

juanmardefago avatar Jul 28 '21 14:07 juanmardefago

@juanmardefago @davekaj I will recommend keeping lastUpdatedAt at each entity row level. This way users will know the exact record/row which was updated. What do you think?

abhayait avatar Jul 30 '21 02:07 abhayait