Compare commits

..

17 Commits

Author SHA1 Message Date
dean
fda8e4eb9d feat: Add challenge dismissal GQL operations
All checks were successful
Tests / Tests (pull_request) Successful in 9s
- Add DismissChallenge/UndismissChallenge mutations
- Add IsChallengeDismissed query
- Add GetMyDismissedChallenges query
- Update schema with dismissal fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 08:23:27 -08:00
dean
338c45d59b feat: Add challenge invitations fields and fix feed hasFollowing query
- Add invitations query fields with invitee data to GetChallenge
- Add participantCount field to GetChallenge
- Add GetMyChallengeEntries query (was missing)
- Add hasFollowing to GetVideoFeed response (fixes feed ordering)
- Sync schema with backend challenge types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 08:22:50 -08:00
dean
e879c5008f chore: Regenerate GraphQL TypeScript types
Regenerate gql/src/index.tsx to match current schema and fix
codegen hash mismatch in CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 08:22:50 -08:00
dean
2d67e076f7 Add GraphQL queries and mutations for challenge feature
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 08:22:49 -08:00
dean
ec534769f3 chore: regenerate schema and types 2025-11-28 08:22:49 -08:00
dean
f8e8c7b7d4 merge: sync gql submodule, keeping local notification fragment 2025-11-28 08:22:49 -08:00
dean
372fd6e26b schema: add challenge notification types 2025-11-28 08:22:49 -08:00
dean
d9ef5ed79a WIP: Add challenges feature schema and operations
- Add Challenge, ChallengeEntry, ChallengeInvitation, RuleSet types
- Add queries: challenges, challenge, challengeLeaderboard, myChallengeInvitations, myChallengeEntries, ruleSets
- Add mutations: createChallenge, createRuleSet, inviteUsersToChallenge, respondToChallengeInvitation, startChallenge, submitChallengeEntry, recalculateChallengeEntry

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 08:22:49 -08:00
f14e117416 Merge pull request 'Add videoId field to playlist in ShotWithAllFeatures fragment' (#210) from loewy/add-video-id-to-playlist-shots-fragment into master
Reviewed-on: #210
2025-11-12 22:16:58 +00:00
3d86c13291 add videoId field to playlist in shot w features fragment
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-11-12 14:08:49 -08:00
e63f8600aa Merge pull request 'Add pocket size field to GraphQL schema and operations' (#209) from dean/add-pocket-size-clean into master
Reviewed-on: #209
2025-11-11 21:09:28 +00:00
7e822446da Merge branch 'master' into dean/add-pocket-size-clean
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2025-11-11 20:34:55 +00:00
75ecc5894b Merge pull request 'dean/add-home-feed-option' (#208) from dean/add-home-feed-option into master
Reviewed-on: #208
2025-11-10 22:09:09 +00:00
73c8dd5f57 Merge branch 'master' into dean/add-home-feed-option
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-11-10 19:55:16 +00:00
dean
e4223a1a17 Add isFollowedByCurrentUser field and hasFollowing to feed query
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>
2025-11-09 23:44:39 -08:00
dean
83b7f0d0f6 Add home feed and isFollowedByCurrentUser field
- Add home option to VideoFeedInputGQL for automatic feed selection
- Add hasFollowing field to VideoHistoryGQL response
- Add isFollowedByCurrentUser field to UserGQL to replace followers N+1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 09:15:39 -08:00
dean
a882f98d91 Add home option to VideoFeedInputGQL
The home feed option enables smart feed selection on the backend:
- If user has following: returns FOLLOWING feed
- If user has no following: returns ALL feed
- Always includes hasFollowing flag so frontend knows which feed it got

This allows frontend to make a single query instead of needing to
check following status separately.
2025-11-07 12:16:01 -08:00
3 changed files with 19 additions and 66 deletions

View File

@@ -4965,6 +4965,7 @@ export type GetShotsWithMetadataFilterResultQuery = {
} | null;
playlist?: {
__typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>;
} | null;
} | null;
@@ -5047,6 +5048,7 @@ export type GetShotsWithMetadataQuery = {
} | null;
playlist?: {
__typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>;
} | null;
} | null;
@@ -5118,6 +5120,7 @@ export type GetShotsByIdsQuery = {
} | null;
playlist?: {
__typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>;
} | null;
} | null;
@@ -5182,6 +5185,7 @@ export type ShotWithAllFeaturesFragment = {
} | null;
playlist?: {
__typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>;
} | null;
} | null;
@@ -5263,6 +5267,7 @@ export type EditShotMutation = {
} | null;
playlist?: {
__typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>;
} | null;
} | null;
@@ -5449,21 +5454,7 @@ export type FollowUserMutationVariables = Exact<{
export type FollowUserMutation = {
__typename?: "Mutation";
followUser: {
__typename?: "UserGQL";
username: string;
id: number;
following?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
}> | null;
followers?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
}> | null;
};
followUser: { __typename?: "UserGQL"; id: number; username: string };
};
export type UnfollowUserMutationVariables = Exact<{
@@ -5472,21 +5463,7 @@ export type UnfollowUserMutationVariables = Exact<{
export type UnfollowUserMutation = {
__typename?: "Mutation";
unfollowUser: {
__typename?: "UserGQL";
username: string;
id: number;
following?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
}> | null;
followers?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
}> | null;
};
unfollowUser: { __typename?: "UserGQL"; id: number; username: string };
};
export type GetUserFollowingFollowersQueryVariables = Exact<{
@@ -5503,12 +5480,14 @@ export type GetUserFollowingFollowersQuery = {
id: number;
username: string;
profileImageUri?: string | null;
isFollowedByCurrentUser?: boolean | null;
}> | null;
followers?: Array<{
__typename?: "UserGQL";
id: number;
username: string;
profileImageUri?: string | null;
isFollowedByCurrentUser?: boolean | null;
}> | null;
} | null;
};
@@ -6551,6 +6530,7 @@ export const ShotWithAllFeaturesFragmentDoc = gql`
streamSegmentType
}
playlist {
videoId
segmentDurations
}
}
@@ -11280,16 +11260,8 @@ export type GetUserTagsQueryResult = Apollo.QueryResult<
export const FollowUserDocument = gql`
mutation followUser($followedUserId: Int!) {
followUser(followedUserId: $followedUserId) {
username
id
following {
id
username
}
followers {
id
username
}
username
}
}
`;
@@ -11339,16 +11311,8 @@ export type FollowUserMutationOptions = Apollo.BaseMutationOptions<
export const UnfollowUserDocument = gql`
mutation unfollowUser($followedUserId: Int!) {
unfollowUser(followedUserId: $followedUserId) {
username
id
following {
id
username
}
followers {
id
username
}
username
}
}
`;
@@ -11403,11 +11367,13 @@ export const GetUserFollowingFollowersDocument = gql`
id
username
profileImageUri
isFollowedByCurrentUser
}
followers {
id
username
profileImageUri
isFollowedByCurrentUser
}
}
}

View File

@@ -192,6 +192,7 @@ fragment ShotWithAllFeatures on ShotGQL {
streamSegmentType
}
playlist {
videoId
segmentDurations
}
}

View File

@@ -88,31 +88,15 @@ query GetUserTags {
mutation followUser($followedUserId: Int!) {
followUser(followedUserId: $followedUserId) {
username
id
following {
id
username
}
followers {
id
username
}
username
}
}
mutation unfollowUser($followedUserId: Int!) {
unfollowUser(followedUserId: $followedUserId) {
username
id
following {
id
username
}
followers {
id
username
}
username
}
}
@@ -123,11 +107,13 @@ query getUserFollowingFollowers {
id
username
profileImageUri
isFollowedByCurrentUser
}
followers {
id
username
profileImageUri
isFollowedByCurrentUser
}
}
}