Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(refetch-interval): enhance refetch interval handling by incorporating options

Victor Hugo dos Santosbbfa783a8bd9
diff --git a/frontend/src/hooks/api/secretApprovalRequest/queries.tsx b/frontend/src/hooks/api/secretApprovalRequest/queries.tsx
index 857b0e0213..4c8d77371b 100644
--- a/frontend/src/hooks/api/secretApprovalRequest/queries.tsx
+++ b/frontend/src/hooks/api/secretApprovalRequest/queries.tsx
@@ -155,7 +155,8 @@ export const useGetSecretApprovalRequestCount = ({
}) =>
useQuery({
queryKey: secretApprovalRequestKeys.count({ projectId, policyId }),
- refetchInterval: 30_000,
queryFn: () => fetchSecretApprovalRequestCount({ projectId, policyId }),
- enabled: Boolean(projectId) && (options?.enabled ?? true)
+ enabled: Boolean(projectId) && (options?.enabled ?? true),
+ ...options,
+ refetchInterval: options?.refetchInterval ?? 30_000
});