You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requests typically load data from a local database first, with calls to the API to refresh the local database. Certain endpoints do not return information that allow local sorting however, making combining local requests with updates from the network impossible.
A summary of endpoints without the desired behavior and those with the behavior are summarized in the table below:
Endpoint
Model Type
sort key
Returned in API Response
getFollows
ProfileView
??
No
getFollowers
ProfileView
??
No
getRepostedBy
ProfileView
??
No
getLikes
GetLikesLike
indexedAt
Yes
getTimeline
FeedViewPost
indexedAt
Yes
getFeed
FeedViewPost
indexedAt
Yes
getListFeed
FeedViewPost
indexedAt
Yes
getAuthorFeed
FeedViewPost
indexedAt
Yes
Describe the solution you'd like
It would appear the issues tend to be with endpoints that return a ProfileView. I assume:
getFollows: Sorted by the time a profile was followed getFollowers: Sorted by the time a profile added a follower getRepostedBy: Sorted by the time a post was reposted.
All of these are similar to the case of getLikes, however getLikes wraps the ProfileView instances returned in the following structure with the requisite information:
This can be applied to getFollows, getFollowers and getRepostedBy, allowing for local sorting of the query to resolve with the network response when available.
Describe alternatives you've considered
Coming up with a best guess heuristic to approximate network sort keys locally.
Is your feature request related to a problem? Please describe.
I'm building an open-source offline-first client for bluesky uing Compose Multiplatform: https://github.com/tunjid/heron.
Requests typically load data from a local database first, with calls to the API to refresh the local database. Certain endpoints do not return information that allow local sorting however, making combining local requests with updates from the network impossible.
A summary of endpoints without the desired behavior and those with the behavior are summarized in the table below:
ProfileView
ProfileView
ProfileView
GetLikesLike
FeedViewPost
FeedViewPost
FeedViewPost
FeedViewPost
Describe the solution you'd like
It would appear the issues tend to be with endpoints that return a
ProfileView
. I assume:getFollows
: Sorted by the time a profile was followedgetFollowers
: Sorted by the time a profile added a followergetRepostedBy
: Sorted by the time a post was reposted.All of these are similar to the case of
getLikes
, howevergetLikes
wraps theProfileView
instances returned in the following structure with the requisite information:This can be applied to
getFollows
,getFollowers
andgetRepostedBy
, allowing for local sorting of the query to resolve with the network response when available.Describe alternatives you've considered
Coming up with a best guess heuristic to approximate network sort keys locally.
Additional context
Similar and related issues:
#1574
#3342
The text was updated successfully, but these errors were encountered: