Hello world, I see in some projects based on prism...
# orm-help
a
Hello world, I see in some projects based on prisma something that I can't explain myself, for example a type that could be like this:
Copy code
type Model{
  id: ID!
  weight(unit: unit): Float #KG, LB
  text(locale: locale): String # EN, US, etc
}
How can I have a type like that in Prisma endpoint directly? Is it possible?
h
Hi @Al This is what you will provide in your custom server. In the prisma datamodel this will look something like this:
Copy code
type Weight{
  unit: String;
  data: Float;
}

type Text{
  locale: String
  text: String
}
type Model{
  id: ID! @unique
  weight: Weight
  text: Text
}
a
Thanks @Harshit. I don't think there is a custom layer on prisma in that kind projects . Do you think is that possible without a custom layer?
h
Are you using prisma without an application server? I will not recommend that as you will not be able to provide custom logic
a
I would use it with a custom application layer but it will connect to multiple dynamic prisma services... :)
h
Yes that store it like that and manipulate it.
a
thanks, I will try