Darryl
06/21/2018, 10:16 AMtype Mutation {
...
createRecipe(
name: String!
ingredients: [IngredientInput!]!
instructions: [String!]!
categories: [CategoryInput!]!
): Recipe
}
And the mutation in resolves (index.js):
createRecipe: (_, args, context, info) => {
return context.prisma.mutation.createRecipe(
{
data: {
name: args.name,
ingredients: args.ingredients,
instructions: args.instructions,
categories: args.categories
}
},
info
);
}