Request failed with HTTP Code 502. GraphQL mutation productUpdate

Hi, this is an update: Now I’m using this method: mutation productCreateMedia but… this request doesn’t return a Media ID to attach to ProductVariant with productVariantAppendMedia, I need to know the ID at the request time bcz by each variant there is a specific main image.

The reques only returns this fields:

media {
			  # Media fields
			  status
			  alt
			}

So the question is, how to know the ID of the image uploaded at request time?

Thanks