All checks were successful
Tests / Tests (pull_request) Successful in 9s
Updated GraphQL operations to support efficient follow status checking: - Added isFollowedByCurrentUser field to UserSocialsFields fragment - Removed nested followers array from UserSocialsFields (over-fetching) - Simplified followUser/unfollowUser mutations to return minimal data - Added hasFollowing field to GetVideoFeed query for feed mode detection - Updated getUserFollowingFollowers query to include isFollowedByCurrentUser These changes enable the mobile app to: - Display correct follow/unfollow button states without client-side lookups - Differentiate between "Following" and "Popular" feed modes - Reduce payload size by removing unnecessary nested data Backend handles efficient resolution via request-scoped caching. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
118 lines
1.7 KiB
GraphQL
118 lines
1.7 KiB
GraphQL
# DO NOT USE: use getVideoFeed instead
|
|
query GetFeed(
|
|
$limit: Int! = 5
|
|
$after: String = null
|
|
$filters: VideoFilterInput = null
|
|
) {
|
|
getUserVideos(limit: $limit, after: $after, filters: $filters) {
|
|
videos {
|
|
...VideoCardFields
|
|
}
|
|
pageInfo {
|
|
hasNextPage
|
|
endCursor
|
|
}
|
|
}
|
|
}
|
|
|
|
fragment UserSocialsFields on UserGQL {
|
|
id
|
|
username
|
|
profileImageUri
|
|
isFollowedByCurrentUser
|
|
}
|
|
|
|
fragment VideoCardFields on VideoGQL {
|
|
id
|
|
owner {
|
|
id
|
|
username
|
|
profileImageUri
|
|
}
|
|
name
|
|
screenshotUri
|
|
totalShotsMade
|
|
totalShots
|
|
makePercentage
|
|
averageTimeBetweenShots
|
|
averageDifficulty
|
|
createdAt
|
|
updatedAt
|
|
startTime
|
|
endTime
|
|
private
|
|
elapsedTime
|
|
screenshotUri
|
|
stream {
|
|
id
|
|
lastIntendedSegmentBound
|
|
isCompleted
|
|
streamSegmentType
|
|
}
|
|
tableSize
|
|
tags {
|
|
tagClasses {
|
|
name
|
|
}
|
|
name
|
|
}
|
|
currentProcessing {
|
|
id
|
|
errors {
|
|
message
|
|
}
|
|
status
|
|
statuses {
|
|
status
|
|
}
|
|
}
|
|
reactions {
|
|
videoId
|
|
user {
|
|
...UserSocialsFields
|
|
}
|
|
reaction
|
|
}
|
|
comments {
|
|
id
|
|
message
|
|
user {
|
|
...UserSocialsFields
|
|
}
|
|
replies {
|
|
id
|
|
message
|
|
user {
|
|
...UserSocialsFields
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
query GetVideoFeed(
|
|
$limit: Int! = 5
|
|
$after: String = null
|
|
$filters: VideoFilterInput = null
|
|
$includeCallersVideos: Boolean = null
|
|
$includePrivate: IncludePrivateEnum = MINE
|
|
$feedInput: VideoFeedInputGQL = null
|
|
) {
|
|
getFeedVideos(
|
|
limit: $limit
|
|
after: $after
|
|
filters: $filters
|
|
includeCallersVideos: $includeCallersVideos
|
|
includePrivate: $includePrivate
|
|
feedInput: $feedInput
|
|
) {
|
|
videos {
|
|
...VideoCardFields
|
|
}
|
|
pageInfo {
|
|
hasNextPage
|
|
endCursor
|
|
}
|
|
hasFollowing
|
|
}
|
|
}
|