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

DataStore - ObserveQuery deleted items are showing #2069

Closed
1 task done
a-alen opened this issue Oct 27, 2022 · 11 comments
Closed
1 task done

DataStore - ObserveQuery deleted items are showing #2069

a-alen opened this issue Oct 27, 2022 · 11 comments
Assignees
Labels
bug Something isn't working datastore DataStore category/plugins

Comments

@a-alen
Copy link

a-alen commented Oct 27, 2022

Before opening, please confirm:

Language and Async Model

Kotlin

Amplify Categories

GraphQL API, DataStore

Gradle script dependencies

// Put output below this line
    def amplify_version = "1.37.5"

    implementation "com.amplifyframework:core:$amplify_version"
    implementation "com.amplifyframework:aws-api:$amplify_version"
    implementation "com.amplifyframework:aws-auth-cognito:$amplify_version"
    implementation "com.amplifyframework:aws-datastore:$amplify_version"
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6'

Environment information

# Put output below this line
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

When item is deleted with Amplify.DataStore.delete, that deleted item stays in Amplify.DataStore.observeQuery. You need to exit from app, and when you start it again ObserveQuery shows correct number of items, until next delete.

Column _deleted is not accessible, so it is not possible to filter that item.

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line
2022-10-27 20:54:22.699  5341-5409  AWS_DATASTORE_GIT       com.example.barcodelogin             I  OBSERVE STARTED
2022-10-27 20:54:22.727  5341-5417  AWS_DATASTORE_GIT       com.example.barcodelogin             I  OBSERVE number of items: 8
2022-10-27 20:54:22.755  5341-5441  AWS_DATASTORE_GIT       com.example.barcodelogin             I  QUERY number of items: 8
2022-10-27 20:54:39.407  5341-5493  AWS_DATASTORE_GIT       com.example.barcodelogin             I  OBSERVE number of items: 8
2022-10-27 20:54:39.407  5341-5493  AWS_DATASTORE_GIT       com.example.barcodelogin             I  ITEM DELETED
2022-10-27 20:54:39.416  5341-5495  AWS_DATASTORE_GIT       com.example.barcodelogin             I  QUERY number of items: 7
2022-10-27 20:54:41.409  5341-5494  AWS_DATASTORE_GIT       com.example.barcodelogin             I  OBSERVE number of items: 8
2022-10-27 20:54:41.417  5341-5515  AWS_DATASTORE_GIT       com.example.barcodelogin             I  QUERY number of items: 7

amplifyconfiguration.json

No response

GraphQL Schema

// Put your schema below this line

Additional information and screenshots

No response

@AnilMaktala AnilMaktala added datastore DataStore category/plugins pending-triage Issue is pending triage labels Oct 27, 2022
@AnilMaktala AnilMaktala added the p2 label Nov 9, 2022
@AnilMaktala
Copy link
Member

Hey @a-alen 👋, Thanks for raising the issue. We can replicate the issue and marked this as a bug for the team to evaluate further.

@a-alen
Copy link
Author

a-alen commented Nov 13, 2022

Hi, also - when there is a update mutation inside the application, ObserveQuery does not transmit/reacts to that data change. Is this wanted behavior or is it a bug? If it is a bug, should I open it as a new issue?

@AnilMaktala AnilMaktala added bug Something isn't working and removed pending-triage Issue is pending triage labels Nov 15, 2022
@admin-ssg
Copy link

Hello, is there any progresses on this? :)

@iooi
Copy link

iooi commented Mar 30, 2023

+1!! Any update??

@iooi
Copy link

iooi commented Mar 30, 2023

also reproduced on iOS using react-native version.

@Makatun
Copy link

Makatun commented Apr 18, 2023

+1

@CyprienRicque
Copy link

CyprienRicque commented Apr 24, 2023

Same problem here. Do you have any good workaround?
(Android - Kotlin)

@acrusage
Copy link

+1

@ankpshah
Copy link
Contributor

ankpshah commented Jul 24, 2023

Hello, we merged #2522 which should resolve this issue when released. Will communicate the updated version number so that you can test the fix.

@ankpshah ankpshah added the pending-release Code has been merged but pending release label Jul 24, 2023
@mattcreaser mattcreaser removed the p2 label Jul 25, 2023
@ankpshah
Copy link
Contributor

This has been fixed in version 2.11.1

@ankpshah ankpshah removed the pending-release Code has been merged but pending release label Jul 28, 2023
@ankpshah ankpshah closed this as completed Aug 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datastore DataStore category/plugins
Projects
None yet
Development

No branches or pull requests

9 participants