@timardex/cluemart-shared 1.5.586 → 1.5.587
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/{chunk-YGKLLYKV.mjs → chunk-P52HS2NB.mjs} +15 -2
- package/dist/chunk-P52HS2NB.mjs.map +1 -0
- package/dist/graphql/index.cjs +14 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +9 -1
- package/dist/graphql/index.d.ts +9 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-YGKLLYKV.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1630,7 +1630,15 @@ declare const useCreateEvent: () => {
|
|
|
1630
1630
|
declare const useUpdateEvent: () => {
|
|
1631
1631
|
error: _apollo_client.ApolloError | undefined;
|
|
1632
1632
|
loading: boolean;
|
|
1633
|
-
updateEvent: (options?: _apollo_client.MutationFunctionOptions<
|
|
1633
|
+
updateEvent: (options?: _apollo_client.MutationFunctionOptions<{
|
|
1634
|
+
updateEvent: {
|
|
1635
|
+
_id: string;
|
|
1636
|
+
};
|
|
1637
|
+
}, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
|
|
1638
|
+
updateEvent: {
|
|
1639
|
+
_id: string;
|
|
1640
|
+
};
|
|
1641
|
+
}>>;
|
|
1634
1642
|
};
|
|
1635
1643
|
declare const useDeleteEvent: () => {
|
|
1636
1644
|
deleteEvent: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1630,7 +1630,15 @@ declare const useCreateEvent: () => {
|
|
|
1630
1630
|
declare const useUpdateEvent: () => {
|
|
1631
1631
|
error: _apollo_client.ApolloError | undefined;
|
|
1632
1632
|
loading: boolean;
|
|
1633
|
-
updateEvent: (options?: _apollo_client.MutationFunctionOptions<
|
|
1633
|
+
updateEvent: (options?: _apollo_client.MutationFunctionOptions<{
|
|
1634
|
+
updateEvent: {
|
|
1635
|
+
_id: string;
|
|
1636
|
+
};
|
|
1637
|
+
}, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
|
|
1638
|
+
updateEvent: {
|
|
1639
|
+
_id: string;
|
|
1640
|
+
};
|
|
1641
|
+
}>>;
|
|
1634
1642
|
};
|
|
1635
1643
|
declare const useDeleteEvent: () => {
|
|
1636
1644
|
deleteEvent: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
package/dist/index.mjs
CHANGED
|
@@ -3916,7 +3916,20 @@ var useCreateEvent = () => {
|
|
|
3916
3916
|
var useUpdateEvent = () => {
|
|
3917
3917
|
const [updateEvent, { loading, error }] = useMutation5(UPDATE_EVENT_MUTATION, {
|
|
3918
3918
|
awaitRefetchQueries: true,
|
|
3919
|
-
refetchQueries:
|
|
3919
|
+
refetchQueries: (mutationResult) => {
|
|
3920
|
+
const eventId = mutationResult?.data?.updateEvent?._id;
|
|
3921
|
+
if (!eventId) return [];
|
|
3922
|
+
return [
|
|
3923
|
+
{
|
|
3924
|
+
query: GET_USER_EVENTS
|
|
3925
|
+
},
|
|
3926
|
+
{
|
|
3927
|
+
query: GET_EVENT,
|
|
3928
|
+
variables: { _id: eventId }
|
|
3929
|
+
// Pass the eventId for refetching
|
|
3930
|
+
}
|
|
3931
|
+
];
|
|
3932
|
+
}
|
|
3920
3933
|
});
|
|
3921
3934
|
return { error, loading, updateEvent };
|
|
3922
3935
|
};
|