mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
chore(server): merge duplicate queries (#10857)
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
query listContextDocsAndFiles($workspaceId: String!, $sessionId: String!, $contextId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
contexts(sessionId: $sessionId, contextId: $contextId) {
|
||||
docs {
|
||||
id
|
||||
status
|
||||
createdAt
|
||||
}
|
||||
files {
|
||||
id
|
||||
name
|
||||
blobId
|
||||
chunkSize
|
||||
error
|
||||
status
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
query listContextFiles(
|
||||
query listContextObject(
|
||||
$workspaceId: String!
|
||||
$sessionId: String!
|
||||
$contextId: String!
|
||||
@@ -8,6 +8,7 @@ query listContextFiles(
|
||||
contexts(sessionId: $sessionId, contextId: $contextId) {
|
||||
docs {
|
||||
id
|
||||
status
|
||||
createdAt
|
||||
}
|
||||
files {
|
||||
@@ -179,32 +179,6 @@ export const addContextFileMutation = {
|
||||
file: true,
|
||||
};
|
||||
|
||||
export const listContextFilesQuery = {
|
||||
id: 'listContextFilesQuery' as const,
|
||||
op: 'listContextFiles',
|
||||
query: `query listContextFiles($workspaceId: String!, $sessionId: String!, $contextId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
contexts(sessionId: $sessionId, contextId: $contextId) {
|
||||
docs {
|
||||
id
|
||||
createdAt
|
||||
}
|
||||
files {
|
||||
id
|
||||
name
|
||||
blobId
|
||||
chunkSize
|
||||
error
|
||||
status
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const matchContextQuery = {
|
||||
id: 'matchContextQuery' as const,
|
||||
op: 'matchContext',
|
||||
@@ -232,10 +206,10 @@ export const removeContextFileMutation = {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const listContextDocsAndFilesQuery = {
|
||||
id: 'listContextDocsAndFilesQuery' as const,
|
||||
op: 'listContextDocsAndFiles',
|
||||
query: `query listContextDocsAndFiles($workspaceId: String!, $sessionId: String!, $contextId: String!) {
|
||||
export const listContextObjectQuery = {
|
||||
id: 'listContextObjectQuery' as const,
|
||||
op: 'listContextObject',
|
||||
query: `query listContextObject($workspaceId: String!, $sessionId: String!, $contextId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
contexts(sessionId: $sessionId, contextId: $contextId) {
|
||||
|
||||
@@ -2363,40 +2363,6 @@ export type AddContextFileMutation = {
|
||||
};
|
||||
};
|
||||
|
||||
export type ListContextFilesQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
sessionId: Scalars['String']['input'];
|
||||
contextId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type ListContextFilesQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
contexts: Array<{
|
||||
__typename?: 'CopilotContext';
|
||||
docs: Array<{
|
||||
__typename?: 'CopilotContextDoc';
|
||||
id: string;
|
||||
createdAt: number;
|
||||
}>;
|
||||
files: Array<{
|
||||
__typename?: 'CopilotContextFile';
|
||||
id: string;
|
||||
name: string;
|
||||
blobId: string;
|
||||
chunkSize: number;
|
||||
error: string | null;
|
||||
status: ContextEmbedStatus;
|
||||
createdAt: number;
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type MatchContextQueryVariables = Exact<{
|
||||
contextId: Scalars['String']['input'];
|
||||
content: Scalars['String']['input'];
|
||||
@@ -2432,13 +2398,13 @@ export type RemoveContextFileMutation = {
|
||||
removeContextFile: boolean;
|
||||
};
|
||||
|
||||
export type ListContextDocsAndFilesQueryVariables = Exact<{
|
||||
export type ListContextObjectQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
sessionId: Scalars['String']['input'];
|
||||
contextId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type ListContextDocsAndFilesQuery = {
|
||||
export type ListContextObjectQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
@@ -4028,20 +3994,15 @@ export type Queries =
|
||||
variables: ListBlobsQueryVariables;
|
||||
response: ListBlobsQuery;
|
||||
}
|
||||
| {
|
||||
name: 'listContextFilesQuery';
|
||||
variables: ListContextFilesQueryVariables;
|
||||
response: ListContextFilesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'matchContextQuery';
|
||||
variables: MatchContextQueryVariables;
|
||||
response: MatchContextQuery;
|
||||
}
|
||||
| {
|
||||
name: 'listContextDocsAndFilesQuery';
|
||||
variables: ListContextDocsAndFilesQueryVariables;
|
||||
response: ListContextDocsAndFilesQuery;
|
||||
name: 'listContextObjectQuery';
|
||||
variables: ListContextObjectQueryVariables;
|
||||
response: ListContextObjectQuery;
|
||||
}
|
||||
| {
|
||||
name: 'listContextQuery';
|
||||
|
||||
Reference in New Issue
Block a user