question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appsync graphQL connection closed error

See original GitHub issue

Hi I am using subscription via graphQL and getting frequent connection closed error from Appsync, for no apparent reason. It seems to happen at random times. Don’t know how to reproduce it.

Screen Shot 2020-10-27 at 6 23 09 PM

My .js code:

subscribeExhibitorNotifications = async() => { try { this.exhitorStatusSubscription = await API.graphql(graphqlOperation(onCreateOveceventsExhibitorStatus)); if (this.exhitorStatusSubscription) { this.exhitorStatusSubscription.subscribe({ next: (event) => { … } else { … } }, error: error => { console.log("error in graphQL onCreateOveceventsExhibitorStatus: ", error); } }); } } catch (e) { console.log("error in graphQL onCreateOveceventsExhibitorStatus: ", e) } }

Schema:

export const onCreateOveceventsExhibitorStatus = /* GraphQL */ subscription OnCreateOveceventsExhibitorStatus { onCreateOveceventsExhibitorStatus { id datetime status } };

export const createOveceventsExhibitorStatus = /* GraphQL */ mutation CreateOveceventsExhibitorStatus($id: String!, $status: String!) { createOveceventsExhibitorStatus(id: $id, status: $status) { id datetime status } };

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:11
  • Comments:41 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
mchitsoncommented, Oct 29, 2020

Hello amplify guys, any luck?

7reactions
majirosstefancommented, Apr 7, 2022

I think this should not be closed, it should not forward users to sites outside of Github / and all code samples / workarounds should be posted HERE.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve unauth errors for GraphQL requests in AWS AppSync
I receive "Unauthorized" errors when I run GraphQL requests with AWS AppSync. How do I troubleshoot these errors?
Read more >
AWS Amplify Show AppSync/GraphQL Subscription ...
After creating an AWS AppSync/GraphQL subscription -- how do I get the subscriptions connection status and any future connection status ...
Read more >
Handling operation errors - Apollo GraphQL Docs
Apollo Client can encounter a variety of errors when executing operations on your GraphQL server. Apollo Client helps you handle these errors according...
Read more >
API (GraphQL) - Client code generation - AWS Amplify Docs
It can also generate GraphQL statements(queries, mutations, and subscriptions). ... appSyncConfig) } catch { print("Error initializing appsync client.
Read more >
Real-time data with AppSync subscriptions
Building GraphQL APIs with AWS AppSync ... Under the hood, the subscription tab opens a WebSocket connection and the event comes through ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found