DeleteRelationship

Removes an existing relationship (if it exists).

Parameters

  • relation - The relationship to remove.

Returns

  • A task representing the asynchronous operation, with a ZedToken indicating the version of the data after the relationship is removed.

Example Code

var client = new SpiceDbClient("your_token", "your_schema_prefix");
var relationship = new Relationship("document:firstdoc", "reader", "user:charlie");

// Remove an existing relationship if it exists.
var resultToken = await client.DeleteRelationshipAsync(relationship);
Console.WriteLine($"Relationship deleted at token: {resultToken.Token}");