Skip to content

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

Description

@AbdallahAbis

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions