Compare commits

..

9 Commits

Author SHA1 Message Date
dean
55bbf723ba feat: Add challenge dismissal GQL operations
All checks were successful
Tests / Tests (pull_request) Successful in 10s
- 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-25 14:03:53 -08:00
dean
88650706e0 fix: Restore isFollowedByCurrentUser in UserSocialsFields fragment
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Accidentally reverted to old followers array approach when creating
challenges branch. This restores the fix from PR #1474 that uses
isFollowedByCurrentUser field directly for proper follow state display.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 10:47:55 -08:00
dean
8a393e9a42 feat: Add challenge invitations fields and fix feed hasFollowing query
All checks were successful
Tests / Tests (pull_request) Successful in 10s
- 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-25 10:39:46 -08:00
dean
a00b50d985 chore: Regenerate GraphQL TypeScript types
All checks were successful
Tests / Tests (pull_request) Successful in 9s
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-21 12:31:50 -08:00
dean
36ed501cd9 Add GraphQL queries and mutations for challenge feature
Some checks failed
Tests / Tests (pull_request) Failing after 10s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 12:00:17 -08:00
dean
d17c1a2ecc chore: regenerate schema and types
Some checks failed
Tests / Tests (pull_request) Failing after 10s
2025-11-21 10:19:15 -08:00
dean
cc9bc98b32 merge: sync gql submodule, keeping local notification fragment
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2025-11-20 12:57:23 -08:00
dean
eec12c61a3 schema: add challenge notification types 2025-11-20 12:53:46 -08:00
dean
b7b482694e 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-18 16:12:03 -08:00
5 changed files with 1014 additions and 1051 deletions

View File

@@ -79,12 +79,6 @@ export enum AlignedIntervalEnum {
Year = "YEAR", Year = "YEAR",
} }
export type AuthHandoffTokenGql = {
__typename?: "AuthHandoffTokenGQL";
expiresInSeconds: Scalars["Int"]["output"];
token: Scalars["String"]["output"];
};
export type BankFeaturesGql = { export type BankFeaturesGql = {
__typename?: "BankFeaturesGQL"; __typename?: "BankFeaturesGQL";
bankAngle: Scalars["Float"]["output"]; bankAngle: Scalars["Float"]["output"];
@@ -146,21 +140,6 @@ export type BucketSetInputGql = {
feature: Scalars["String"]["input"]; feature: Scalars["String"]["input"];
}; };
export type CancellationFeedbackMetadataInput = {
appVersion?: InputMaybe<Scalars["String"]["input"]>;
gitRevision?: InputMaybe<Scalars["String"]["input"]>;
platform?: InputMaybe<Scalars["String"]["input"]>;
};
export enum CancellationReasonEnum {
DataNotAccurate = "DATA_NOT_ACCURATE",
DontPlayEnough = "DONT_PLAY_ENOUGH",
MissingFeatures = "MISSING_FEATURES",
Other = "OTHER",
TechnicalIssues = "TECHNICAL_ISSUES",
TooExpensive = "TOO_EXPENSIVE",
}
export type Challenge = { export type Challenge = {
__typename?: "Challenge"; __typename?: "Challenge";
createdAt: Scalars["DateTime"]["output"]; createdAt: Scalars["DateTime"]["output"];
@@ -324,12 +303,6 @@ export type EnumAggregation = {
feature: Scalars["String"]["input"]; feature: Scalars["String"]["input"];
}; };
export type ExchangeAuthHandoffResultGql = {
__typename?: "ExchangeAuthHandoffResultGQL";
customToken: Scalars["String"]["output"];
userId: Scalars["Int"]["output"];
};
export type FilterInput = export type FilterInput =
| { | {
andFilters: Array<FilterInput>; andFilters: Array<FilterInput>;
@@ -2354,7 +2327,6 @@ export type Mutation = {
blockUser: Scalars["Boolean"]["output"]; blockUser: Scalars["Boolean"]["output"];
cancelSubscription: UserSubscriptionStatusGql; cancelSubscription: UserSubscriptionStatusGql;
commentOnVideo: Scalars["Boolean"]["output"]; commentOnVideo: Scalars["Boolean"]["output"];
createAuthHandoffToken: AuthHandoffTokenGql;
createBucketSet: BucketSetGql; createBucketSet: BucketSetGql;
createChallenge: Challenge; createChallenge: Challenge;
createRuleSet: RuleSet; createRuleSet: RuleSet;
@@ -2372,7 +2344,6 @@ export type Mutation = {
editUploadStream: Scalars["Boolean"]["output"]; editUploadStream: Scalars["Boolean"]["output"];
editUser: UserGql; editUser: UserGql;
ensureStripeCustomerExists: UserGql; ensureStripeCustomerExists: UserGql;
exchangeAuthHandoffToken: ExchangeAuthHandoffResultGql;
findPrerecordTableLayout?: Maybe<HomographyInfoGql>; findPrerecordTableLayout?: Maybe<HomographyInfoGql>;
followUser: UserGql; followUser: UserGql;
getHlsInitUploadLink: GetUploadLinkReturn; getHlsInitUploadLink: GetUploadLinkReturn;
@@ -2390,7 +2361,6 @@ export type Mutation = {
setLoggerLevel: Scalars["Boolean"]["output"]; setLoggerLevel: Scalars["Boolean"]["output"];
setSegmentDuration: Scalars["Boolean"]["output"]; setSegmentDuration: Scalars["Boolean"]["output"];
startChallenge: ChallengeEntry; startChallenge: ChallengeEntry;
submitCancellationFeedback: Scalars["Boolean"]["output"];
submitChallengeEntry: ChallengeEntry; submitChallengeEntry: ChallengeEntry;
undismissChallenge: Scalars["Boolean"]["output"]; undismissChallenge: Scalars["Boolean"]["output"];
unfollowUser: UserGql; unfollowUser: UserGql;
@@ -2493,10 +2463,6 @@ export type MutationEditUserArgs = {
input: EditUserInputGql; input: EditUserInputGql;
}; };
export type MutationExchangeAuthHandoffTokenArgs = {
token: Scalars["String"]["input"];
};
export type MutationFindPrerecordTableLayoutArgs = { export type MutationFindPrerecordTableLayoutArgs = {
b64Image: Scalars["String"]["input"]; b64Image: Scalars["String"]["input"];
videoId: Scalars["Int"]["input"]; videoId: Scalars["Int"]["input"];
@@ -2571,12 +2537,6 @@ export type MutationStartChallengeArgs = {
challengeId: Scalars["ID"]["input"]; challengeId: Scalars["ID"]["input"];
}; };
export type MutationSubmitCancellationFeedbackArgs = {
feedback?: InputMaybe<Scalars["String"]["input"]>;
metadata?: InputMaybe<CancellationFeedbackMetadataInput>;
reasons?: InputMaybe<Array<CancellationReasonEnum>>;
};
export type MutationSubmitChallengeEntryArgs = { export type MutationSubmitChallengeEntryArgs = {
entryId: Scalars["ID"]["input"]; entryId: Scalars["ID"]["input"];
videoId: Scalars["ID"]["input"]; videoId: Scalars["ID"]["input"];
@@ -5005,7 +4965,6 @@ export type GetShotsWithMetadataFilterResultQuery = {
} | null; } | null;
playlist?: { playlist?: {
__typename?: "HLSPlaylistGQL"; __typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>; segmentDurations: Array<number>;
} | null; } | null;
} | null; } | null;
@@ -5088,7 +5047,6 @@ export type GetShotsWithMetadataQuery = {
} | null; } | null;
playlist?: { playlist?: {
__typename?: "HLSPlaylistGQL"; __typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>; segmentDurations: Array<number>;
} | null; } | null;
} | null; } | null;
@@ -5160,7 +5118,6 @@ export type GetShotsByIdsQuery = {
} | null; } | null;
playlist?: { playlist?: {
__typename?: "HLSPlaylistGQL"; __typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>; segmentDurations: Array<number>;
} | null; } | null;
} | null; } | null;
@@ -5225,7 +5182,6 @@ export type ShotWithAllFeaturesFragment = {
} | null; } | null;
playlist?: { playlist?: {
__typename?: "HLSPlaylistGQL"; __typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>; segmentDurations: Array<number>;
} | null; } | null;
} | null; } | null;
@@ -5307,7 +5263,6 @@ export type EditShotMutation = {
} | null; } | null;
playlist?: { playlist?: {
__typename?: "HLSPlaylistGQL"; __typename?: "HLSPlaylistGQL";
videoId: number;
segmentDurations: Array<number>; segmentDurations: Array<number>;
} | null; } | null;
} | null; } | null;
@@ -5494,7 +5449,21 @@ export type FollowUserMutationVariables = Exact<{
export type FollowUserMutation = { export type FollowUserMutation = {
__typename?: "Mutation"; __typename?: "Mutation";
followUser: { __typename?: "UserGQL"; id: number; username: string }; 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;
};
}; };
export type UnfollowUserMutationVariables = Exact<{ export type UnfollowUserMutationVariables = Exact<{
@@ -5503,7 +5472,21 @@ export type UnfollowUserMutationVariables = Exact<{
export type UnfollowUserMutation = { export type UnfollowUserMutation = {
__typename?: "Mutation"; __typename?: "Mutation";
unfollowUser: { __typename?: "UserGQL"; id: number; username: string }; 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;
};
}; };
export type GetUserFollowingFollowersQueryVariables = Exact<{ export type GetUserFollowingFollowersQueryVariables = Exact<{
@@ -5520,14 +5503,12 @@ export type GetUserFollowingFollowersQuery = {
id: number; id: number;
username: string; username: string;
profileImageUri?: string | null; profileImageUri?: string | null;
isFollowedByCurrentUser?: boolean | null;
}> | null; }> | null;
followers?: Array<{ followers?: Array<{
__typename?: "UserGQL"; __typename?: "UserGQL";
id: number; id: number;
username: string; username: string;
profileImageUri?: string | null; profileImageUri?: string | null;
isFollowedByCurrentUser?: boolean | null;
}> | null; }> | null;
} | null; } | null;
}; };
@@ -6570,7 +6551,6 @@ export const ShotWithAllFeaturesFragmentDoc = gql`
streamSegmentType streamSegmentType
} }
playlist { playlist {
videoId
segmentDurations segmentDurations
} }
} }
@@ -11300,8 +11280,16 @@ export type GetUserTagsQueryResult = Apollo.QueryResult<
export const FollowUserDocument = gql` export const FollowUserDocument = gql`
mutation followUser($followedUserId: Int!) { mutation followUser($followedUserId: Int!) {
followUser(followedUserId: $followedUserId) { followUser(followedUserId: $followedUserId) {
id
username username
id
following {
id
username
}
followers {
id
username
}
} }
} }
`; `;
@@ -11351,8 +11339,16 @@ export type FollowUserMutationOptions = Apollo.BaseMutationOptions<
export const UnfollowUserDocument = gql` export const UnfollowUserDocument = gql`
mutation unfollowUser($followedUserId: Int!) { mutation unfollowUser($followedUserId: Int!) {
unfollowUser(followedUserId: $followedUserId) { unfollowUser(followedUserId: $followedUserId) {
id
username username
id
following {
id
username
}
followers {
id
username
}
} }
} }
`; `;
@@ -11407,13 +11403,11 @@ export const GetUserFollowingFollowersDocument = gql`
id id
username username
profileImageUri profileImageUri
isFollowedByCurrentUser
} }
followers { followers {
id id
username username
profileImageUri profileImageUri
isFollowedByCurrentUser
} }
} }
} }

View File

@@ -63,17 +63,3 @@ mutation CancelSubscription {
stripeSubscriptionId stripeSubscriptionId
} }
} }
mutation CreateAuthHandoffToken {
createAuthHandoffToken {
token
expiresInSeconds
}
}
mutation ExchangeAuthHandoffToken($token: String!) {
exchangeAuthHandoffToken(token: $token) {
customToken
userId
}
}

View File

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

View File

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

File diff suppressed because it is too large Load Diff