Appsync graphQL connection closed error
See original GitHub issueHi 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.
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:
- Created 3 years ago
- Reactions:11
- Comments:41 (3 by maintainers)
Top GitHub Comments
Hello amplify guys, any luck?
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.