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
TypeError: Do not know how to serialize a BigInt
at JSON.stringify (<anonymous>)
at stringify (/home/capaj/work-repos/official/official-graphql/prisma-admin/node_modules/express/lib/response.js:1150:12)
at ServerResponse.json (/home/capaj/work-repos/official/official-graphql/prisma-admin/node_modules/express/lib/response.js:271:14)
at ServerResponse.send (/home/capaj/work-repos/official/official-graphql/prisma-admin/node_modules/express/lib/response.js:162:21)
at handler (/home/capaj/work-repos/official/official-graphql/prisma-admin/node_modules/@adminjs/express/src/buildRouter.ts:60:15)
I got this in my schema:
id BigInt @id @default(autoincrement())
The text was updated successfully, but these errors were encountered:
ok, So I fixed it by patching the bigint prototype BigInt.prototype.toJSON = function () { const int = Number.parseInt(this.toString()) return int ?? this.toString() }
I got this in my schema:
The text was updated successfully, but these errors were encountered: