Repository navigation
Add includeDetails option to recent user activity endpoint - #1290
Closed
CollinBeczak wants to merge 3 commits into
Closed
CollinBeczak wants to merge 3 commits into
CollinBeczak wants to merge 3 commits into
Conversation
GET /data/user/activity returns bare action rows (osmUserId, itemId, parentId), so the activity feeds have relied on GraphQL's recentActions query to resolve each entry's user, task and challenge. Before GraphQL can be dropped, REST needs to serve the same data. With includeDetails=true, each entry also carries: - user: id plus osmProfile (id, displayName, avatarURL) - task: id and location, for task actions - challenge: id, name and general.parent (id, name, displayName) Related records are loaded in four batched queries per page (users by OSM id, tasks, challenges, projects), the same service calls the GraphQL fetchers made. With the flag set, created is serialized as an ISO string to match what GraphQL returned and what the frontends parse. The flag defaults to false, so existing callers are unaffected.
Contributor
|
Thanks, but this isn't actually necessary; I'm planning to deprecate and remove this endpoint along with the GraphQL endpoint. Its only purpose right now is to power a global activity feed that I think should be removed from the app to reduce the user data that the app exposes. |
Contributor
Author
|
Sounds good, lemme know if there are more endpoints i should keep in mind |
|
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




GET /data/user/activity returns bare action rows (osmUserId, itemId, parentId), so the activity feeds have relied on GraphQL's recentActions query to resolve each entry's user, task and challenge. Before GraphQL can be dropped, REST needs to serve the same data.
With includeDetails=true, each entry also carries:
Related records are loaded in four batched queries per page (users by OSM id, tasks, challenges, projects), the same service calls the GraphQL fetchers made. With the flag set, created is serialized as an ISO string to match what GraphQL returned and what the frontends parse.
The flag defaults to false, so existing callers are unaffected.