Read and write using different tuple models
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 85
- Forks
- 36
- Avg merge
- 3h 8m
- Merged PRs (30d)
- 3
Description
Checklist
- I agree to the terms within the OpenFGA Code of Conduct.
Describe the problem you'd like to have solved
I added the SDK to our backend yesterday and found that there are two different models being used when reading from the store and writing to the store.
from openfga_sdk import ReadRequestTupleKey, Tuple as FgaTuple
from openfga_sdk.client.models import ClientTuple
What's the reason for this? It would just save us some code to convert between them and make things cleaner with a single model/source of truth in the backend.
Thanks!
Describe the ideal solution
Read and write uses the same model for tuples
Alternatives and current workarounds
Cast in between them when reading, altering, and writing back to the store.
References
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the definitions and usages of ReadRequestTupleKey, FgaTuple, and ClientTuple in the SDK, then compare the read and write request paths. The work is done when both paths use one tuple model and callers no longer need to cast between them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authorization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100