prisma-examples
prisma-examples copied to clipboard
GraphQL examples: Add computed values to differentiate domain and database models
In most cases your domain model and database model is not a 1:1 mapping but includes some computed/derived values which are implemented using "custom resolvers". To make this distinction clearer, we should add a few computed values to the domain model for the GraphQL examples.
Happy to take this one @schickling if you have any commonly asked suggestions for these.
I can think right now of a formatted price resolver that returns price (+ currency) stored.