-
Notifications
You must be signed in to change notification settings - Fork 19
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
Improved Subgraph Events Sorting #2972
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things about dates in the local dev environment to keep in mind:
They can and are manipulated either by us directly or by various services we have running in the background |
13b56b9
to
924f6ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working as expected from what I could see! Well done
924f6ea
to
41db368
Compare
This PR introduces events sorting on the subgraph side, by adding a
timestamp
prop on all event entities on that are coming from the subgraph, so that we can pass query selection fields likeorderBy
andorderDirection
Besides the above, I've also refactored the
ColonyEvents
component (it actually started this) to properly have pagination (before this, we would just fetch the first 100 events, then split them up locally)Note that we cannot do the same for the
ColonyActions
component due to the way we are combining 4 data streams into one, and not always symmetrical (this will become a problem once a colony surpasses1000
combined actions)Since sorting is now done directly, prior to the data reaching our data, I also removed the
sortSubgraphEventByIndex
util, as it was no longer requiredTesting note
Since this is using an update version of the
subgraph
, make sure to runnpm run provision
prior to testing this