I'm having a pretty big challenge properly debugging what is going on with my requests to/from AppSync. There doesn't seem to be any good way to log/trace AppSync requests correct? Please correct me if any of these are available:
I'm having two issues that I can't get enough information about to diagnose properly. I'm seeing duplication of requests to my Lamba resolvers, and I'm getting 500 errors on my react-native application with no way to understand why.
Any help here would be much appreciated, I'm having a lot of success with AppSync otherwise and with a bit more insight (and a few more features) this will be an amazing enabler.
@kabriel I posted a similar question here: https://github.com/awslabs/aws-mobile-appsync-sdk-js/issues/14
I think it will be great to have integrations with - mapping template debugging, apollo tracing, xray and cloudwatch. Seems like some of this is on the roadmap as @undefobj pointed out above.
also @kabriel you might want to look at lambda example here In my experience 500 usually occurs when there is an issue with lambda function. For duplication of request above example might help.
Thanks, @sid88in! you were right, with that tip I went over everything in detail and found the lambda function name had a typo. Would have loved to have seen a resolver invocation error in AppSync for something like this.
As far as the duplicate invocation. Anytime I connect a mutation to a lambda function my lambda gets called twice. I've worked around it for now.
Closing now that AppSync is GA and:
A test and debug flow has been added for running unit tests with “mock” data on a GraphQL resolver. Amazon CloudWatch has been integrated, enabling streaming of GraphQL operation logs for a live debugging experience.
https://aws.amazon.com/about-aws/whats-new/2018/04/aws-appsync-now-ga/
@manueliglesias speaking of Cloudwatch, while recently troubleshooting an AppSync query, the problematic query did not generate a Cloudwatch log file unlike successful queries but instead returned a network timeout error. it would be nice to be able to view Appsync errors in the logs instead of just logs for successful requests.