feat(core): add copilot tags and collections graphql apis (#11076)

Close [BS-2834](https://linear.app/affine-design/issue/BS-2834).

### What Changed?
- Add `addContextCategoryMutation` and `removeContextCategoryMutation` graphql apis.
- Provide tag and collection apis for front-end components.
This commit is contained in:
akumatus
2025-03-22 15:15:42 +00:00
parent 1f0fc9d47a
commit 331dd67e69
17 changed files with 498 additions and 128 deletions

View File

@@ -22,18 +22,22 @@ query listContextObject(
createdAt
}
tags {
type
id
docs {
id
status
createdAt
}
createdAt
}
collections {
type
id
docs {
id
status
createdAt
}
createdAt
}

View File

@@ -255,18 +255,22 @@ export const listContextObjectQuery = {
createdAt
}
tags {
type
id
docs {
id
status
createdAt
}
createdAt
}
collections {
type
id
docs {
id
status
createdAt
}
createdAt
}

View File

@@ -2593,22 +2593,26 @@ export type ListContextObjectQuery = {
}>;
tags: Array<{
__typename?: 'CopilotContextCategory';
type: ContextCategories;
id: string;
createdAt: number;
docs: Array<{
__typename?: 'CopilotDocType';
id: string;
status: ContextEmbedStatus | null;
createdAt: number;
}>;
}>;
collections: Array<{
__typename?: 'CopilotContextCategory';
type: ContextCategories;
id: string;
createdAt: number;
docs: Array<{
__typename?: 'CopilotDocType';
id: string;
status: ContextEmbedStatus | null;
createdAt: number;
}>;
}>;
}>;