Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(auth-config): invalidate lint cache on update to dismiss stale Pe… (#41652)

Aditya kumar singh30fd0087ae1e
diff --git a/apps/studio/data/auth/auth-config-update-mutation.ts b/apps/studio/data/auth/auth-config-update-mutation.ts
index 75f88d4d5e6..b8197fd5e45 100644
--- a/apps/studio/data/auth/auth-config-update-mutation.ts
+++ b/apps/studio/data/auth/auth-config-update-mutation.ts
@@ -3,6 +3,7 @@ import { toast } from 'sonner'
import type { components } from 'data/api'
import { handleError, patch } from 'data/fetchers'
+import { lintKeys } from 'data/lint/keys'
import type { ResponseError, UseCustomMutationOptions } from 'types'
import { authKeys } from './keys'
@@ -41,7 +42,10 @@ export const useAuthConfigUpdateMutation = ({
mutationFn: (vars) => updateAuthConfig(vars),
async onSuccess(data, variables, context) {
const { projectRef } = variables
- await queryClient.invalidateQueries({ queryKey: authKeys.authConfig(projectRef) })
+ await Promise.all([
+ queryClient.invalidateQueries({ queryKey: authKeys.authConfig(projectRef) }),
+ queryClient.invalidateQueries({ queryKey: lintKeys.lint(projectRef) }),
+ ])
await onSuccess?.(data, variables, context)
},
async onError(data, variables, context) {