Commit 79d7e79
feat: allows hook in the subscriptions (#1309)
This PR introduces hooks inside the subscription lifecycle. We also
decided to remove old pubsub implementation that is already deprecated
and the router is not using anymore.
This change is primarily needed for Cosmo Streams support in the router.
It allows to run a hook during the initialization of a subscription
client. The changes are meant to be backwards compatible to the router,
so the router can use an engine version with these changes without
adjustments.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added startup hooks for GraphQL subscriptions to run custom
initialization when a subscription starts.
* Improved subscription lifecycle with per-subscription update and close
signaling, plus startup error propagation to clients.
* **Revert**
* Removed the Pub/Sub datasource implementation — all NATS and Kafka
integrations, configurations, managers, and related tests were deleted.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: StarpTech <[email protected]>
Co-authored-by: Dominik Korittki <[email protected]>1 parent 0009898 commit 79d7e79
File tree
12 files changed
+771
-1533
lines changed- v2/pkg/engine
- datasource
- graphql_datasource
- pubsub_datasource
- resolve
12 files changed
+771
-1533
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| 128 | + | |
| 129 | + | |
122 | 130 | | |
123 | 131 | | |
124 | 132 | | |
| |||
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
| 452 | + | |
| 453 | + | |
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
| |||
1953 | 1954 | | |
1954 | 1955 | | |
1955 | 1956 | | |
1956 | | - | |
| 1957 | + | |
| 1958 | + | |
1957 | 1959 | | |
1958 | 1960 | | |
1959 | 1961 | | |
| |||
2003 | 2005 | | |
2004 | 2006 | | |
2005 | 2007 | | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
Lines changed: 81 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4006 | 4006 | | |
4007 | 4007 | | |
4008 | 4008 | | |
4009 | | - | |
| 4009 | + | |
4010 | 4010 | | |
4011 | 4011 | | |
4012 | 4012 | | |
| |||
8239 | 8239 | | |
8240 | 8240 | | |
8241 | 8241 | | |
8242 | | - | |
8243 | 8242 | | |
8244 | 8243 | | |
8245 | 8244 | | |
| |||
8272 | 8271 | | |
8273 | 8272 | | |
8274 | 8273 | | |
| 8274 | + | |
| 8275 | + | |
| 8276 | + | |
| 8277 | + | |
| 8278 | + | |
| 8279 | + | |
| 8280 | + | |
| 8281 | + | |
| 8282 | + | |
| 8283 | + | |
| 8284 | + | |
| 8285 | + | |
| 8286 | + | |
8275 | 8287 | | |
8276 | 8288 | | |
8277 | 8289 | | |
| |||
8397 | 8409 | | |
8398 | 8410 | | |
8399 | 8411 | | |
| 8412 | + | |
| 8413 | + | |
| 8414 | + | |
| 8415 | + | |
| 8416 | + | |
| 8417 | + | |
| 8418 | + | |
| 8419 | + | |
| 8420 | + | |
| 8421 | + | |
| 8422 | + | |
| 8423 | + | |
| 8424 | + | |
8400 | 8425 | | |
8401 | 8426 | | |
8402 | 8427 | | |
| |||
8970 | 8995 | | |
8971 | 8996 | | |
8972 | 8997 | | |
| 8998 | + | |
| 8999 | + | |
| 9000 | + | |
| 9001 | + | |
| 9002 | + | |
| 9003 | + | |
| 9004 | + | |
| 9005 | + | |
| 9006 | + | |
| 9007 | + | |
| 9008 | + | |
| 9009 | + | |
| 9010 | + | |
| 9011 | + | |
| 9012 | + | |
| 9013 | + | |
| 9014 | + | |
| 9015 | + | |
| 9016 | + | |
| 9017 | + | |
| 9018 | + | |
| 9019 | + | |
| 9020 | + | |
| 9021 | + | |
| 9022 | + | |
| 9023 | + | |
| 9024 | + | |
| 9025 | + | |
| 9026 | + | |
| 9027 | + | |
| 9028 | + | |
| 9029 | + | |
| 9030 | + | |
| 9031 | + | |
| 9032 | + | |
| 9033 | + | |
| 9034 | + | |
| 9035 | + | |
| 9036 | + | |
| 9037 | + | |
| 9038 | + | |
| 9039 | + | |
| 9040 | + | |
| 9041 | + | |
| 9042 | + | |
| 9043 | + | |
| 9044 | + | |
| 9045 | + | |
| 9046 | + | |
| 9047 | + | |
| 9048 | + | |
| 9049 | + | |
| 9050 | + | |
| 9051 | + | |
8973 | 9052 | | |
8974 | 9053 | | |
8975 | 9054 | | |
| |||
Lines changed: 0 additions & 72 deletions
This file was deleted.
0 commit comments