Commit a6c6d0d
Add NotImplementedError fallback for GraphOperationsInterface methods (#1154)
* Add NotImplementedError fallback for GraphOperationsInterface methods
Allow GraphOperationsInterface to be used for selective method overriding
by catching NotImplementedError and falling back to default behavior.
This change wraps all GraphOperationsInterface calls in try/except blocks
so that implementations can raise NotImplementedError for methods they
don't need to customize, allowing the built-in default behavior to execute.
Updated methods in nodes.py:
- Node: delete, delete_by_group_id, delete_by_uuids
- EpisodicNode: save, get_by_uuid, get_by_uuids, get_by_group_ids
- EntityNode: load_name_embedding, save, get_by_uuid, get_by_uuids, get_by_group_ids
- CommunityNode: save, get_by_uuid, get_by_uuids, get_by_group_ids
- SagaNode: save, delete, get_by_uuid, get_by_uuids, get_by_group_ids
Updated methods in edges.py:
- Edge: delete, delete_by_uuids
- EpisodicEdge: save, get_by_uuid, get_by_uuids, get_by_group_ids
- EntityEdge: load_fact_embedding, save, get_by_uuid, get_by_uuids, get_by_group_ids
- CommunityEdge: save, get_by_uuid, get_by_uuids, get_by_group_ids
- HasEpisodeEdge: save, delete, get_by_uuid, get_by_uuids, get_by_group_ids
- NextEpisodeEdge: save, delete, get_by_uuid, get_by_uuids, get_by_group_ids
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add missing GraphOperationsInterface method stubs
Add method stubs for all node and edge CRUD operations that were missing
from the interface:
Node methods:
- node_get_by_uuid, node_get_by_uuids, node_get_by_group_ids
- episodic_node_get_by_uuid, episodic_node_get_by_uuids, episodic_node_get_by_group_ids
- community_node_save, community_node_delete, community_node_save_bulk
- community_node_delete_by_group_id, community_node_delete_by_uuids
- community_node_get_by_uuid, community_node_get_by_uuids, community_node_get_by_group_ids
- saga_node_save, saga_node_delete, saga_node_save_bulk
- saga_node_delete_by_group_id, saga_node_delete_by_uuids
- saga_node_get_by_uuid, saga_node_get_by_uuids, saga_node_get_by_group_ids
Edge methods:
- edge_get_by_uuid, edge_get_by_uuids, edge_get_by_group_ids
- episodic_edge_save, episodic_edge_delete, episodic_edge_delete_by_uuids
- episodic_edge_get_by_uuid, episodic_edge_get_by_uuids, episodic_edge_get_by_group_ids
- community_edge_save, community_edge_delete, community_edge_delete_by_uuids
- community_edge_get_by_uuid, community_edge_get_by_uuids, community_edge_get_by_group_ids
- has_episode_edge_save, has_episode_edge_delete, has_episode_edge_save_bulk
- has_episode_edge_delete_by_uuids, has_episode_edge_get_by_uuid
- has_episode_edge_get_by_uuids, has_episode_edge_get_by_group_ids
- next_episode_edge_save, next_episode_edge_delete, next_episode_edge_save_bulk
- next_episode_edge_delete_by_uuids, next_episode_edge_get_by_uuid
- next_episode_edge_get_by_uuids, next_episode_edge_get_by_group_ids
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* update
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent e35600c commit a6c6d0d
File tree
3 files changed
+612
-13
lines changed- graphiti_core
- driver/graph_operations
3 files changed
+612
-13
lines changedLines changed: 300 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
68 | 91 | | |
69 | 92 | | |
70 | 93 | | |
| |||
138 | 161 | | |
139 | 162 | | |
140 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
141 | 255 | | |
142 | 256 | | |
143 | 257 | | |
| |||
179 | 293 | | |
180 | 294 | | |
181 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
182 | 319 | | |
183 | 320 | | |
184 | 321 | | |
| |||
210 | 347 | | |
211 | 348 | | |
212 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
213 | 373 | | |
214 | 374 | | |
215 | 375 | | |
| |||
231 | 391 | | |
232 | 392 | | |
233 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
234 | 484 | | |
235 | 485 | | |
236 | 486 | | |
| |||
262 | 512 | | |
263 | 513 | | |
264 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
265 | 540 | | |
266 | 541 | | |
267 | 542 | | |
| |||
292 | 567 | | |
293 | 568 | | |
294 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
0 commit comments