Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API.graphql subscriptions stop receiving data across network changes #468

Open
2 tasks
stocaaro opened this issue Aug 17, 2023 · 2 comments
Open
2 tasks
Labels
feature-request New feature or request GraphQL

Comments

@stocaaro
Copy link
Member

Is this related to a new or existing framework?

No response

Is this related to a new or existing API?

GraphQL API

Is this related to another service?

AppSync

Describe the feature you'd like to request

The API GraphQL subscription behavior should continue to receive updates (or be reconnected) across IP address changes.

The device/browser IP address may change when moving between wifi or cellular networks. When this occurs, either:

  1. The websocket should remain active and uninterrupted.
  2. The websocket should be disconnected immediately prompting reconnection.

Describe the solution you'd like

AppSync should continue to send data to websockets across IP address changes.

Describe alternatives you've considered

The Amplify client should recognize when the AppSync subscription is broken either by watching for IP address changes or because AppSync sends error messages that will trigger the errant connection to close. In both cases the client should automatically reconnect.

Additional context

Reproduction steps:

  • Setup an application with an API subscription following data updates
  • Confirm that under normal conditions updates are received as expected
  • Simulate that when the device IP address changes, the websocket remains, but no longer receives updates.
    • Simulate IP address change by either logging in to or disconnecting from a VPN

Note that in connection states this ip address transition doesn't cause the network to be unavailable in my testing. The connection issue is that we miss Keep Alive messages following the IP address change.

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@cwomack cwomack added GraphQL feature-request New feature or request and removed pending-triage labels Aug 17, 2023
@cwomack
Copy link
Member

cwomack commented Aug 21, 2023

Thanks for opening this issue, @stocaaro. We'll review this internally and provides updates on any progress as soon as we can.

@sam-decida
Copy link

Is there any update to this issue? I'm also running into the same issue.

@stocaaro stocaaro transferred this issue from aws-amplify/amplify-js Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request GraphQL
Projects
None yet
Development

No branches or pull requests

3 participants