Skip to content

Commit 8d0955e

Browse files
authored
feat(metagen)!: hostcall transport (#982)
- [x] update docs - [x] HostcallTransport for fdk_rs/fdk_ts/fdk_py - [x] Reimpml fdk_py - [x] MET-815 `QueryGraph` method clash #### Migration notes - `fdk_rs`: transport construction is no longer a method on `QueryGraph` but a set of functions in th `transports` module. - `fdk_ts`: transport construction is no longer a method on `QueryGraph` but instead a static method on `Transports` class. - `fdk_py` now generates all code into `fdk.py` - Decorators now use the `handler_{fn_name}` pattern - Decorators now expect a second `Ctx` object. - `Ctx.gql` method now takes `typing.Mapping` instead of raw JSON `str` - Transport construction is no longer a method on `QueryGraph` but instead a static method on `Transports` class. --- - [x] The change comes with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [x] End-user documentation is updated to reflect the change <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Introduced enhanced GraphQL client transports that support asynchronous host calls and refined query handling, enabling more robust queries, mutations, and file upload operations. - Added new `HostcallPump` class for managing host calls and responses, improving the handling of asynchronous operations. - Expanded functionality for handling selections and query construction, including new types and methods in the `QueryGraph` class. - Updated `Cargo.toml` configurations to include workspace features for `metagen-client`, allowing for specific feature activation. - Adjusted the `typegraphUrl` format in the `hostcallCtx` for improved communication protocols. - **Refactors & Chores** - Streamlined internal architecture by consolidating transport logic and improving type mapping and dependency management across modules. - Removed legacy code and enhanced error handling and logging for increased stability. - Adjusted paths and target architecture in build scripts for consistency with updated directory structures. - **Tests & Documentation** - Expanded and reorganized test suites to verify the new client and query graph functionality, with updated configuration options detailed in the documentation. - Enhanced test cases for better coverage of new features and functionalities, including proxy primitives and selection handling. - Updated test configurations to reflect new dependencies and structural changes in the codebase. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 4d1e860 commit 8d0955e

File tree

123 files changed

+11229
-3545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+11229
-3545
lines changed

.ghjk/deno.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.ghjk/lock.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@
977977
"ty": "denoFile@v1",
978978
"key": "test-codegen",
979979
"workingDir": "./src/typegraph/specs/codegen",
980-
"envKey": "bciqbjavwy7rbire3zwlpgo2ifwzgnm6ywxqswnh6qxezwuvc4bqhrca"
980+
"envKey": "bciqgfkhptprs54tg3wl45acxctzc2lu4v2xlh3slk6w4m5g5ctysv4a"
981981
},
982982
"test-rust": {
983983
"ty": "denoFile@v1",
@@ -1129,7 +1129,7 @@
11291129
"build-tgraph-py": {
11301130
"ty": "denoFile@v1",
11311131
"key": "build-tgraph-py",
1132-
"envKey": "bciqbk2kwzvfc2c5ti6x7z2pju22i3qkhn76hei4patfnwqv6xr4umlq"
1132+
"envKey": "bciqpei32hkwk37chtbyin65e3pvaeawn6cq3ytsihyxo54ixft7yyjq"
11331133
},
11341134
"build-tgraph-ts-jsr": {
11351135
"ty": "denoFile@v1",
@@ -1139,25 +1139,25 @@
11391139
"build-tgraph-rpc": {
11401140
"ty": "denoFile@v1",
11411141
"key": "build-tgraph-rpc",
1142-
"envKey": "bciqeeh6cx5grefrnieyki54emcwuxb57ahioapdi6opi47dyg6hxgki"
1142+
"envKey": "bciqn7hev7ej5zg7cixajsoe5kpouah36nmzt2o7vsxnxgl6tou4z7cy"
11431143
},
11441144
"build-tgraph-ts": {
11451145
"ty": "denoFile@v1",
11461146
"key": "build-tgraph-ts",
1147-
"envKey": "bciqpj74st4da74tgeqyzsppxpvncbekb65n2ow6tbcsfdcrdyq6smxy"
1147+
"envKey": "bciqdxfpgv43gmtbphf7wdom7n6wv3xvhrtexnqrokaok6ljbccma5by"
11481148
},
11491149
"build-tgraph-ts-node": {
11501150
"ty": "denoFile@v1",
11511151
"key": "build-tgraph-ts-node",
11521152
"dependsOn": [
11531153
"build-tgraph-ts"
11541154
],
1155-
"envKey": "bciqpj74st4da74tgeqyzsppxpvncbekb65n2ow6tbcsfdcrdyq6smxy"
1155+
"envKey": "bciqdxfpgv43gmtbphf7wdom7n6wv3xvhrtexnqrokaok6ljbccma5by"
11561156
},
11571157
"build-tgraph-core": {
11581158
"ty": "denoFile@v1",
11591159
"key": "build-tgraph-core",
1160-
"envKey": "bciqlndcuvoua6nwkocqwfmugmbzrpk5yfr5wfv7mzazugh3ofyptv2a"
1160+
"envKey": "bciqg4j54df6d7tkfqx5g6fwnhuznqtrveerazjqzrtykguzhefcljpa"
11611161
},
11621162
"build-tgraph": {
11631163
"ty": "denoFile@v1",
@@ -1762,7 +1762,7 @@
17621762
}
17631763
]
17641764
},
1765-
"bciqlndcuvoua6nwkocqwfmugmbzrpk5yfr5wfv7mzazugh3ofyptv2a": {
1765+
"bciqg4j54df6d7tkfqx5g6fwnhuznqtrveerazjqzrtykguzhefcljpa": {
17661766
"provides": [
17671767
{
17681768
"ty": "posix.envVar",
@@ -1800,7 +1800,7 @@
18001800
}
18011801
]
18021802
},
1803-
"bciqbk2kwzvfc2c5ti6x7z2pju22i3qkhn76hei4patfnwqv6xr4umlq": {
1803+
"bciqpei32hkwk37chtbyin65e3pvaeawn6cq3ytsihyxo54ixft7yyjq": {
18041804
"provides": [
18051805
{
18061806
"ty": "posix.envVar",
@@ -1838,7 +1838,7 @@
18381838
}
18391839
]
18401840
},
1841-
"bciqeeh6cx5grefrnieyki54emcwuxb57ahioapdi6opi47dyg6hxgki": {
1841+
"bciqn7hev7ej5zg7cixajsoe5kpouah36nmzt2o7vsxnxgl6tou4z7cy": {
18421842
"provides": [
18431843
{
18441844
"ty": "posix.envVar",
@@ -1876,7 +1876,7 @@
18761876
}
18771877
]
18781878
},
1879-
"bciqpj74st4da74tgeqyzsppxpvncbekb65n2ow6tbcsfdcrdyq6smxy": {
1879+
"bciqdxfpgv43gmtbphf7wdom7n6wv3xvhrtexnqrokaok6ljbccma5by": {
18801880
"provides": [
18811881
{
18821882
"ty": "posix.envVar",
@@ -1886,7 +1886,7 @@
18861886
{
18871887
"ty": "posix.envVar",
18881888
"key": "TYPEGRAPH_VERSION",
1889-
"val": "0.0.3"
1889+
"val": "0.0.4"
18901890
},
18911891
{
18921892
"ty": "posix.envVar",

Cargo.lock

Lines changed: 182 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)