openfga / sdk-generator

OpenFGA Client SDK Generator
Apache License 2.0
14 stars 30 forks source link

fix(java-sdk): fix transactions mode being reversed #321

Closed jimmyjames closed 4 months ago

jimmyjames commented 4 months ago

Description

⚠️ This is a behavioral breaking change!

Currently the OpenFgaClient reverses the behavior of write transactions based on the disableTransactions flag. This PR fixes that, only sending batched write requests if disableTransactions == true.

This is a functional breaking change, since the value of disableTransactions was being used incorrectly, so now disableTransactions == true will actually batch requests, and disableTransactions == false will send one (transactional) request.

Current Behavior disabledTransactions value Behavior
true One transactional request sent
false Batched requests sent
Behavior with this PR disabledTransactions value Behavior
true Batched requests sent
false One transactional request sent

References

https://github.com/openfga/java-sdk/issues/59

Review Checklist