-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Description
Hi! Your project is really interesting!
I have a question. Let's take a schema like this:
project has uniq id:UUID
task -> belongs to project by project_id
issue -> belongs to task by task_id
comment -> belongs to issue by issue_id
Table projects_users for m2m link:
project_id: uuid
user_id: uuid
Now user has a lot of accessible comments through: project -> tasks -> issues
In a regular SQL we can retrieve comments from DB like this:
select * from comments
JOIN projects_users
JOIN project on ...
JOIN task ...
JOIN issues ...
JOIN comment on ....
where project_users.user_id == current_user.id
How can we limit electric's shapes of comments to be only accessible to user from auth-token when we call /v1/shape/comments?offset=-1? In this example, we shouldn't get all diffs, only diffs for comments linked to one project.
I would like to see an advanced example of usage in your docs. Maybe you can extend your example with projects-issues-comments?
Metadata
Metadata
Assignees
Labels
No labels