Repository navigation
Commit 176e6ba
Migrate API client to extensions-based GraphQL architecture (#86)
## Summary
Restructures the `robosystems_client` API layer from domain-specific
modules (`investor`, `ledger`, `views`) to an extensions-based
architecture (`extensions_graph_ql`, `extensions_robo_investor`,
`extensions_robo_ledger`) with native GraphQL support. This is a major
refactor that replaces REST-style API endpoint wrappers with GraphQL
operations and introduces a new GraphQL client infrastructure.
## Key Accomplishments
### Architecture Migration
- **Reorganized API modules**: Renamed and relocated API operations from
`api/investor/`, `api/ledger/`, and `api/views/` into
`api/extensions_robo_investor/`, `api/extensions_robo_ledger/`, and
`api/extensions_graph_ql/` respectively
- **Standardized operation naming**: All operations now follow the `op_`
prefix convention (e.g., `create_portfolio.py` →
`op_create_portfolio.py`)
- **Removed legacy read endpoints**: Deleted all `get_*` and `list_*`
REST-style query wrappers (~30+ files) in favor of GraphQL queries
### GraphQL Support
- Added new `robosystems_client/graphql/` package with a dedicated
GraphQL client
- Introduced GraphQL query modules for both `investor` and `ledger`
domains
- Added `extensions_graph_ql` API module with HTTP GET and POST handlers
for GraphQL endpoint routing
### New Operations
- Added delete operations for RoboInvestor: `op_delete_portfolio`,
`op_delete_position`, `op_delete_security`
- Added new RoboLedger operations: `op_auto_map_elements`,
`op_build_fact_grid`, `op_close_period`,
`op_create_manual_closing_entry`, `op_delete_mapping_association`,
`op_delete_publish_list`, `op_remove_publish_list_member`,
`op_reopen_period`, `op_share_report`, `op_truncate_schedule`
### Extension Clients
- Added `investor_client.py` extension client
- Updated `ledger_client.py` and `report_client.py` to align with the
new API structure
- Updated extension registry in `extensions/__init__.py`
### Build & CI
- Refined `pyproject.toml` sdist inclusion patterns for the new package
structure
- Updated GitHub Actions test workflow configuration
## Breaking Changes
195 files changed
Lines changed: 7693 additions & 22331 deletions
File tree
- .github/workflows
- robosystems_client
- api
- extensions_graph_ql
- extensions_robo_investor
- extensions_robo_ledger
- investor
- ledger
- extensions
- graphql
- queries
- investor
- ledger
- models
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | | - | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
95 | | - | |
| 93 | + | |
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
99 | | - | |
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
| |||
108 | 105 | | |
109 | 106 | | |
110 | 107 | | |
111 | | - | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | 113 | | |
118 | | - | |
119 | 114 | | |
120 | 115 | | |
121 | 116 | | |
122 | | - | |
| 117 | + | |
123 | 118 | | |
124 | 119 | | |
125 | 120 | | |
126 | | - | |
127 | 121 | | |
128 | 122 | | |
129 | 123 | | |
| |||
135 | 129 | | |
136 | 130 | | |
137 | 131 | | |
138 | | - | |
139 | 132 | | |
140 | 133 | | |
141 | 134 | | |
| |||
145 | 138 | | |
146 | 139 | | |
147 | 140 | | |
148 | | - | |
149 | 141 | | |
150 | 142 | | |
151 | 143 | | |
152 | | - | |
| 144 | + | |
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
156 | | - | |
157 | 148 | | |
158 | 149 | | |
159 | 150 | | |
| |||
166 | 157 | | |
167 | 158 | | |
168 | 159 | | |
169 | | - | |
170 | 160 | | |
171 | 161 | | |
172 | 162 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | | - | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
63 | | - | |
| 60 | + | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
| |||
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
79 | | - | |
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
| |||
88 | 83 | | |
89 | 84 | | |
90 | 85 | | |
91 | | - | |
92 | 86 | | |
93 | 87 | | |
94 | 88 | | |
95 | | - | |
| 89 | + | |
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
99 | | - | |
100 | 93 | | |
101 | 94 | | |
102 | 95 | | |
| |||
108 | 101 | | |
109 | 102 | | |
110 | 103 | | |
111 | | - | |
112 | 104 | | |
113 | 105 | | |
114 | 106 | | |
115 | 107 | | |
116 | 108 | | |
117 | 109 | | |
118 | | - | |
119 | 110 | | |
120 | 111 | | |
121 | 112 | | |
122 | | - | |
| 113 | + | |
123 | 114 | | |
124 | 115 | | |
125 | 116 | | |
126 | | - | |
127 | 117 | | |
128 | 118 | | |
129 | 119 | | |
| |||
135 | 125 | | |
136 | 126 | | |
137 | 127 | | |
138 | | - | |
139 | 128 | | |
140 | 129 | | |
141 | 130 | | |
| |||
145 | 134 | | |
146 | 135 | | |
147 | 136 | | |
148 | | - | |
149 | 137 | | |
150 | 138 | | |
151 | 139 | | |
152 | | - | |
| 140 | + | |
153 | 141 | | |
154 | 142 | | |
155 | 143 | | |
156 | | - | |
157 | 144 | | |
158 | 145 | | |
159 | 146 | | |
| |||
166 | 153 | | |
167 | 154 | | |
168 | 155 | | |
169 | | - | |
170 | 156 | | |
171 | 157 | | |
172 | 158 | | |
File renamed without changes.
0 commit comments