From ddeeb372250409da1f31a0522fb715e552c1f450 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Mon, 25 Mar 2024 21:27:36 +0100 Subject: backend: Report Archive size as float GraphQL integers are 32-bit as per spec [1] [2]. Implementations may therefore error on large numbers. Since an archive's size can reasonably exceed this value, make sure to report it as a float instead. [1] https://graphql.org/learn/schema/ [2] https://github.com/graphql/graphql-js/issues/292#issuecomment-186702763 --- src/hircine/api/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/hircine/api/types.py b/src/hircine/api/types.py index b9fe0e7..bbd13fa 100644 --- a/src/hircine/api/types.py +++ b/src/hircine/api/types.py @@ -81,7 +81,7 @@ class FilterResult(Generic[T]): class Archive(MixinName, MixinOrganized, Base): cover: "Image" path: str - size: int + size: float page_count: int def __init__(self, model): -- cgit v1.2.3-2-gb3c3