@timardex/cluemart-shared 1.5.557 → 1.5.559

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,14 +3399,22 @@ 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 {
@@ -3794,6 +3803,17 @@ var UPDATE_DAILY_CLUE_MUTATION = import_client64.gql`
3794
3803
  }
3795
3804
  ${GAME_DOC_FIELDS_FRAGMENT}
3796
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
+ `;
3797
3817
 
3798
3818
  // src/graphql/hooks/game/hooksMutation.ts
3799
3819
  var useStartGame = () => {
@@ -3847,6 +3867,23 @@ var useUpdateDailyClueGame = () => {
3847
3867
  });
3848
3868
  return { error, loading, updateDailyClueGame };
3849
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
+ };
3850
3887
 
3851
3888
  // src/graphql/hooks/game/hooksQuery.ts
3852
3889
  var import_client66 = require("@apollo/client");
@@ -4180,6 +4217,7 @@ var useGetSchool = (_id) => {
4180
4217
  useUpdateEvent,
4181
4218
  useUpdateEventInfo,
4182
4219
  useUpdateGoogleImportedMarkets,
4220
+ useUpdateMiniQuizGame,
4183
4221
  useUpdatePartner,
4184
4222
  useUpdatePost,
4185
4223
  useUpdateRelation,