feat: use SafeInt replace Float (#5613)

This commit is contained in:
DarkSky
2024-01-17 12:36:21 +00:00
parent b9f20877d0
commit ee8ec47a4f
11 changed files with 40 additions and 18 deletions

View File

@@ -23,13 +23,18 @@ type UserQuotaHumanReadable {
type UserQuota {
name: String!
blobLimit: Float!
storageQuota: Float!
historyPeriod: Float!
blobLimit: SafeInt!
storageQuota: SafeInt!
historyPeriod: SafeInt!
memberLimit: Int!
humanReadable: UserQuotaHumanReadable!
}
"""
The `SafeInt` scalar type represents non-fractional signed whole numeric values that are considered safe as defined by the ECMAScript specification.
"""
scalar SafeInt @specifiedBy(url: "https://www.ecma-international.org/ecma-262/#sec-number.issafeinteger")
type UserType {
id: ID!
@@ -172,7 +177,7 @@ type InvitationWorkspaceType {
}
type WorkspaceBlobSizes {
size: Float!
size: SafeInt!
}
type InvitationType {
@@ -309,7 +314,7 @@ type Query {
"""List blobs of workspace"""
listBlobs(workspaceId: String!): [String!]! @deprecated(reason: "use `workspace.blobs` instead")
collectAllBlobSizes: WorkspaceBlobSizes! @deprecated(reason: "use `user.storageUsage` instead")
checkBlobSize(workspaceId: String!, size: Float!): WorkspaceBlobSizes! @deprecated(reason: "no more needed")
checkBlobSize(workspaceId: String!, size: SafeInt!): WorkspaceBlobSizes! @deprecated(reason: "no more needed")
"""Get current user"""
currentUser: UserType