I have a very strange error :
Invalid `db.batch.create()` invocation in
api | /home/alaborde/lisaquapp/api/src/services/batches/batches.ts:21:19
api |
api | 18 }
api | 19
api | 20 export const createBatch: MutationResolvers['createBatch'] = ({ input }) => {
api | → 21 return db.batch.create(
api | Unique constraint failed on the fields: (`id`)
it’s when i call a mutation that is looking like that :
const CREATE_BATCH_MUTATION = gql`
mutation CreateBatchMutation($input: CreateBatchInput!) { createBatch(input: $input) {
id
}
}`
how is that possible ? normally, ID is automatically given to the table by the db (autoincrement)