GraphQL mutation productChangeStatus

I’m using this mutation to try to archive products in bulk. However, I can’t even get it to accept one. What am I doing wrong here? See query and response below. This ID is most definitely in my product catalogue so I’m not sure what it doesn’t like about it.

mutation productChangeStatus($productId: ID!, $status: ProductStatus!) {
  productChangeStatus(productId: $productId, status: $status) {
    product {
      hasOutOfStockVariants
    }
    userErrors {
      field
      message
    }
  }
}
QUERY VARIABLES:

{
  "productId": 6597997559942,
  "status": "ARCHIVED"
}

Response:

{
  "errors": [
    {
      "message": "Variable $productId of type ID! was provided invalid value",
      "locations": [
        {
          "line": 1,
          "column": 30
        }
      ],
      "extensions": {
        "value": 6597997559942,
        "problems": [
          {
            "path": [],
            "explanation": "Invalid global id '6597997559942'",
            "message": "Invalid global id '6597997559942'"
          }
        ]
      }
    }
  ]
}

Hi @Lawson_Thalmann !

The productId is of type ID (or global ID) and so it is expecting the following format:

gid://shopify/Product/6597997559942