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

Inconsistent data between /data/doc and data/query #281

Open
AbdallahAbis opened this issue Aug 6, 2023 · 0 comments
Open

Inconsistent data between /data/doc and data/query #281

AbdallahAbis opened this issue Aug 6, 2023 · 0 comments

Comments

@AbdallahAbis
Copy link

AbdallahAbis commented Aug 6, 2023

Normally this document shouldn't exist as it was deleted using cleint.delete but for some reason, it still exists on /query as a full document, and on the studio as an empty document!

Screenshot 2023-08-06 at 16 53 06

Making an HTTP request to the /query endpoint

https://<<acc_id>>.api.sanity.io/v2021-06-07/data/query/production/?query=*[_id == "1GTUUGED6PZ227984"]{_id}

Returns (normally it should not return the document as it was deleted!)

{
    "query": "*[_id == \"1GTUUGED6PZ227984\"]{_id}",
    "result": [
        {
            "_id": "1GTUUGED6PZ227984"
        }
    ],
    "ms": 13
}

Making same HTTP request to /doc endpoint

https:/<<acc_id>>.api.sanity.io/v2021-06-07/data/doc/production/1GTUUGED6PZ227984

Returns (which is correct)

{
    "documents": [],
    "omitted": [
        {
            "id": "1GTUUGED6PZ227984",
            "reason": "existence"
        }
    ]
}

P.S. It's not only one single document, it's more than 200 documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant