@timardex/cluemart-shared 1.5.556 → 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.
@@ -143,6 +143,7 @@ __export(graphql_exports, {
143
143
  useUpdateEvent: () => useUpdateEvent,
144
144
  useUpdateEventInfo: () => useUpdateEventInfo,
145
145
  useUpdateGoogleImportedMarkets: () => useUpdateGoogleImportedMarkets,
146
+ useUpdateMiniQuizGame: () => useUpdateMiniQuizGame,
146
147
  useUpdatePartner: () => useUpdatePartner,
147
148
  useUpdatePost: () => useUpdatePost,
148
149
  useUpdateRelation: () => useUpdateRelation,
@@ -3398,25 +3399,29 @@ var DAILY_CLUE_GAME_DATA_FIELDS_FRAGMENT = import_client55.gql`
3398
3399
  }
3399
3400
  ${DAILY_CLUE_BASE_GAME_FIELDS_FRAGMENT}
3400
3401
  `;
3402
+ var MINI_QUIZ_ANSWER_FIELDS_FRAGMENT = import_client55.gql`
3403
+ fragment MiniQuizAnswerFields on MiniQuizAnswerType {
3404
+ _id
3405
+ answer
3406
+ correct
3407
+ }
3408
+ `;
3401
3409
  var MINI_QUIZ_QUESTION_FIELDS_FRAGMENT = import_client55.gql`
3402
3410
  fragment MiniQuizQuestionFields on MiniQuizQuestionType {
3411
+ _id
3403
3412
  answers {
3404
- answer
3405
- correct
3413
+ ...MiniQuizAnswerFields
3406
3414
  }
3407
3415
  question
3408
3416
  }
3417
+ ${MINI_QUIZ_ANSWER_FIELDS_FRAGMENT}
3409
3418
  `;
3410
3419
  var MINI_QUIZ_BASE_GAME_FIELDS_FRAGMENT = import_client55.gql`
3411
3420
  fragment MiniQuizBaseGameFields on MiniQuizBaseGameType {
3412
- gameDate {
3413
- ...GameDateFields
3414
- }
3415
3421
  questions {
3416
3422
  ...MiniQuizQuestionFields
3417
3423
  }
3418
3424
  }
3419
- ${GAME_DATE_FIELDS_FRAGMENT}
3420
3425
  ${MINI_QUIZ_QUESTION_FIELDS_FRAGMENT}
3421
3426
  `;
3422
3427
  var MINI_QUIZ_GAME_DATA_FIELDS_FRAGMENT = import_client55.gql`
@@ -3798,6 +3803,17 @@ var UPDATE_DAILY_CLUE_MUTATION = import_client64.gql`
3798
3803
  }
3799
3804
  ${GAME_DOC_FIELDS_FRAGMENT}
3800
3805
  `;
3806
+ var UPDATE_MINI_QUIZ_MUTATION = import_client64.gql`
3807
+ mutation updateMiniQuizGame(
3808
+ $_id: ID!
3809
+ $questions: [MiniQuizQuestionInputType!]!
3810
+ ) {
3811
+ updateMiniQuizGame(_id: $_id, questions: $questions) {
3812
+ ...GameDocFields
3813
+ }
3814
+ }
3815
+ ${GAME_DOC_FIELDS_FRAGMENT}
3816
+ `;
3801
3817
 
3802
3818
  // src/graphql/hooks/game/hooksMutation.ts
3803
3819
  var useStartGame = () => {
@@ -3851,6 +3867,23 @@ var useUpdateDailyClueGame = () => {
3851
3867
  });
3852
3868
  return { error, loading, updateDailyClueGame };
3853
3869
  };
3870
+ var useUpdateMiniQuizGame = () => {
3871
+ const [updateMiniQuizGame, { loading, error }] = (0, import_client65.useMutation)(UPDATE_MINI_QUIZ_MUTATION, {
3872
+ awaitRefetchQueries: true,
3873
+ refetchQueries: (mutationResult) => {
3874
+ const gameId = mutationResult?.data?.updateMiniQuizGame?._id;
3875
+ if (!gameId) return [];
3876
+ return [
3877
+ {
3878
+ query: GET_GAME,
3879
+ variables: { _id: gameId }
3880
+ // Pass the gameId for refetching
3881
+ }
3882
+ ];
3883
+ }
3884
+ });
3885
+ return { error, loading, updateMiniQuizGame };
3886
+ };
3854
3887
 
3855
3888
  // src/graphql/hooks/game/hooksQuery.ts
3856
3889
  var import_client66 = require("@apollo/client");
@@ -4184,6 +4217,7 @@ var useGetSchool = (_id) => {
4184
4217
  useUpdateEvent,
4185
4218
  useUpdateEventInfo,
4186
4219
  useUpdateGoogleImportedMarkets,
4220
+ useUpdateMiniQuizGame,
4187
4221
  useUpdatePartner,
4188
4222
  useUpdatePost,
4189
4223
  useUpdateRelation,