surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.04k stars 74 forks source link

Do not know how to serialize a BigInt #254

Closed Deutscher775 closed 2 months ago

Deutscher775 commented 2 months ago

Describe the bug

TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at ObjectCell (http://tauri.localhost/assets/background-B25qPSFS.js:10:259878)
    at Q7 (http://tauri.localhost/assets/index-BE_svTLW.js:82:19519)
    at Y_ (http://tauri.localhost/assets/index-BE_svTLW.js:84:44017)
    at q_ (http://tauri.localhost/assets/index-BE_svTLW.js:84:39753)
    at xM (http://tauri.localhost/assets/index-BE_svTLW.js:84:39681)
    at b2 (http://tauri.localhost/assets/index-BE_svTLW.js:84:39534)
    at JO (http://tauri.localhost/assets/index-BE_svTLW.js:84:35901)
    at N_ (http://tauri.localhost/assets/index-BE_svTLW.js:84:34852)
    at w (http://tauri.localhost/assets/index-BE_svTLW.js:69:1554)

To Reproduce Steps to reproduce the behavior:

  1. Create a record containing a BigInt using the Python surrealdb framework (Creating a record with Surrealist does not work, also i only use Python, so idk if it works with other languages too)
  2. Open the record in surrealist

Expected behavior Showing the record just fine.

Environment: Platform: Desktop OS: Windows_NT Architecture: x86_64 WebView: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0 Version: 2.0.5 Flags: featureFlags: false, models_view: true, apidocs_view: true, themes: false, newsfeed: true

ioannist commented 2 months ago

Getting the same error here when i click on a table.

Platform: Desktop OS: Windows_NT Architecture: x86_64 WebView: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0 Version: 2.0.6 Flags: featureFlags: false, models_view: true, apidocs_view: true, themes: false, newsfeed: true

kearfy commented 2 months ago

Would you have an example query by any chance which reproduces this issue?

ioannist commented 2 months ago

Would you have an example query by any chance which reproduces this issue?

Not really. It happens on some big tables I try to load by clicking on the table. We have some big numbers in those tables, so it's worth testing for entries that are near the edge of what surrealdb allows for integers.

Deutscher775 commented 2 months ago

Would you have an example query by any chance which reproduces this issue? {"someBigInt": 1045437427965231284}