github openfga/dotnet-sdk v0.8.0

one day ago

0.8.0 (2025-10-22)

Added:

  • feat!: add per-request custom headers support
    • DefaultHeaders support to ClientConfiguration for headers sent with every request
    • per-request headers support via Headers property on all client options classes
    • IRequestOptions interface and RequestOptions class for API-level header support
    • IClientRequestOptions interface and ClientRequestOptions class for client-level header support
    • add header validation to prevent overriding of reserved headers
  • feat: add write conflict resolution options
    • ConflictOptions to control behavior for duplicate writes and missing deletes
    • OnDuplicateWrites option: Error (default) or Ignore for handling duplicate tuple writes
    • OnMissingDeletes option: Error (default) or Ignore for handling missing tuple deletes
    • Available in ClientWriteOptions.Conflict property
  • feat: add Retry-After header support for rate limiting
    • Retry logic now respects Retry-After header from HTTP 429 responses
    • Falls back to exponential backoff when Retry-After header is missing or invalid

Warning

BREAKING CHANGES:

  • OpenFgaApi methods: All API methods now accept an IRequestOptions? options parameter. If you are using the low-level OpenFgaApi directly, you may need to update your calls:

    Before:

    await api.Check(storeId, body, cancellationToken);

    After:

    var options = new RequestOptions {
        Headers = new Dictionary<string, string> { { "X-Custom-Header", "value" } }
    };
    await api.Check(storeId, body, options, cancellationToken);
  • ClientRequestOptions renamed: The base client request options interface has been renamed from ClientRequestOptions to IClientRequestOptions to better follow .NET naming conventions. A concrete ClientRequestOptions class is now also available. If you were casting to or implementing this interface, update your code:

    Before:

    var options = obj as ClientRequestOptions;

    After:

    var options = obj as IClientRequestOptions;

Note: If you are using the high-level OpenFgaClient, no changes are required to your existing code. The new headers functionality is additive via the existing options parameters.

Don't miss a new dotnet-sdk release

NewReleases is sending notifications on new releases.