Alexis
04/28/2021, 12:59 AMProperty 'id' does not exist on type 'JsonValue'.
model Guild {
id String @id
prefix String?
locale String?
tags Json[]
}Robert Witchell
04/28/2021, 2:23 AMIs there anyway to get type support for the entries inside of the jsondo you want type support inside prisma's scope, or in your JS after you have back your
Guild from a const Guild = prisma.Guild.findMany({x})Alexis
04/28/2021, 1:49 PMGuild
So:
const { tags } = await prisma.guild.findFirst({...})
// "tag.id" would throw an error
tags.find((tag) => tag.id === 'foo');
There's an open issue on github (https://github.com/prisma/prisma/issues/3219) for this but I wanted to ask here to see if there's any good fixes that aren't tacky