fix(admin): user count is out of sync and search results are not cached in account management (#11980)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Improved user management table with dynamic row count updates and enhanced synchronization of memoized user lists.
- **Bug Fixes**
  - User count and displayed data now update immediately after user creation, deletion, or import, ensuring accurate and consistent information.
- **Chores**
  - Enhanced internal state management for better responsiveness and reliability in the accounts section.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
JimmFly
2025-05-22 07:29:08 +00:00
parent 2999497f16
commit 940ab69374
9 changed files with 42 additions and 40 deletions

View File

@@ -2811,10 +2811,6 @@ export type GetUserByEmailQuery = {
} | null;
};
export type GetUsersCountQueryVariables = Exact<{ [key: string]: never }>;
export type GetUsersCountQuery = { __typename?: 'Query'; usersCount: number };
export type ImportUsersMutationVariables = Exact<{
input: ImportUsersInput;
}>;
@@ -2833,6 +2829,7 @@ export type ListUsersQueryVariables = Exact<{
export type ListUsersQuery = {
__typename?: 'Query';
usersCount: number;
users: Array<{
__typename?: 'UserType';
id: string;
@@ -4969,11 +4966,6 @@ export type Queries =
variables: GetUserByEmailQueryVariables;
response: GetUserByEmailQuery;
}
| {
name: 'getUsersCountQuery';
variables: GetUsersCountQueryVariables;
response: GetUsersCountQuery;
}
| {
name: 'listUsersQuery';
variables: ListUsersQueryVariables;