Commit 2f4d426
committed
refactor: improve example to demonstrate computed relations
- Update authorization model to show owner/viewer/can_read pattern
- Write tuples to base relations (owner, viewer)
- Query computed relation (can_read = owner OR viewer)
- Demonstrates OpenFGA's value: derived permissions from base relations
- Update CHANGELOG to be brief with link to README (per @rhamzeh feedback)
- Remove OPENFGA_LIST_OBJECTS_DEADLINE from manually-written docs
- Clarify no pagination limit vs server timeout in all documentation
- Add detailed explanation of computed relations in example README
Addresses feedback from @aaguiarz and @SoulPancake:
- openfga/js-sdk#280 (comment)
- Shows why StreamedListObjects is valuable for computed relations
All tests passing. Example builds successfully.1 parent 520e78e commit 2f4d426
File tree
5 files changed
+100
-25
lines changed- example/StreamedListObjectsExample
- src/OpenFga.Sdk/Client
5 files changed
+100
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 5 | + | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | | - | |
| 789 | + | |
790 | 790 | | |
791 | | - | |
792 | | - | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
793 | 796 | | |
794 | 797 | | |
795 | 798 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
39 | 68 | | |
40 | 69 | | |
41 | 70 | | |
| |||
Lines changed: 54 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
38 | 61 | | |
39 | 62 | | |
40 | 63 | | |
41 | 64 | | |
42 | 65 | | |
43 | | - | |
| 66 | + | |
44 | 67 | | |
45 | 68 | | |
46 | 69 | | |
47 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
48 | 83 | | |
49 | 84 | | |
50 | 85 | | |
| |||
58 | 93 | | |
59 | 94 | | |
60 | 95 | | |
61 | | - | |
| 96 | + | |
62 | 97 | | |
63 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
64 | 110 | | |
65 | 111 | | |
66 | | - | |
| 112 | + | |
67 | 113 | | |
68 | 114 | | |
69 | 115 | | |
| 116 | + | |
70 | 117 | | |
71 | 118 | | |
72 | 119 | | |
73 | | - | |
| 120 | + | |
74 | 121 | | |
75 | 122 | | |
76 | 123 | | |
77 | 124 | | |
78 | | - | |
| 125 | + | |
79 | 126 | | |
80 | 127 | | |
81 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
509 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
510 | 512 | | |
511 | 513 | | |
512 | 514 | | |
| |||
0 commit comments