mirror of
https://github.com/supabase/supabase.git
synced 2026-06-04 11:51:55 +08:00
chore: remove useExecuteSqlQuery() part 2 (#30467)
* foreign-key-constraints * update entity-types stale time * schemas query * deprecate useExecuteSqlQuery * users count query * database size query * indexes query * keywords query * migrations query * table columns * database functions * database roles query * fdws query * replication lag query * ongoing queries query * vault secrets query * remove unneeded staleTime: 0 * max connections query * fix entity types key in tests * Some fixes --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
This commit is contained in:
@@ -3,8 +3,8 @@ import { toast } from 'sonner'
|
||||
import { z } from 'zod'
|
||||
|
||||
import pgMeta from '@supabase/pg-meta'
|
||||
import { databaseKeys } from 'data/database/keys'
|
||||
import { executeSql } from 'data/sql/execute-sql-query'
|
||||
import { sqlKeys } from 'data/sql/keys'
|
||||
import type { ResponseError } from 'types'
|
||||
|
||||
export type DatabaseFunctionCreateVariables = {
|
||||
@@ -47,7 +47,7 @@ export const useDatabaseFunctionCreateMutation = ({
|
||||
{
|
||||
async onSuccess(data, variables, context) {
|
||||
const { projectRef } = variables
|
||||
await queryClient.invalidateQueries(sqlKeys.query(projectRef, ['functions-list']))
|
||||
await queryClient.invalidateQueries(databaseKeys.databaseFunctions(projectRef))
|
||||
await onSuccess?.(data, variables, context)
|
||||
},
|
||||
async onError(data, variables, context) {
|
||||
|
||||
Reference in New Issue
Block a user