Can anyone help me with an issue? I created a thread in the forum for the long-form version (
https://www.prisma.io/forum/t/looking-for-help-with-relations-in-my-schema/3886) but basically, I want to know how to set something up in my schema.
I have
recipes and I have individual _ingredient_s stored in the database. Each
ingredient has nutritional information per default value, e.g. x calories per 100g, x fat per 100g, etc. Standard stuff, I guess. When creating a
recipe, I want to be able to connect to the desired _ingredient_s and I’ve managed that but what I want to be able to do, when creating a recipe, is specify a quantity of each ingredient. That way, in the createRecipe resolver, I can calculate the full nutrition for the recipe (based on x number of each ingredient). I’ve been banging my head against the wall with this for a couple of days now so I’d really appreciate some support. There’s more information in the thread (link above). Thank you!