@timardex/cluemart-shared 2.2.12 → 2.2.13

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
@@ -5736,14 +5736,22 @@ var UPDATE_EVENT_INFO_MUTATION = gql18`
5736
5736
  // src/graphql/hooks/event/hooksMutation.ts
5737
5737
  var useCreateEvent = () => {
5738
5738
  const [createEvent, { loading, error }] = useMutation5(CREATE_EVENT_MUTATION, {
5739
+ // The mutation response is a live-only view of EventType. Don't write it
5740
+ // into the normalized EventType cache, where it would overwrite the full
5741
+ // (live + archived) `dateTime` that `getEvent` fetches for the detail page.
5739
5742
  awaitRefetchQueries: true,
5743
+ fetchPolicy: "no-cache",
5740
5744
  refetchQueries: [{ query: GET_USER_EVENTS }]
5741
5745
  });
5742
5746
  return { createEvent, error, loading };
5743
5747
  };
5744
5748
  var useUpdateEvent = () => {
5745
5749
  const [updateEvent, { loading, error }] = useMutation5(UPDATE_EVENT_MUTATION, {
5750
+ // See useCreateEvent: the update response only carries the live schedule,
5751
+ // so keep it out of the normalized EventType cache to avoid clobbering the
5752
+ // archived dates merged by `getEvent`.
5746
5753
  awaitRefetchQueries: true,
5754
+ fetchPolicy: "no-cache",
5747
5755
  refetchQueries: (mutationResult) => {
5748
5756
  const eventId = mutationResult?.data?.updateEvent?.data?._id;
5749
5757
  if (!eventId) return [];