MongoDB allows you to specify the id of a document with any type as long as it is not an array.
The Prisma Mongo connector so far only handles ObjectIds as valid id types. Opening this up to be as flexible as MongoDB would allow more people with existing dbs to use Prisma.
One concern is that Prisma generates ids internally in some cases, if these are not ObjectIds we would need to be able to ensure uniqueness without knowing how existing ids were generated.
This issue is supposed to serve as a discussion ground for this.
In cases where an id cannot be auto generated, it would must be provided by the user. This is also specced out here. This would then be specified with the NONE strategy:
type Blog {
id: Float! @id(strategy: NONE)
name: String!
}
Because of this. I can't write test cases with custom Id.
Most helpful comment
Because of this. I can't write test cases with custom Id.