paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
681 stars 55 forks source link

SDL First Json error #222

Closed DregondRahl closed 3 years ago

DregondRahl commented 3 years ago

I'm getting this error when i start the service "yarn dev" when my table has a json field with postgres db. Is it an apollo types issue?

model Setting {
    id               Int          @id @default(autoincrement())
    lotExpires       Boolean      @default(true)
    lotDisablePeriod Int?         @default(5) 
    lotNotification  Json?
}

image

image

AhmedElywa commented 3 years ago

You need to add a Json scalar type to your GraphQL resolver https://www.apollographql.com/docs/apollo-server/schema/custom-scalars/

DregondRahl commented 3 years ago

Thanks!