No field type for Long with datamodel.prisma and MongoDB

prisma

#1

When using Prisma with MongoDB I am running into an issue with the field types in the prisma datamodel.prisma file, our Mongo contains some values that are Int64 / Long and there seems to be no type to handle this data as Long doesn’t look to have been implemented yet. I have seen custom scalars but from reading about them they seem to be on the graphql side and this appears to be a database interaction issue.

Is there any way to implement custom data types on the side that interacts with the database from the docs it doesn’t seem like this is possible.

Previously we have had issues with our current graphql server built on python and graphene and the solution then was to use Float as it supported 64 bit values, but that doesn’t work either which is good and makes perfect sense. The exception message is below.

java.lang.RuntimeException: Not implemented: com.prisma.shared.models.TypeIdentifier$Float$@7aee516eBsonInt64{value=1531597898461}


#2

Prisma does not presently have integrated types assistance. In #1160 (remark) you can read the backstory about this choice with upcoming assistance for MongoDB, integrated kinds are no longer just an abstract notion, but affect how the information is stored. As such, it is now a nice time to review our integrated types assistance. here how to buy retail software?


#3

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.