overture-stack / arranger

Data portal API and component generation
https://www.overture.bio/documentation/arranger/
GNU Affero General Public License v3.0
28 stars 24 forks source link

BUG - File sizes larger than the max 32 bit allocation cause a GraphQL error #796

Open justincorrigible opened 2 years ago

justincorrigible commented 2 years ago

file_size gives the error Int cannot represent non 32-bit signed integer value: 5326545745 when dealing with files larger than the non-signed 32 bit value (4294967296). This is due to a GraphQL design choice not to support long or bigInt.

image

This issue was encountered and "solved" in the past (https://github.com/overture-stack/arranger/issues/12), but as the solution was somewhat hacky, and not documented in the code, the fix was removed at some point when we added new data types supported by ES. The right solution would be to add a custom scalar. e.g. https://github.com/chadlieberman/graphql-type-long or https://www.npmjs.com/package/graphql-bigint

justincorrigible commented 2 years ago

may help implementation https://stackoverflow.com/questions/62893664/how-can-i-handle-long-int-with-graphql