mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix(nbstore): update workspace blob quota query (#12191)
Change the query for querying quota of Cloud Blob Storage. The original query used new fields, which caused errors in the old version of the server. This PR uses a simpler query to ensure compatibility. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to retrieve a workspace's blob storage quota, including both the raw limit and a human-readable format, via a new query. - **Bug Fixes** - Updated quota retrieval to use the new blob-specific quota query for improved accuracy. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1701,6 +1701,21 @@ export const verifyEmailMutation = {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const workspaceBlobQuotaQuery = {
|
||||
id: 'workspaceBlobQuotaQuery' as const,
|
||||
op: 'workspaceBlobQuota',
|
||||
query: `query workspaceBlobQuota($id: String!) {
|
||||
workspace(id: $id) {
|
||||
quota {
|
||||
blobLimit
|
||||
humanReadable {
|
||||
blobLimit
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getWorkspaceConfigQuery = {
|
||||
id: 'getWorkspaceConfigQuery' as const,
|
||||
op: 'getWorkspaceConfig',
|
||||
|
||||
10
packages/common/graphql/src/graphql/workspace-blob-quota.gql
Normal file
10
packages/common/graphql/src/graphql/workspace-blob-quota.gql
Normal file
@@ -0,0 +1,10 @@
|
||||
query workspaceBlobQuota($id: String!) {
|
||||
workspace(id: $id) {
|
||||
quota {
|
||||
blobLimit
|
||||
humanReadable {
|
||||
blobLimit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4387,6 +4387,25 @@ export type VerifyEmailMutation = {
|
||||
verifyEmail: boolean;
|
||||
};
|
||||
|
||||
export type WorkspaceBlobQuotaQueryVariables = Exact<{
|
||||
id: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type WorkspaceBlobQuotaQuery = {
|
||||
__typename?: 'Query';
|
||||
workspace: {
|
||||
__typename?: 'WorkspaceType';
|
||||
quota: {
|
||||
__typename?: 'WorkspaceQuotaType';
|
||||
blobLimit: number;
|
||||
humanReadable: {
|
||||
__typename?: 'WorkspaceQuotaHumanReadableType';
|
||||
blobLimit: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type GetWorkspaceConfigQueryVariables = Exact<{
|
||||
id: Scalars['String']['input'];
|
||||
}>;
|
||||
@@ -4867,6 +4886,11 @@ export type Queries =
|
||||
variables: SubscriptionQueryVariables;
|
||||
response: SubscriptionQuery;
|
||||
}
|
||||
| {
|
||||
name: 'workspaceBlobQuotaQuery';
|
||||
variables: WorkspaceBlobQuotaQueryVariables;
|
||||
response: WorkspaceBlobQuotaQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getWorkspaceConfigQuery';
|
||||
variables: GetWorkspaceConfigQueryVariables;
|
||||
|
||||
Reference in New Issue
Block a user