Delete a Record (Beta)

AVAILABLE API VERSION
API v59.0 and later

Use mutations to delete a record. Within mutations, the RecordDelete field enables you to update all object types your Salesforce user has access to. Only objects supported by UI API are available for mutations.

To delete a record, use RecordDelete with the Id and field values for the record you want to update.

The response body returns the Id value of the record you deleted.

Consider these guidelines when deleting a record.

  • Sending a delete request with an incorrect Id value returns a DataFetchingException error.
  • Sending a delete request for a record that's already deleted returns a DataFetchingException error.

Send Mutation Requests