Aws-mobile-appsync-sdk-js: What is the best way to debug requests?

Created on 21 Jan 2018  ·  5Comments  ·  Source: awslabs/aws-mobile-appsync-sdk-js

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:

  • There are no detailed request logs for AppSync (nothing I can look at to see each individual requests, who made it, why it might have been rejected, what resolvers were fired, etc.).
  • There is no integration between AppSync and XRay or CloudWatch Logs (but there is CloudWatch Metrics)

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.

question

All 5 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yarax picture yarax  ·  3Comments

asadowns picture asadowns  ·  3Comments

JonathanHolvey picture JonathanHolvey  ·  4Comments

ciocan picture ciocan  ·  4Comments

sfegsetsfe picture sfegsetsfe  ·  4Comments