Hello everyone, I am using Prisma with `nexusjs` F...
# orm-help
v
Hello everyone, I am using Prisma with
nexusjs
For one date field, I am using type as Prisma db.date, now date in getting saved in correct format in db But I wanted to know to fetch that field do I need to use
nexusjs
custom date type? or it's not required?
d
You can use the graphql scalar Date or Datetime, depends how strict you want to be on the API level. Datetime will convert to date when inserted into the DB so you don't have to worry about it too much
💯 1
v
okay But the issue is though the data is getting stored in correct format in db, but while fetching date from the db, returned type is DateTime instead of Date
d
Ah ok. Then you want to set the field type to Date and use the graphql scalar
v
Okay, let me try that. But I didn't understand if I am setting the type correctly in db, then shouldn't I be able to fetch the value from db with correct data type or am I missing anything here?