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

Check if mutationQueue empty? #96

Closed
gitnarqt opened this issue Jan 9, 2019 · 7 comments
Closed

Check if mutationQueue empty? #96

gitnarqt opened this issue Jan 9, 2019 · 7 comments
Assignees
Labels
feature-request Request a new feature pending-response Issue is pending response from the issue requestor

Comments

@gitnarqt
Copy link

gitnarqt commented Jan 9, 2019

Is there a way to know if the mutationQueue is empty? We want to make sure that all mutations were carried out before logging out a user.

@scb01 scb01 self-assigned this Jan 9, 2019
@scb01 scb01 added the question General question label Jan 9, 2019
@scb01
Copy link
Contributor

scb01 commented Jan 9, 2019

@gitnarqt

At this time, there isn't an API/method that you can invoke in the AppSync SDK to know if the mutationQueue is empty.

One idea that you can explore - since mutations will receive an onResponse and onFailure callback, may be you can use that to keep track of Mutations?

@scb01 scb01 added the pending-response Issue is pending response from the issue requestor label Jan 9, 2019
@gitnarqt
Copy link
Author

gitnarqt commented Jan 9, 2019

thank you for your response! Are there plans to implement this feature in the near future?

@frankmuellr frankmuellr added feature-request Request a new feature and removed question General question labels Jan 9, 2019
@scb01
Copy link
Contributor

scb01 commented Jan 10, 2019

@gitnarqt

We will take this as a feature request and provide an update here once this is prioritized and we have a timeline established.

@scb01 scb01 removed the pending-response Issue is pending response from the issue requestor label Jan 10, 2019
@gitnarqt
Copy link
Author

Awesome, thank you so much!

@scb01
Copy link
Contributor

scb01 commented Jan 24, 2019

@gitnarqt

v2.7.6 contains the mechanism to check if the mutation queue is empty. See the link below for an example of how to use it.

@scb01 scb01 added the pending-response Issue is pending response from the issue requestor label Jan 24, 2019
@gitnarqt
Copy link
Author

@cbommas awesome! Worked like a charm, thank you for the prompt update.

@scb01
Copy link
Contributor

scb01 commented Jan 24, 2019

@gitnarqt
Thank you for confirming! I will go ahead and close out this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature pending-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

3 participants