cedric
04/27/2019, 4:10 PMID!, UUID! and Int! types for ids. this results in mappings that look like this:
type Artist {
id: ID! @id @unique # Generated by Prisma
artist_id: String! @unique # From Spotify
uri: String @unique
href: String @unique
genres: [Genre]! @relation(name: "ArtistToGenre")
...
}
It's manageable but a little noisy as i know have two "identifiers" in the prisma-exposed API. If I want to expose this API to the public, I worry this redundancy could be confusing for consumers (unless I use something nexus to omit the prisma-internal IDs from the public API programmatically). in case it comes up in Q&A after my talk, i was curious about the motivation for not allowing String types as IDs. It seems there are quite a variety of use cases where Prisma might be used for a read-side abstraction of an existing data model or data set that has varchars as natural unique identifiers already.