Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating the types of valid read calls someone can make #988

Merged
merged 4 commits into from
Mar 21, 2025

Conversation

tylernix
Copy link
Contributor

@tylernix tylernix commented Mar 21, 2025

Including more ways to call the Read API that were not previously documented.

Description

Updating the documentation to include all 7 ways you can use the Read API to get relationship tuples.

  1. Read a tuple related to a particular user, relation, and object
  2. Read all tuples related to a particular user, relation, and object type
  3. Read all tuples related to a particular user and object with any relation
  4. Read all tuples related to a particular user and object type with any relation
  5. Read all tuples related to a particular relation and object for any user
  6. Read all tuples related to a particular object with any user or relation
  7. Read all tuples for any user, relation, or object

1,4,6,7 were previously not documented.

References

closes #971

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@tylernix tylernix requested a review from a team as a code owner March 21, 2025 21:05
@rhamzeh
Copy link
Member

rhamzeh commented Mar 21, 2025

@ryanpq can we add a ticket to the SDK Generator to update the README's of the SDKs to match this?

e.g. https://github.com/openfga/js-sdk?tab=readme-ov-file#read-relationship-tuples

The one missing from the SDK documentation is (5) `Read all tuples related to a particular relation and object for any user.

Also let's update the API Documentation to match

Copy link
Contributor

github-actions bot commented Mar 21, 2025

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2025-03-21 22:18 UTC

@rhamzeh rhamzeh enabled auto-merge (squash) March 21, 2025 22:14
@rhamzeh rhamzeh merged commit 8dcb108 into main Mar 21, 2025
10 of 12 checks passed
@rhamzeh rhamzeh deleted the tylernix/read-api-docs-updates branch March 21, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend Read API documentation
2 participants