Add ids argument to updates field on query

There is still no “ids” argument on the “updates” field of a query. We can get this updateid from a trigger (new update created), yet the only way to do anything with it is to turn around and query an item for its most recent updates.

query ($updateId: [Int!]) {
    updates (ids: $updateId) {
        body,
        text_body,
        assets {
            id,
            name,
            file_size,
            url,
        }
    }
}
{
    "errors": [
        {
            "message": "Field 'updates' doesn't accept argument 'ids'"
        }
    ]
}

Instead the query below is needed, then, item[0].update.map() to get the update in question. This requires getting more updates, and depending on the query more nested queries are required. All of this increases complexity - both query, and code.

query ($itemId: [Int!]) {
    items (ids: $itemId) {
        updates (limit: 5) {
            id,
            assets {
                id,
                name,
                url
            }
        }
    }
}

Hello there @codyfrisch!

Thank you for the feedback. I have shared it with the team :slightly_smiling_face:

Cheers,
Matias

Just updating that this is now possible as of the previous version :slight_smile:
See documentation

Documentation makes no mention of update ID being an argument for querying updates. Though it does appear in the schema now. Good to know.