Mutation productVariantUpdate: Field 'imageId' doesn't exist on type 'ProductVariant'

Hi,

How can one assign an image to product variant(s) using GraphQL? Rest API works fine.

Tried https://shopify.dev/api/admin-graphql/2022-04/mutations/productVariantUpdate

Even though imageId is documented, it gives the error "Field 'imageId' doesn't exist on type 'ProductVariant'"

https://shopify.dev/api/admin-graphql/2022-01/mutations/productImageUpdate doesn’t have variantIds

Not using Product Media, just Product Images.

Full request:

"query": "\nmutation productVariantUpdate($input: ProductVariantInput!) {\n  productVariantUpdate(input: $input) {\n    product {\n        id\n    }\n    productVariant {\n      id\n      imageId\n    }\n    userErrors {\n      field\n      message\n    }\n  }\n}\n",
                "variables": {
                        "input": {
                                "id": "gid://shopify/ProductVariant/39733932752969",
                                "imageId": "gid://shopify/ProductImage/28990253170761"
                        }
                }

Found the issue in the returning fields. The input variant accepts imageId attribute, but that’s not present in the response (as documented).
Instead, “image” must be used in response.