feat(core): migration for created by and updated by fields (#12171)

This commit is contained in:
EYHN
2025-05-08 19:34:21 +08:00
committed by GitHub
parent 11dfc1d1df
commit 7c8b977bf9
13 changed files with 458 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
query getDocCreatedByUpdatedByList($workspaceId: String!, $pagination: PaginationInput!) {
workspace(id: $workspaceId) {
docs(pagination: $pagination) {
totalCount
pageInfo {
endCursor
hasNextPage
}
edges {
node {
id
creatorId
lastUpdaterId
}
}
}
}
}

View File

@@ -981,6 +981,29 @@ export const getCurrentUserQuery = {
deprecations: ["'token' is deprecated: use [/api/auth/sign-in?native=true] instead"],
};
export const getDocCreatedByUpdatedByListQuery = {
id: 'getDocCreatedByUpdatedByListQuery' as const,
op: 'getDocCreatedByUpdatedByList',
query: `query getDocCreatedByUpdatedByList($workspaceId: String!, $pagination: PaginationInput!) {
workspace(id: $workspaceId) {
docs(pagination: $pagination) {
totalCount
pageInfo {
endCursor
hasNextPage
}
edges {
node {
id
creatorId
lastUpdaterId
}
}
}
}
}`,
};
export const getDocDefaultRoleQuery = {
id: 'getDocDefaultRoleQuery' as const,
op: 'getDocDefaultRole',

View File

@@ -3603,6 +3603,36 @@ export type GetCurrentUserQuery = {
} | null;
};
export type GetDocCreatedByUpdatedByListQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
pagination: PaginationInput;
}>;
export type GetDocCreatedByUpdatedByListQuery = {
__typename?: 'Query';
workspace: {
__typename?: 'WorkspaceType';
docs: {
__typename?: 'PaginatedDocType';
totalCount: number;
pageInfo: {
__typename?: 'PageInfo';
endCursor: string | null;
hasNextPage: boolean;
};
edges: Array<{
__typename?: 'DocTypeEdge';
node: {
__typename?: 'DocType';
id: string;
creatorId: string | null;
lastUpdaterId: string | null;
};
}>;
};
};
};
export type GetDocDefaultRoleQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
docId: Scalars['String']['input'];
@@ -4736,6 +4766,11 @@ export type Queries =
variables: GetCurrentUserQueryVariables;
response: GetCurrentUserQuery;
}
| {
name: 'getDocCreatedByUpdatedByListQuery';
variables: GetDocCreatedByUpdatedByListQueryVariables;
response: GetDocCreatedByUpdatedByListQuery;
}
| {
name: 'getDocDefaultRoleQuery';
variables: GetDocDefaultRoleQueryVariables;