Open mufumade opened 3 years ago
After having a look at the code ... Integer values are also not supported As a result this will also fail:
{
"field": "testMutation",
"arguments": {
"input": {
"ids": [
2,
3
]
}
}
}
thanks for reporting @mufumade, would you like to make a PR to address this?
@tomerd Yes absolutely. I am a bit busy lately so it might take a few days.
Looks like this is not fixed https://github.com/swift-server/swift-aws-lambda-events/blob/main/Sources/AWSLambdaEvents/AppSync.swift#L21
@mufumade Are you stil interested to submit a PR on Lambda event project ?
This issue must be migrated to Lambda events
Expected behavior
I am using swift as a appsync lambda resolver with the following GraphQL schema.
According to the GraphQL Documentation arrays are allowed. So a correct JSON Decode should happen.
Actual behavior
By setting the
message
to type ofAWSLambdaEvents.AppSync.Event
leads to aUnexpected AppSync argument. Expected a String or a Dictionary.
error.Steps to reproduce
This is a the json payload I get from appsync.
Swift & OS version (output of
swift --version && uname -a
)Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) Target: x86_64-apple-darwin20.4.0 Darwin xx-MacBook-Pro.local 20.4.0 Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:47 PDT 2021; root:xnu-7195.101.2~1/RELEASE_X86_64 x86_64