Daniel Carroll
01/25/2018, 7:29 PMmutation {
sendSesEmail(
from: "__FROM_EMAIL__"
to: "__TO_EMAIL__"
subject: "A new email from the Graphcool SES template!"
html: "<b>This is your first email from the Graphcool SES template!</b>"
text: "This is your first email from the Graphcool SES template!"
) {
success
}
}
rajit
01/25/2018, 7:33 PMgcf logs
, that usually indicates that the function errored out but didn't return anything useful. You should be able to get more detail from your logs, though.Daniel Carroll
01/25/2018, 7:48 PMgraphcool-framework logs -f sendEmail --tail
Daniel Carroll
01/25/2018, 7:48 PMrajit
01/25/2018, 7:50 PMDaniel Carroll
01/25/2018, 7:54 PM"2018-01-25T19:52:37.267Z": "Please provide a valid AWS Access Key ID!"
}
],
"returnValue": {
"error": "Module not configured correctly."
}
Daniel Carroll
01/25/2018, 7:54 PMmax
01/25/2018, 8:10 PMmax
01/25/2018, 8:10 PMmax
01/25/2018, 8:11 PMmax
01/25/2018, 8:12 PMto
field is an array of strings. I had this error when I was passing a single string. to: [string]
Daniel Carroll
01/25/2018, 8:13 PMsendEmail:
handler:
code:
src: src/ses/sendEmail.ts
environment:
ACCESS_KEY_ID: ****************
SECRET_ACCESS_KEY: *****************
REGION: us-east
type: resolver
schema: src/ses/sendEmail.graphql
Daniel Carroll
01/25/2018, 8:13 PMmax
01/25/2018, 8:14 PMAWS_BUCKET_GP_FILES: ${env:AWS_BUCKET_GP_FILES}
AWS_DEFAULT_REGION: ${env:AWS_DEFAULT_REGION}
S3_AWS_ACCESS_KEY_ID: ${env:S3_AWS_ACCESS_KEY_ID}
S3_AWS_SECRET_ACCESS_KEY: ${env:S3_AWS_SECRET_ACCESS_KEY}`
max
01/25/2018, 8:15 PMmax
01/25/2018, 8:15 PMmax
01/25/2018, 8:20 PMsendEmail:
handler:
code:
src: src/ses/sendEmail.ts
environment:
ACCESS_KEY_ID: ${env:ACCESS_KEY_ID}
SECRET_ACCESS_KEY: ${env:SECRET_ACCESS_KEY}
REGION: ${env:REGION}
type: resolver
schema: src/ses/sendEmail.graphql
Daniel Carroll
01/25/2018, 8:22 PMDaniel Carroll
01/25/2018, 8:27 PMDaniel Carroll
01/25/2018, 8:27 PM2018-01-25T20:22:57.286Z 2163ms FAILURE {
"error": "The resolver function `sendEmail` is not nullable, but the function returned null."
max
01/25/2018, 8:30 PMmax
01/25/2018, 8:30 PMmax
01/25/2018, 8:32 PMDaniel Carroll
01/25/2018, 8:32 PMmax
01/25/2018, 8:33 PMgc logs -f nameOfFunc
right?Daniel Carroll
01/25/2018, 8:33 PM