(queryClient: QueryClient)
| 32 | import { cachedQuery } from "./util"; |
| 33 | |
| 34 | export const createOrganization = (queryClient: QueryClient) => { |
| 35 | return { |
| 36 | mutationFn: (params: CreateOrganizationRequest) => |
| 37 | API.createOrganization(params), |
| 38 | |
| 39 | onSuccess: async () => { |
| 40 | await queryClient.invalidateQueries({ queryKey: meKey }); |
| 41 | await queryClient.invalidateQueries({ queryKey: organizationsKey }); |
| 42 | }, |
| 43 | }; |
| 44 | }; |
| 45 | |
| 46 | interface UpdateOrganizationVariables { |
| 47 | organizationId: string; |
no test coverage detected