maoosi / prisma-appsync

⚡ Turns your ◭ Prisma Schema into a fully-featured GraphQL API, tailored for AWS AppSync.

Home Page:https://prisma-appsync.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(MongoDB) The ID field is required in the schema when it should be generated by the database

mikerudge opened this issue · comments

When adding a model, the ID field should not be required in the create type. For example, this user model

model User {
    id            String    @id @default(auto()) @map("_id") @db.ObjectId
    name          String?
}

produces

input UserCreateInput {
    id: String! <-- ID should not be required here
    name: String
}

Related to #96. Fix is ready and will be released as part of 1.0.0-rc.6.