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

events.closeAll does not really seem closing all the channels #13984

Open
3 tasks done
tmokmss opened this issue Nov 4, 2024 · 2 comments
Open
3 tasks done

events.closeAll does not really seem closing all the channels #13984

tmokmss opened this issue Nov 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working GraphQL Related to GraphQL API issues

Comments

@tmokmss
Copy link

tmokmss commented Nov 4, 2024

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

GraphQL API

Amplify Version

v6

Amplify Categories

api

Backend

Other

Environment information

# Put output below this line

Describe the bug

events.closeAll does not seem workiing as expected. Even after calling the function, all the existing subscription remain active and new events are subscribed.

Expected behavior

After calling event.closeAll, all the existing channels are closed and no new events are subscribed.

Reproduction steps

Bascally I followed this tutorial: https://docs.aws.amazon.com/appsync/latest/eventapi/build-amplify-app.html#deploy-react-vite-app

But when I changed a line as below, channels will not be closed at all.

    return () => {
-      pr?.then((channel) => channel?.close())
+      events.closeAll()
    }

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

  {
    API: {
      Events: {
        endpoint: "https://redacted.appsync-api.us-west-2.amazonaws.com/event",
        defaultAuthMode: "apiKey",
        apiKey: "da2-redacted",
      },
    },
  };

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Nov 4, 2024
@cwomack cwomack added the GraphQL Related to GraphQL API issues label Nov 4, 2024
@chrisbonifacio chrisbonifacio added the bug Something isn't working label Nov 4, 2024
@chrisbonifacio chrisbonifacio removed the pending-triage Issue is pending triage label Nov 4, 2024
@chrisbonifacio
Copy link
Member

thank you for raising this issue! i've marked as a bug for the team.

we will look into it and report back with any progress on a fix.

@chrisbonifacio chrisbonifacio removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Nov 4, 2024
@iartemiev
Copy link
Member

@tmokmss - we published a bug fix for this issue to aws-amplify@unstable. It will be included in the next library release next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GraphQL Related to GraphQL API issues
Projects
None yet
Development

No branches or pull requests

4 participants