I need to send an email after a mutation. My graphql schema saves to the database using the @model directive but I want to add to it and send an email after the mutation. Can someone please recommend the best way to do this? Below is my graphql schema.
enum Service {
AIRPORT_PICKUP
AIRPORT_DROPOFF
GUIDED_TOUR
DRIVER
}
type Message
@model
@auth(
rules: [
{ allow: public, provider: iam, operations: [create] }
{ allow: groups, groups: ["admin"], operations: [update, delete, read] }
]
) {
id: ID!
firstName: String!
lastName: String!
email: AWSEmail!
phoneCountryCode: String
phoneNumber: String
message: String!
arrivalFlightNumber: String
arrivalDateTime: AWSDateTime
departurelFlightNumber: String
departureDateTime: AWSDateTime
travelers: Int
services: [Service]
owner: String
group: String
}