@timardex/cluemart-shared 1.5.557 → 1.5.558

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3240,14 +3240,22 @@ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = gql29`
3240
3240
  }
3241
3241
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
3242
3242
  `;
3243
+ var MINI_QUIZ_ANSWER_FIELDS_FRAGMENT = gql29`
3244
+ fragment MiniQuizAnswerFields on MiniQuizAnswerType {
3245
+ _id
3246
+ answer
3247
+ correct
3248
+ }
3249
+ `;
3243
3250
  var MINI_QUIZ_QUESTION_FIELDS_FRAGMENT = gql29`
3244
3251
  fragment MiniQuizQuestionFields on MiniQuizQuestionType {
3252
+ _id
3245
3253
  answers {
3246
- answer
3247
- correct
3254
+ ...MiniQuizAnswerFields
3248
3255
  }
3249
3256
  question
3250
3257
  }
3258
+ ${MINI_QUIZ_ANSWER_FIELDS_FRAGMENT}
3251
3259
  `;
3252
3260
  var MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT = gql29`
3253
3261
  fragment MiniQuizBaseGameFields on MiniQuizBaseGameType {
@@ -3636,6 +3644,17 @@ var UPDATE_DAILY_CLUE_MUTATION = gql34`
3636
3644
  }
3637
3645
  ${GAME_DOC_FIELDS_FRAGMENT}
3638
3646
  `;
3647
+ var UPDATE_MINI_QUIZ_MUTATION = gql34`
3648
+ mutation updateMiniQuizGame(
3649
+ $_id: ID!
3650
+ $questions: [MiniQuizQuestionInputType!]!
3651
+ ) {
3652
+ updateMiniQuizGame(_id: $_id, questions: $questions) {
3653
+ ...GameDocFields
3654
+ }
3655
+ }
3656
+ ${GAME_DOC_FIELDS_FRAGMENT}
3657
+ `;
3639
3658
 
3640
3659
  // src/graphql/hooks/game/hooksMutation.ts
3641
3660
  var useStartGame = () => {
@@ -3689,6 +3708,23 @@ var useUpdateDailyClueGame = () => {
3689
3708
  });
3690
3709
  return { error, loading, updateDailyClueGame };
3691
3710
  };
3711
+ var useUpdateMiniQuizGame = () => {
3712
+ const [updateMiniQuizGame, { loading, error }] = useMutation18(UPDATE_MINI_QUIZ_MUTATION, {
3713
+ awaitRefetchQueries: true,
3714
+ refetchQueries: (mutationResult) => {
3715
+ const gameId = mutationResult?.data?.updateMiniQuizGame?._id;
3716
+ if (!gameId) return [];
3717
+ return [
3718
+ {
3719
+ query: GET_GAME,
3720
+ variables: { _id: gameId }
3721
+ // Pass the gameId for refetching
3722
+ }
3723
+ ];
3724
+ }
3725
+ });
3726
+ return { error, loading, updateMiniQuizGame };
3727
+ };
3692
3728
 
3693
3729
  // src/graphql/hooks/game/hooksQuery.ts
3694
3730
  import { useQuery as useQuery13 } from "@apollo/client";
@@ -4023,6 +4059,7 @@ export {
4023
4059
  useStartGame,
4024
4060
  useLeaveGame,
4025
4061
  useUpdateDailyClueGame,
4062
+ useUpdateMiniQuizGame,
4026
4063
  useGetGames,
4027
4064
  useGetGame,
4028
4065
  useGetGameLeaderboard,
@@ -4033,4 +4070,4 @@ export {
4033
4070
  useGetSchools,
4034
4071
  useGetSchool
4035
4072
  };
4036
- //# sourceMappingURL=chunk-EBLNP3KF.mjs.map
4073
+ //# sourceMappingURL=chunk-EQZIARZY.mjs.map