@timardex/cluemart-shared 1.1.6 → 1.1.7

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.
package/dist/index.mjs CHANGED
@@ -2816,18 +2816,44 @@ var useCreateBulkNotifications = () => {
2816
2816
  };
2817
2817
  var useMarkNotificationRead = () => {
2818
2818
  const [markNotificationRead, { loading, error }] = useMutation6(
2819
- MARK_NOTIFICATION_READ
2819
+ MARK_NOTIFICATION_READ,
2820
+ {
2821
+ awaitRefetchQueries: true,
2822
+ fetchPolicy: "no-cache",
2823
+ refetchQueries: [
2824
+ { query: GET_USER_NOTIFICATIONS },
2825
+ { query: GET_NOTIFICATION_COUNT }
2826
+ ]
2827
+ }
2820
2828
  );
2821
2829
  return { error, loading, markNotificationRead };
2822
2830
  };
2823
2831
  var useMarkAllNotificationsRead = () => {
2824
2832
  const [markAllNotificationsRead, { loading, error }] = useMutation6(
2825
- MARK_ALL_NOTIFICATIONS_READ
2833
+ MARK_ALL_NOTIFICATIONS_READ,
2834
+ {
2835
+ awaitRefetchQueries: true,
2836
+ fetchPolicy: "no-cache",
2837
+ refetchQueries: [
2838
+ { query: GET_USER_NOTIFICATIONS },
2839
+ { query: GET_NOTIFICATION_COUNT }
2840
+ ]
2841
+ }
2826
2842
  );
2827
2843
  return { error, loading, markAllNotificationsRead };
2828
2844
  };
2829
2845
  var useDeleteNotification = () => {
2830
- const [deleteNotification, { loading, error }] = useMutation6(DELETE_NOTIFICATION);
2846
+ const [deleteNotification, { loading, error }] = useMutation6(
2847
+ DELETE_NOTIFICATION,
2848
+ {
2849
+ awaitRefetchQueries: true,
2850
+ fetchPolicy: "no-cache",
2851
+ refetchQueries: [
2852
+ { query: GET_USER_NOTIFICATIONS },
2853
+ { query: GET_NOTIFICATION_COUNT }
2854
+ ]
2855
+ }
2856
+ );
2831
2857
  return { deleteNotification, error, loading };
2832
2858
  };
2833
2859