MCPcopy
hub / github.com/daeuniverse/daed / useRenameConfigMutation

Function useRenameConfigMutation

apps/web/src/apis/mutation.ts:161–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159}
160
161export function useRenameConfigMutation() {
162 const gqlClient = useGQLQueryClient()
163 const queryClient = useQueryClient()
164
165 return useMutation({
166 mutationFn: ({ id, name }: { id: string; name: string }) => {
167 return gqlClient.request(
168 graphql(`
169 mutation RenameConfig($id: ID!, $name: String!) {
170 renameConfig(id: $id, name: $name)
171 }
172 `),
173 {
174 id,
175 name,
176 },
177 )
178 },
179 onSuccess: () => {
180 queryClient.invalidateQueries({ queryKey: QUERY_KEY_CONFIG })
181 },
182 })
183}
184
185export function useCreateRoutingMutation() {
186 const gqlClient = useGQLQueryClient()

Callers 2

RenameFormModalFunction · 0.90
ConfigFunction · 0.90

Calls 3

useGQLQueryClientFunction · 0.90
graphqlFunction · 0.90
requestMethod · 0.80

Tested by

no test coverage detected