You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using BigInt, the generated client uses i64 which leads RSPC to generate a TS binding using bigint as the type.
However, when passing this as value to the RSPC endpoint, JS complains that it can't serialize it as JSON. How can I overcome this limitation to use prisma-client-rust with RSPC using Bigint? Not sure if this is an RSPC issue or prisma one, sorry if I posted in the wrong repo.
Cheers
The text was updated successfully, but these errors were encountered:
Usually if people have issues with BigInt and Specta we tell them to use #[specta(type = String)] and serialize as string, but you're right in that you can't exactly do that with a Prisma client.
Perhaps I could add an option to the generator that would do so.
Brendonovich
changed the title
Problem with BigInt and RSPC
BigInt serialization configuration
Mar 7, 2023
When using BigInt, the generated client uses
i64
which leads RSPC to generate a TS binding usingbigint
as the type.However, when passing this as value to the RSPC endpoint, JS complains that it can't serialize it as JSON. How can I overcome this limitation to use prisma-client-rust with RSPC using Bigint? Not sure if this is an RSPC issue or prisma one, sorry if I posted in the wrong repo.
Cheers
The text was updated successfully, but these errors were encountered: