amazon-archives / aws-appsync-rds-aurora-sample

An AWS AppSync Serverless resolver for the Amazon Aurora relational database.
MIT No Attribution
133 stars 39 forks source link

Subscription query hangs #4

Closed nicholas-santos closed 6 years ago

nicholas-santos commented 6 years ago

The subscription query in the guide hangs

subscription AddedCommentByAuthor{
  addedCommentByAuthor(author:"Nadia"){
    id
    author
    content
  }
}
jbailey2010 commented 6 years ago

Can you share what your mutation was? AppSync requires that the filter used in the subscription be in the response of the mutation, and it can seem like it's hanging if it isn't there.

Even in a happy case, subscriptions will appear to 'hang' until a mutation is executed. It's a long-running connection, so to test it on the AppSync console, you'll need two tabs open: 1) Tab 1 - execute the subscription 2) Tab 2 - execute the mutation 3) You should now see a response in tab 1.