diff --git a/.changeset/@graphql-mesh_fusion-composition-7838-dependencies.md b/.changeset/@graphql-mesh_fusion-composition-7838-dependencies.md new file mode 100644 index 0000000000000..f5af647466a65 --- /dev/null +++ b/.changeset/@graphql-mesh_fusion-composition-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/fusion-composition": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/stitching-directives@^3.1.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitching-directives/v/3.1.9) (from `^3.1.8`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_fusion-runtime-7838-dependencies.md b/.changeset/@graphql-mesh_fusion-runtime-7838-dependencies.md new file mode 100644 index 0000000000000..33f9e58ea15b4 --- /dev/null +++ b/.changeset/@graphql-mesh_fusion-runtime-7838-dependencies.md @@ -0,0 +1,9 @@ +--- +"@graphql-mesh/fusion-runtime": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/federation@^2.2.21` ↗︎](https://www.npmjs.com/package/@graphql-tools/federation/v/2.2.21) (from `^2.2.19`, in `dependencies`) + - Updated dependency [`@graphql-tools/stitch@^9.2.17` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitch/v/9.2.17) (from `^9.2.15`, in `dependencies`) + - Updated dependency [`@graphql-tools/stitching-directives@^3.1.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitching-directives/v/3.1.9) (from `^3.1.8`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_graphql-7838-dependencies.md b/.changeset/@graphql-mesh_graphql-7838-dependencies.md new file mode 100644 index 0000000000000..46a8211b8ec07 --- /dev/null +++ b/.changeset/@graphql-mesh_graphql-7838-dependencies.md @@ -0,0 +1,7 @@ +--- +"@graphql-mesh/graphql": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/federation@^2.2.21` ↗︎](https://www.npmjs.com/package/@graphql-tools/federation/v/2.2.21) (from `^2.2.19`, in `dependencies`) + - Updated dependency [`@graphql-tools/url-loader@^8.0.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/url-loader/v/8.0.9) (from `^8.0.8`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_grpc-7838-dependencies.md b/.changeset/@graphql-mesh_grpc-7838-dependencies.md new file mode 100644 index 0000000000000..6ce9811c425cb --- /dev/null +++ b/.changeset/@graphql-mesh_grpc-7838-dependencies.md @@ -0,0 +1,20 @@ +--- +"@graphql-mesh/grpc": patch +--- +dependencies updates: + - Added dependency [`@graphql-mesh/transport-grpc@^0.0.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/transport-grpc/v/0.0.0) (to `dependencies`) + - Added dependency [`@omnigraph/grpc@^0.0.0` ↗︎](https://www.npmjs.com/package/@omnigraph/grpc/v/0.0.0) (to `dependencies`) + - Removed dependency [`@ardatan/grpc-reflection-js@^0.0.2` ↗︎](https://www.npmjs.com/package/@ardatan/grpc-reflection-js/v/0.0.2) (from `dependencies`) + - Removed dependency [`@graphql-mesh/string-interpolation@^0.5.6` ↗︎](https://www.npmjs.com/package/@graphql-mesh/string-interpolation/v/0.5.6) (from `dependencies`) + - Removed dependency [`@graphql-mesh/transport-common@^0.7.11` ↗︎](https://www.npmjs.com/package/@graphql-mesh/transport-common/v/0.7.11) (from `dependencies`) + - Removed dependency [`@grpc/grpc-js@^1.1.7` ↗︎](https://www.npmjs.com/package/@grpc/grpc-js/v/1.1.7) (from `dependencies`) + - Removed dependency [`@grpc/proto-loader@^0.7.8` ↗︎](https://www.npmjs.com/package/@grpc/proto-loader/v/0.7.8) (from `dependencies`) + - Removed dependency [`globby@^11.1.0` ↗︎](https://www.npmjs.com/package/globby/v/11.1.0) (from `dependencies`) + - Removed dependency [`graphql-compose@^9.0.11` ↗︎](https://www.npmjs.com/package/graphql-compose/v/9.0.11) (from `dependencies`) + - Removed dependency [`graphql-scalars@^1.22.4` ↗︎](https://www.npmjs.com/package/graphql-scalars/v/1.22.4) (from `dependencies`) + - Removed dependency [`lodash.get@^4.4.2` ↗︎](https://www.npmjs.com/package/lodash.get/v/4.4.2) (from `dependencies`) + - Removed dependency [`lodash.has@^4.5.2` ↗︎](https://www.npmjs.com/package/lodash.has/v/4.5.2) (from `dependencies`) + - Removed dependency [`long@4.0.0` ↗︎](https://www.npmjs.com/package/long/v/4.0.0) (from `dependencies`) + - Removed dependency [`protobufjs@^7.2.5` ↗︎](https://www.npmjs.com/package/protobufjs/v/7.2.5) (from `dependencies`) + - Removed dependency [`@graphql-mesh/cross-helpers@^0.4.7` ↗︎](https://www.npmjs.com/package/@graphql-mesh/cross-helpers/v/0.4.7) (from `peerDependencies`) + - Removed dependency [`@graphql-tools/utils@^10.5.5` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.5.5) (from `peerDependencies`) diff --git a/.changeset/@graphql-mesh_merger-federation-7838-dependencies.md b/.changeset/@graphql-mesh_merger-federation-7838-dependencies.md new file mode 100644 index 0000000000000..2eb85f97cce23 --- /dev/null +++ b/.changeset/@graphql-mesh_merger-federation-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/merger-federation": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_merger-stitching-7838-dependencies.md b/.changeset/@graphql-mesh_merger-stitching-7838-dependencies.md new file mode 100644 index 0000000000000..1080a65734646 --- /dev/null +++ b/.changeset/@graphql-mesh_merger-stitching-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/merger-stitching": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/stitch@^9.2.17` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitch/v/9.2.17) (from `^9.2.15`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_plugin-opentelemetry-7838-dependencies.md b/.changeset/@graphql-mesh_plugin-opentelemetry-7838-dependencies.md new file mode 100644 index 0000000000000..f3f6f388fefa7 --- /dev/null +++ b/.changeset/@graphql-mesh_plugin-opentelemetry-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/plugin-opentelemetry": patch +--- +dependencies updates: + - Added dependency [`@graphql-hive/gateway@^1.4.1` ↗︎](https://www.npmjs.com/package/@graphql-hive/gateway/v/1.4.1) (to `dependencies`) + - Removed dependency [`@graphql-mesh/serve-runtime@^1.2.4` ↗︎](https://www.npmjs.com/package/@graphql-mesh/serve-runtime/v/1.2.4) (from `dependencies`) diff --git a/.changeset/@graphql-mesh_plugin-operation-headers-7838-dependencies.md b/.changeset/@graphql-mesh_plugin-operation-headers-7838-dependencies.md new file mode 100644 index 0000000000000..60874041aa9a2 --- /dev/null +++ b/.changeset/@graphql-mesh_plugin-operation-headers-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/plugin-operation-headers": patch +--- +dependencies updates: + - Added dependency [`@graphql-hive/gateway@^1.4.1` ↗︎](https://www.npmjs.com/package/@graphql-hive/gateway/v/1.4.1) (to `peerDependencies`) + - Removed dependency [`@graphql-mesh/serve-runtime@^1.2.4` ↗︎](https://www.npmjs.com/package/@graphql-mesh/serve-runtime/v/1.2.4) (from `peerDependencies`) diff --git a/.changeset/@graphql-mesh_plugin-prometheus-7838-dependencies.md b/.changeset/@graphql-mesh_plugin-prometheus-7838-dependencies.md new file mode 100644 index 0000000000000..5da9c670619e3 --- /dev/null +++ b/.changeset/@graphql-mesh_plugin-prometheus-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/plugin-prometheus": patch +--- +dependencies updates: + - Added dependency [`@graphql-hive/gateway@^1.4.1` ↗︎](https://www.npmjs.com/package/@graphql-hive/gateway/v/1.4.1) (to `dependencies`) + - Removed dependency [`@graphql-mesh/serve-runtime@^1.2.4` ↗︎](https://www.npmjs.com/package/@graphql-mesh/serve-runtime/v/1.2.4) (from `dependencies`) diff --git a/.changeset/@graphql-mesh_postgraphile-7838-dependencies.md b/.changeset/@graphql-mesh_postgraphile-7838-dependencies.md new file mode 100644 index 0000000000000..b72fbfa57b31e --- /dev/null +++ b/.changeset/@graphql-mesh_postgraphile-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/postgraphile": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_runtime-7838-dependencies.md b/.changeset/@graphql-mesh_runtime-7838-dependencies.md new file mode 100644 index 0000000000000..8326f103f1a7a --- /dev/null +++ b/.changeset/@graphql-mesh_runtime-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/runtime": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_supergraph-7838-dependencies.md b/.changeset/@graphql-mesh_supergraph-7838-dependencies.md new file mode 100644 index 0000000000000..b6c19ea2f601a --- /dev/null +++ b/.changeset/@graphql-mesh_supergraph-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/supergraph": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/federation@^2.2.21` ↗︎](https://www.npmjs.com/package/@graphql-tools/federation/v/2.2.21) (from `^2.2.19`, in `dependencies`) + - Updated dependency [`@graphql-tools/url-loader@^8.0.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/url-loader/v/8.0.9) (from `^8.0.8`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-encapsulate-7838-dependencies.md b/.changeset/@graphql-mesh_transform-encapsulate-7838-dependencies.md new file mode 100644 index 0000000000000..24c1ab4cf61eb --- /dev/null +++ b/.changeset/@graphql-mesh_transform-encapsulate-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-encapsulate": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-federation-7838-dependencies.md b/.changeset/@graphql-mesh_transform-federation-7838-dependencies.md new file mode 100644 index 0000000000000..3b75a8b880f00 --- /dev/null +++ b/.changeset/@graphql-mesh_transform-federation-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-federation": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/stitching-directives@^3.1.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitching-directives/v/3.1.9) (from `^3.1.8`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-filter-schema-7838-dependencies.md b/.changeset/@graphql-mesh_transform-filter-schema-7838-dependencies.md new file mode 100644 index 0000000000000..c9f4057c4434f --- /dev/null +++ b/.changeset/@graphql-mesh_transform-filter-schema-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-filter-schema": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-hive-7838-dependencies.md b/.changeset/@graphql-mesh_transform-hive-7838-dependencies.md new file mode 100644 index 0000000000000..1e67983d44107 --- /dev/null +++ b/.changeset/@graphql-mesh_transform-hive-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/transform-hive": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-hoist-field-7838-dependencies.md b/.changeset/@graphql-mesh_transform-hoist-field-7838-dependencies.md new file mode 100644 index 0000000000000..5967d741a2a91 --- /dev/null +++ b/.changeset/@graphql-mesh_transform-hoist-field-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-hoist-field": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-naming-convention-7838-dependencies.md b/.changeset/@graphql-mesh_transform-naming-convention-7838-dependencies.md new file mode 100644 index 0000000000000..a31f27a7eadc9 --- /dev/null +++ b/.changeset/@graphql-mesh_transform-naming-convention-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-naming-convention": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-prefix-7838-dependencies.md b/.changeset/@graphql-mesh_transform-prefix-7838-dependencies.md new file mode 100644 index 0000000000000..0ccb42dca7160 --- /dev/null +++ b/.changeset/@graphql-mesh_transform-prefix-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-prefix": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-rename-7838-dependencies.md b/.changeset/@graphql-mesh_transform-rename-7838-dependencies.md new file mode 100644 index 0000000000000..fdce9dddcc753 --- /dev/null +++ b/.changeset/@graphql-mesh_transform-rename-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-rename": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/wrap@^10.0.12` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/10.0.12) (from `^10.0.11`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transform-type-merging-7838-dependencies.md b/.changeset/@graphql-mesh_transform-type-merging-7838-dependencies.md new file mode 100644 index 0000000000000..a5f1bbada2695 --- /dev/null +++ b/.changeset/@graphql-mesh_transform-type-merging-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/transform-type-merging": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) + - Updated dependency [`@graphql-tools/stitching-directives@^3.1.9` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitching-directives/v/3.1.9) (from `^3.1.8`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transport-common-7838-dependencies.md b/.changeset/@graphql-mesh_transport-common-7838-dependencies.md new file mode 100644 index 0000000000000..d29c74d279e39 --- /dev/null +++ b/.changeset/@graphql-mesh_transport-common-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/transport-common": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transport-mysql-7838-dependencies.md b/.changeset/@graphql-mesh_transport-mysql-7838-dependencies.md new file mode 100644 index 0000000000000..996a487cae345 --- /dev/null +++ b/.changeset/@graphql-mesh_transport-mysql-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/transport-mysql": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_transport-neo4j-7838-dependencies.md b/.changeset/@graphql-mesh_transport-neo4j-7838-dependencies.md new file mode 100644 index 0000000000000..90db213578541 --- /dev/null +++ b/.changeset/@graphql-mesh_transport-neo4j-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/transport-neo4j": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_types-7838-dependencies.md b/.changeset/@graphql-mesh_types-7838-dependencies.md new file mode 100644 index 0000000000000..395832d9a5bcd --- /dev/null +++ b/.changeset/@graphql-mesh_types-7838-dependencies.md @@ -0,0 +1,6 @@ +--- +"@graphql-mesh/types": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/batch-delegate@^9.0.10` ↗︎](https://www.npmjs.com/package/@graphql-tools/batch-delegate/v/9.0.10) (from `^9.0.9`, in `dependencies`) + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@graphql-mesh_utils-7838-dependencies.md b/.changeset/@graphql-mesh_utils-7838-dependencies.md new file mode 100644 index 0000000000000..c9202b42058c5 --- /dev/null +++ b/.changeset/@graphql-mesh_utils-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@graphql-mesh/utils": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@omnigraph_json-schema-7838-dependencies.md b/.changeset/@omnigraph_json-schema-7838-dependencies.md new file mode 100644 index 0000000000000..9723a8eec7ec1 --- /dev/null +++ b/.changeset/@omnigraph_json-schema-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@omnigraph/json-schema": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@omnigraph_mysql-7838-dependencies.md b/.changeset/@omnigraph_mysql-7838-dependencies.md new file mode 100644 index 0000000000000..c51aaf60a6293 --- /dev/null +++ b/.changeset/@omnigraph_mysql-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@omnigraph/mysql": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@omnigraph_neo4j-7838-dependencies.md b/.changeset/@omnigraph_neo4j-7838-dependencies.md new file mode 100644 index 0000000000000..5f1e4719b1392 --- /dev/null +++ b/.changeset/@omnigraph_neo4j-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@omnigraph/neo4j": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@omnigraph_odata-7838-dependencies.md b/.changeset/@omnigraph_odata-7838-dependencies.md new file mode 100644 index 0000000000000..6c41470a1f254 --- /dev/null +++ b/.changeset/@omnigraph_odata-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@omnigraph/odata": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@omnigraph_openapi-7838-dependencies.md b/.changeset/@omnigraph_openapi-7838-dependencies.md new file mode 100644 index 0000000000000..3677c3e6c4b53 --- /dev/null +++ b/.changeset/@omnigraph_openapi-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@omnigraph/openapi": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@omnigraph_raml-7838-dependencies.md b/.changeset/@omnigraph_raml-7838-dependencies.md new file mode 100644 index 0000000000000..6fb4a811f2aa0 --- /dev/null +++ b/.changeset/@omnigraph_raml-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@omnigraph/raml": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.changeset/@omnigraph_sqlite-7838-dependencies.md b/.changeset/@omnigraph_sqlite-7838-dependencies.md new file mode 100644 index 0000000000000..b9ac72a5a2b73 --- /dev/null +++ b/.changeset/@omnigraph_sqlite-7838-dependencies.md @@ -0,0 +1,5 @@ +--- +"@omnigraph/sqlite": patch +--- +dependencies updates: + - Updated dependency [`@graphql-tools/delegate@^10.0.28` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/10.0.28) (from `^10.0.27`, in `dependencies`) diff --git a/.eslintrc.json b/.eslintrc.json index dce1457ce0e7f..503dc953e4631 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -63,7 +63,7 @@ } }, { - "files": ["e2e/**/*", "packages/serve-cli/**/*"], + "files": ["e2e/**/*"], "rules": { "import/no-nodejs-modules": "off" } diff --git a/.gitignore b/.gitignore index 38361546e641f..307424c9996de 100644 --- a/.gitignore +++ b/.gitignore @@ -30,10 +30,4 @@ newrelic_agent.log !.yarn/versions .mise.toml docker/supergraph.graphql -sea-prep.blob -mesh-serve -packages/serve-cli/*/uws_* -packages/serve-cli/bundle-binary -packages/hive-gateway/hive-gateway -packages/hive-gateway/*/uws_* -packages/hive-gateway/bundle-binary + diff --git a/e2e/auto-type-merging/package.json b/e2e/auto-type-merging/package.json index 0e40a1c1084ef..d25b67cac2188 100644 --- a/e2e/auto-type-merging/package.json +++ b/e2e/auto-type-merging/package.json @@ -2,7 +2,7 @@ "name": "@e2e/auto-type-merging", "private": true, "devDependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0", "graphql-yoga": "^5.7.0" } diff --git a/e2e/cjs-project/package.json b/e2e/cjs-project/package.json index 68da3cb117e2d..6a1d28e42cf7f 100644 --- a/e2e/cjs-project/package.json +++ b/e2e/cjs-project/package.json @@ -3,7 +3,7 @@ "type": "commonjs", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/compose-to-output/package.json b/e2e/compose-to-output/package.json index c2f2d6cc8d2cc..f5e5b4fd397d5 100644 --- a/e2e/compose-to-output/package.json +++ b/e2e/compose-to-output/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/esm-config-in-cjs-project/package.json b/e2e/esm-config-in-cjs-project/package.json index 2b9b149500c54..50732cd20b890 100644 --- a/e2e/esm-config-in-cjs-project/package.json +++ b/e2e/esm-config-in-cjs-project/package.json @@ -3,7 +3,7 @@ "type": "commonjs", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/esm-project/package.json b/e2e/esm-project/package.json index a6e653db50348..881f58fa2477f 100644 --- a/e2e/esm-project/package.json +++ b/e2e/esm-project/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/extra-fields/package.json b/e2e/extra-fields/package.json index b985eb83b9a36..02cb1694f2b3a 100644 --- a/e2e/extra-fields/package.json +++ b/e2e/extra-fields/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0", "graphql-yoga": "5.7.0" } diff --git a/e2e/federation-batching-plan/mesh.config.ts b/e2e/federation-batching-plan/mesh.config.ts index f68954748ae62..9fa9e6513264f 100644 --- a/e2e/federation-batching-plan/mesh.config.ts +++ b/e2e/federation-batching-plan/mesh.config.ts @@ -1,6 +1,6 @@ import { print } from 'graphql'; -import { defineConfig } from '@graphql-mesh/serve-cli'; -import type { GatewayPlugin } from '@graphql-mesh/serve-runtime'; +import { defineConfig } from '@graphql-hive/gateway'; +import type { GatewayPlugin } from '@graphql-hive/gateway'; export function useExplainQueryPlan(): GatewayPlugin { const plans = new WeakMap< diff --git a/e2e/federation-batching-plan/package.json b/e2e/federation-batching-plan/package.json index 40a5bf4a88408..a0f4e5edad3ca 100644 --- a/e2e/federation-batching-plan/package.json +++ b/e2e/federation-batching-plan/package.json @@ -4,7 +4,7 @@ "dependencies": { "@apollo/server": "^4.10.3", "@apollo/subgraph": "^2.7.2", - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0" } } diff --git a/e2e/federation-example/package.json b/e2e/federation-example/package.json index 18b0a7d78f3c2..9fec48a6b9e86 100644 --- a/e2e/federation-example/package.json +++ b/e2e/federation-example/package.json @@ -4,6 +4,6 @@ "devDependencies": { "@apollo/server": "^4.10.3", "@apollo/subgraph": "^2.7.2", - "@graphql-mesh/serve-cli": "^1.4.0" + "@graphql-hive/gateway": "^1.4.1" } } diff --git a/e2e/federation-mixed/package.json b/e2e/federation-mixed/package.json index 0438b4a4d23f0..82e35f582df24 100644 --- a/e2e/federation-mixed/package.json +++ b/e2e/federation-mixed/package.json @@ -4,7 +4,7 @@ "devDependencies": { "@apollo/server": "^4.10.3", "@apollo/subgraph": "^2.7.2", - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "fets": "^0.8.1" } } diff --git a/e2e/federation-subscriptions-passthrough/gateway.config.ts b/e2e/federation-subscriptions-passthrough/gateway.config.ts index 4526833248eeb..cd7a2db114fb1 100644 --- a/e2e/federation-subscriptions-passthrough/gateway.config.ts +++ b/e2e/federation-subscriptions-passthrough/gateway.config.ts @@ -2,7 +2,7 @@ import { defineConfig, type HTTPCallbackTransportOptions, type WSTransportOptions, -} from '@graphql-mesh/serve-cli'; +} from '@graphql-hive/gateway'; export const gatewayConfig = defineConfig({ webhooks: true, diff --git a/e2e/federation-subscriptions-passthrough/package.json b/e2e/federation-subscriptions-passthrough/package.json index 93d7d978f0771..67f9294752968 100644 --- a/e2e/federation-subscriptions-passthrough/package.json +++ b/e2e/federation-subscriptions-passthrough/package.json @@ -4,7 +4,7 @@ "devDependencies": { "@apollo/server": "^4.10.3", "@apollo/subgraph": "^2.7.2", - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "@repeaterjs/repeater": "^3.0.6", "@types/express": "^5.0.0", "@types/ws": "^8", diff --git a/e2e/file-upload/package.json b/e2e/file-upload/package.json index 0f0b1cc7c8dd6..b0de4c58439ab 100644 --- a/e2e/file-upload/package.json +++ b/e2e/file-upload/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "@graphql-tools/schema": "^10.0.6", "graphql": "16.9.0" } diff --git a/e2e/grpc-example/__snapshots__/grpc-example.test.ts.snap b/e2e/grpc-example/__snapshots__/grpc-example.test.ts.snap new file mode 100644 index 0000000000000..5dc32bb5ff3fe --- /dev/null +++ b/e2e/grpc-example/__snapshots__/grpc-example.test.ts.snap @@ -0,0 +1,462 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`gRPC Example fetches movies by cast as a subscription correctly: 0 1`] = ` +{ + "data": { + "exampleSearchMoviesByCast": { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Jeremy Renner", + ], + "name": "Mission: Impossible Rogue Nation", + "rating": 0.9700000286102295, + "year": 0, + }, + }, +} +`; + +exports[`gRPC Example fetches movies by cast as a subscription correctly: 1 1`] = ` +{ + "data": { + "exampleSearchMoviesByCast": { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Henry Cavill", + ], + "name": "Mission: Impossible - Fallout", + "rating": 0.9300000071525574, + "year": 0, + }, + }, +} +`; + +exports[`gRPC Example generates the correct schema 1`] = ` +" +schema + @link(url: "https://specs.apollo.dev/link/v1.0") + @link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION) + + + + + + @link( + url: "https://the-guild.dev/graphql/mesh/spec/v1.0" + import: ["@grpcMethod", "@grpcConnectivityState", "@enum", "@grpcRootJson", "@transport", "@source", "@extraSchemaDefinitionDirective"] +) +{ + query: Query + + subscription: Subscription +} + + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field( + graph: join__Graph + requires: join__FieldSet + provides: join__FieldSet + type: String + external: Boolean + override: String + usedOverridden: Boolean + ) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements( + graph: join__Graph! + interface: String! + ) repeatable on OBJECT | INTERFACE + + directive @join__type( + graph: join__Graph! + key: join__FieldSet + extension: Boolean! = false + resolvable: Boolean! = true + isInterfaceObject: Boolean! = false + ) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + scalar join__FieldSet + + + directive @link( + url: String + as: String + for: link__Purpose + import: [link__Import] + ) repeatable on SCHEMA + + scalar link__Import + + enum link__Purpose { + """ + \`SECURITY\` features provide metadata necessary to securely resolve fields. + """ + SECURITY + + """ + \`EXECUTION\` features provide metadata necessary for operation execution. + """ + EXECUTION + } + + + + + + + +enum join__Graph { + MOVIES @join__graph(name: "movies", url: "localhost:") +} + +directive @grpcMethod( + subgraph: String + rootJsonName: String + objPath: String + methodName: String + responseStream: Boolean +) repeatable on FIELD_DEFINITION + +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) repeatable on FIELD_DEFINITION + +directive @enum(subgraph: String, value: String) repeatable on ENUM_VALUE + +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT + +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +directive @source(name: String!, type: String, subgraph: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @extraSchemaDefinitionDirective(directives: _DirectiveExtensions) repeatable on OBJECT + +""" +The \`BigInt\` scalar type represents non-fractional signed whole numeric values. +""" +scalar BigInt @join__type(graph: MOVIES) + +scalar ObjMap @join__type(graph: MOVIES) + +scalar _DirectiveExtensions @join__type(graph: MOVIES) + +type Query @grpcRootJson( + subgraph: "movies" + name: "Root0" + rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int64\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}" +) @extraSchemaDefinitionDirective( + directives: {transport: [{subgraph: "movies", kind: "grpc", location: "localhost:", options: {requestTimeout: 200000, metaData: {someKey: "someValue", connection_type: "{context.headers.connection}"}}}]} +) @join__type(graph: MOVIES) { + """ + get all movies + """ + exampleGetMovies(input: MovieRequest_Input) : MoviesResult @grpcMethod( + subgraph: "movies" + rootJsonName: "Root0" + objPath: "Example" + methodName: "GetMovies" + responseStream: false + ) @source(name: "Example_GetMovies", type: "MoviesResult", subgraph: "movies") + """ + search movies by the name of the cast + """ + exampleSearchMoviesByCast(input: SearchByCastRequest_Input) : [Movie] @grpcMethod( + subgraph: "movies" + rootJsonName: "Root0" + objPath: "Example" + methodName: "SearchMoviesByCast" + responseStream: true + ) @source(name: "Example_SearchMoviesByCast", type: "[Movie]", subgraph: "movies") + exampleConnectivityState(tryToConnect: Boolean) : ConnectivityState @grpcConnectivityState(subgraph: "movies", rootJsonName: "Root0", objPath: "Example") @source( + name: "Example_connectivityState" + type: "ConnectivityState" + subgraph: "movies" + ) + """ + get all movies + """ + anotherExampleGetMovies(input: MovieRequest_Input) : MoviesResult @grpcMethod( + subgraph: "movies" + rootJsonName: "Root0" + objPath: "AnotherExample" + methodName: "GetMovies" + responseStream: false + ) @source(name: "AnotherExample_GetMovies", type: "MoviesResult", subgraph: "movies") + """ + search movies by the name of the cast + """ + anotherExampleSearchMoviesByCast(input: SearchByCastRequest_Input) : [Movie] @grpcMethod( + subgraph: "movies" + rootJsonName: "Root0" + objPath: "AnotherExample" + methodName: "SearchMoviesByCast" + responseStream: true + ) @source( + name: "AnotherExample_SearchMoviesByCast" + type: "[Movie]" + subgraph: "movies" + ) + anotherExampleConnectivityState(tryToConnect: Boolean) : ConnectivityState @grpcConnectivityState(subgraph: "movies", rootJsonName: "Root0", objPath: "AnotherExample") @source( + name: "AnotherExample_connectivityState" + type: "ConnectivityState" + subgraph: "movies" + ) +} + +""" +movie result message, contains list of movies +""" +type MoviesResult @join__type(graph: MOVIES) { + """ + list of movies + """ + result: [Movie] +} + +""" +movie message payload +""" +type Movie @join__type(graph: MOVIES) { + name: String + year: BigInt + rating: Float + """ + list of cast + """ + cast: [String] + time: google__protobuf__Timestamp + genre: Genre +} + +type google__protobuf__Timestamp @join__type(graph: MOVIES) { + seconds: BigInt + nanos: Int +} + +type Subscription @join__type(graph: MOVIES) { + """ + search movies by the name of the cast + """ + exampleSearchMoviesByCast(input: SearchByCastRequest_Input) : Movie @grpcMethod( + subgraph: "movies" + rootJsonName: "Root0" + objPath: "Example" + methodName: "SearchMoviesByCast" + responseStream: true + ) @source(name: "Example_SearchMoviesByCast", type: "Movie", subgraph: "movies") + """ + search movies by the name of the cast + """ + anotherExampleSearchMoviesByCast(input: SearchByCastRequest_Input) : Movie @grpcMethod( + subgraph: "movies" + rootJsonName: "Root0" + objPath: "AnotherExample" + methodName: "SearchMoviesByCast" + responseStream: true + ) @source(name: "AnotherExample_SearchMoviesByCast", type: "Movie", subgraph: "movies") +} + +enum ConnectivityState @join__type(graph: MOVIES) { + IDLE @join__enumValue(graph: MOVIES) + CONNECTING @join__enumValue(graph: MOVIES) + READY @join__enumValue(graph: MOVIES) + TRANSIENT_FAILURE @join__enumValue(graph: MOVIES) + SHUTDOWN @join__enumValue(graph: MOVIES) +} + +enum Genre @join__type(graph: MOVIES) { + UNSPECIFIED @enum(subgraph: "movies", value: "0") @join__enumValue(graph: MOVIES) + ACTION @enum(subgraph: "movies", value: "1") @join__enumValue(graph: MOVIES) + DRAMA @enum(subgraph: "movies", value: "2") @join__enumValue(graph: MOVIES) +} + +input MovieRequest_Input @join__type(graph: MOVIES) { + movie: Movie_Input +} + +""" +movie message payload +""" +input Movie_Input @join__type(graph: MOVIES) { + name: String + year: BigInt + rating: Float + """ + list of cast + """ + cast: [String] + time: google__protobuf__Timestamp_Input + genre: Genre +} + +input google__protobuf__Timestamp_Input @join__type(graph: MOVIES) { + seconds: BigInt + nanos: Int +} + +input SearchByCastRequest_Input @join__type(graph: MOVIES) { + castName: String +} + +input TransportOptions @join__type(graph: MOVIES) { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHttps: Boolean @source(name: "useHTTPS", type: "Boolean", subgraph: "movies") + metaData: ObjMap +} + +input GrpcCredentialsSsl @join__type(graph: MOVIES) { + rootCa: String @source(name: "rootCA", type: "String", subgraph: "movies") + certChain: String + privateKey: String +} + +" +`; + +exports[`gRPC Example gets movies correctly: get-movies-grpc-example-result 1`] = ` +{ + "data": { + "exampleGetMovies": { + "result": [ + { + "cast": [ + "Leonardo DiCaprio", + "Jonah Hill", + "Margot Robbie", + ], + "name": "The Wolf of Wall Street", + "rating": 0.7799999713897705, + "time": { + "seconds": 1608422400000, + }, + "year": 0, + }, + ], + }, + }, +} +`; + +exports[`gRPC Example streams movies by cast correctly: 0 1`] = ` +{ + "data": { + "exampleSearchMoviesByCast": [], + }, +} +`; + +exports[`gRPC Example streams movies by cast correctly: 1 1`] = ` +{ + "data": { + "exampleSearchMoviesByCast": [ + { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Jeremy Renner", + ], + "name": "Mission: Impossible Rogue Nation", + "rating": 0.9700000286102295, + "year": 0, + }, + ], + }, +} +`; + +exports[`gRPC Example streams movies by cast correctly: 2 1`] = ` +{ + "data": { + "exampleSearchMoviesByCast": [ + { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Jeremy Renner", + ], + "name": "Mission: Impossible Rogue Nation", + "rating": 0.9700000286102295, + "year": 0, + }, + { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Henry Cavill", + ], + "name": "Mission: Impossible - Fallout", + "rating": 0.9300000071525574, + "year": 0, + }, + ], + }, +} +`; + +exports[`gRPC Example streams movies by cast correctly: 3 1`] = ` +{ + "data": { + "exampleSearchMoviesByCast": [ + { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Jeremy Renner", + ], + "name": "Mission: Impossible Rogue Nation", + "rating": 0.9700000286102295, + "year": 0, + }, + { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Henry Cavill", + ], + "name": "Mission: Impossible - Fallout", + "rating": 0.9300000071525574, + "year": 0, + }, + null, + ], + }, +} +`; + +exports[`gRPC Example streams movies by cast correctly: 4 1`] = ` +{ + "data": { + "exampleSearchMoviesByCast": [ + { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Jeremy Renner", + ], + "name": "Mission: Impossible Rogue Nation", + "rating": 0.9700000286102295, + "year": 0, + }, + { + "cast": [ + "Tom Cruise", + "Simon Pegg", + "Henry Cavill", + ], + "name": "Mission: Impossible - Fallout", + "rating": 0.9300000071525574, + "year": 0, + }, + null, + ], + }, +} +`; diff --git a/e2e/grpc-example/grpc-example.test.ts b/e2e/grpc-example/grpc-example.test.ts new file mode 100644 index 0000000000000..50cff6af3615e --- /dev/null +++ b/e2e/grpc-example/grpc-example.test.ts @@ -0,0 +1,94 @@ +import { inspect } from 'util'; +import { parse } from 'graphql'; +import { createTenv, type Service } from '@e2e/tenv'; +import { handleSerializedErrors } from '@e2e/utils/handleSerializedErrors'; +import { buildHTTPExecutor } from '@graphql-tools/executor-http'; +import { isAsyncIterable } from '@graphql-tools/utils'; + +describe('gRPC Example', () => { + const { compose, serve, service } = createTenv(__dirname); + let movies: Service; + beforeAll(async () => { + movies = await service('movies'); + }); + it('generates the correct schema', async () => { + const { result } = await compose({ services: [movies], maskServicePorts: true }); + expect(result).toMatchSnapshot(); + }); + it('gets movies correctly', async () => { + const { output } = await compose({ services: [movies], output: 'graphql' }); + const { execute } = await serve({ supergraph: output }); + const query = /* GraphQL */ ` + query GetMovies { + exampleGetMovies(input: { movie: { genre: DRAMA, year: 2015 } }) { + result { + name + year + rating + cast + time { + seconds + } + } + } + } + `; + await expect(execute({ query })).resolves.toMatchSnapshot('get-movies-grpc-example-result'); + }); + it('streams movies by cast correctly', async () => { + const { output } = await compose({ services: [movies], output: 'graphql' }); + const { port } = await serve({ supergraph: output }); + const executor = buildHTTPExecutor({ + endpoint: `http://localhost:${port}/graphql`, + }); + const document = parse(/* GraphQL */ ` + query SearchMoviesByCast { + exampleSearchMoviesByCast(input: { castName: "Tom Cruise" }) @stream { + name + year + rating + cast + } + } + `); + const result = await executor({ document }); + if (!isAsyncIterable(result)) { + handleSerializedErrors(result); + throw new Error('Expected an async iterable but received ' + inspect(result)); + } + let i = 0; + for await (const item of result) { + handleSerializedErrors(item); + expect(item).toMatchSnapshot(i.toString()); + i++; + } + }); + it('fetches movies by cast as a subscription correctly', async () => { + const { output } = await compose({ services: [movies], output: 'graphql' }); + const { port } = await serve({ supergraph: output }); + const executor = buildHTTPExecutor({ + endpoint: `http://localhost:${port}/graphql`, + }); + const document = parse(/* GraphQL */ ` + subscription SearchMoviesByCast { + exampleSearchMoviesByCast(input: { castName: "Tom Cruise" }) { + name + year + rating + cast + } + } + `); + const result = await executor({ document }); + if (!isAsyncIterable(result)) { + handleSerializedErrors(result); + throw new Error('Expected an async iterable but received ' + inspect(result)); + } + let i = 0; + for await (const item of result) { + handleSerializedErrors(item); + expect(item).toMatchSnapshot(i.toString()); + i++; + } + }); +}); diff --git a/e2e/grpc-example/mesh.config.ts b/e2e/grpc-example/mesh.config.ts new file mode 100644 index 0000000000000..738369d57ecb3 --- /dev/null +++ b/e2e/grpc-example/mesh.config.ts @@ -0,0 +1,33 @@ +import { Opts } from '@e2e/opts'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; +import { + createNamingConventionTransform, + defineConfig as defineComposeConfig, +} from '@graphql-mesh/compose-cli'; +import { loadGrpcSubgraph } from '@omnigraph/grpc'; + +const opts = Opts(process.argv); + +export const composeConfig = defineComposeConfig({ + subgraphs: [ + { + sourceHandler: loadGrpcSubgraph('movies', { + endpoint: 'localhost:' + opts.getServicePort('movies'), + metaData: { + someKey: 'someValue', + connection_type: '{context.headers.connection}', + }, + source: './services/movies/proto/service.proto', + }), + transforms: [ + createNamingConventionTransform({ + fieldNames: 'camelCase', + }), + ], + }, + ], +}); + +export const gatewayConfig = defineGatewayConfig({ + deferStream: true, +}); diff --git a/e2e/grpc-example/package.json b/e2e/grpc-example/package.json new file mode 100644 index 0000000000000..fffa8a87ec4c7 --- /dev/null +++ b/e2e/grpc-example/package.json @@ -0,0 +1,13 @@ +{ + "name": "@e2e/grpc", + "type": "module", + "private": true, + "dependencies": { + "@graphql-hive/gateway": "^1.4.1", + "@graphql-mesh/compose-cli": "workspace:*", + "@grpc/grpc-js": "^1.12.2", + "@grpc/proto-loader": "^0.7.13", + "@omnigraph/grpc": "workspace:*", + "graphql": "16.9.0" + } +} diff --git a/e2e/grpc-example/services/movies/index.ts b/e2e/grpc-example/services/movies/index.ts new file mode 100644 index 0000000000000..77cee6d133655 --- /dev/null +++ b/e2e/grpc-example/services/movies/index.ts @@ -0,0 +1,122 @@ +import { dirname, join } from 'path'; +import { Opts } from '@e2e/opts'; +import { + loadPackageDefinition, + Server, + ServerCredentials, + type ServiceClientConstructor, +} from '@grpc/grpc-js'; +import { load } from '@grpc/proto-loader'; +import { fileURLToPath } from 'url'; + +const opts = Opts(process.argv); + +const seconds = new Date('2020-12-20').getTime(); + +const Genre = { + UNSPECIFIED: 0, + ACTION: 1, + DRAMA: 2, +}; + +const Movies = [ + { + cast: ['Tom Cruise', 'Simon Pegg', 'Jeremy Renner'], + name: 'Mission: Impossible Rogue Nation', + rating: 0.97, + year: BigInt(2015), + time: { + seconds, + }, + genre: Genre.ACTION, + }, + { + cast: ['Tom Cruise', 'Simon Pegg', 'Henry Cavill'], + name: 'Mission: Impossible - Fallout', + rating: 0.93, + year: BigInt(2018), + time: { + seconds, + }, + genre: Genre.ACTION, + }, + { + cast: ['Leonardo DiCaprio', 'Jonah Hill', 'Margot Robbie'], + name: 'The Wolf of Wall Street', + rating: 0.78, + year: BigInt(2013), + time: { + seconds, + }, + genre: Genre.DRAMA, + }, +]; + +async function startServer(subscriptionInterval = 1000, debug = false): Promise { + const logger = debug ? (...args) => console.log(...args) : () => { }; + const server = new Server(); + + const packageDefinition = await load('./service.proto', { + includeDirs: [join(dirname(fileURLToPath(import.meta.url)), './proto')], + }); + const grpcObject = loadPackageDefinition(packageDefinition); + server.addService((grpcObject.Example as ServiceClientConstructor).service, { + getMovies(call, callback) { + const result = Movies.filter(movie => { + for (const [key, value] of Object.entries(call.request.movie)) { + if (movie[key] === value) { + return true; + } + } + }); + const moviesResult = { result }; + logger('called with MetaData:', JSON.stringify(call.metadata.getMap())); + callback(null, moviesResult); + }, + async searchMoviesByCast(call) { + logger('call started'); + logger('called with MetaData:', JSON.stringify(call.metadata.getMap())); + const input = call.request; + call.on('error', error => { + console.error(error); + call.end(); + }); + for (const movie of Movies) { + await new Promise(resolve => setTimeout(resolve, subscriptionInterval)); + if (call.cancelled || call.destroyed) { + logger('call ended'); + return; + } + if (movie.cast.includes(input.castName)) { + logger('call received', movie); + call.write(movie); + } + } + call.end(); + }, + }); + return new Promise((resolve, reject) => { + server.bindAsync( + '0.0.0.0:' + opts.getServicePort('movies'), + ServerCredentials.createInsecure(), + (error, port) => { + if (error) { + reject(error); + return; + } + logger('Server started, listening: 0.0.0.0:' + port); + resolve(server); + }, + ); + }); +} + +startServer(300, true).catch(console.error); + +process.on('uncaughtException', err => { + console.error(`process on uncaughtException error: ${err}`); +}); + +process.on('unhandledRejection', err => { + console.error(`process on unhandledRejection error: ${err}`); +}); diff --git a/e2e/grpc-example/services/movies/proto/movie.proto b/e2e/grpc-example/services/movies/proto/movie.proto new file mode 100644 index 0000000000000..29c520c1c4954 --- /dev/null +++ b/e2e/grpc-example/services/movies/proto/movie.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +import "google/protobuf/timestamp.proto"; + +enum Genre { + UNSPECIFIED = 0; + ACTION = 1; + DRAMA = 2; +} + +/** + * movie message payload + */ +message Movie { + string name = 1; + int64 year = 2; + float rating = 3; + + /** + * list of cast + */ + repeated string cast = 4; + google.protobuf.Timestamp time = 5; + Genre genre = 6; +} diff --git a/e2e/grpc-example/services/movies/proto/service.proto b/e2e/grpc-example/services/movies/proto/service.proto new file mode 100644 index 0000000000000..abc0d9ff65987 --- /dev/null +++ b/e2e/grpc-example/services/movies/proto/service.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +import "movie.proto"; + +message EmptyRequest {} + +message MovieRequest { + Movie movie = 1; +} + +message SearchByCastRequest { + string castName = 1; +} + +/** + * movie result message, contains list of movies + */ +message MoviesResult { + /** + * list of movies + */ + repeated Movie result = 1; +} + +service Example { + /** + * get all movies + */ + rpc GetMovies (MovieRequest) returns (MoviesResult) {} + + /** + * search movies by the name of the cast + */ + rpc SearchMoviesByCast (SearchByCastRequest) returns (stream Movie) {} + +} + +service AnotherExample { + /** + * get all movies + */ + rpc GetMovies (MovieRequest) returns (MoviesResult) {} + + /** + * search movies by the name of the cast + */ + rpc SearchMoviesByCast (SearchByCastRequest) returns (stream Movie) {} + +} diff --git a/e2e/hoist-and-prefix-transform/__snapshots__/hoist-and-prefix-transform.test.ts.snap b/e2e/hoist-and-prefix-transform/__snapshots__/hoist-and-prefix-transform.test.ts.snap new file mode 100644 index 0000000000000..21c69a9fe52b8 --- /dev/null +++ b/e2e/hoist-and-prefix-transform/__snapshots__/hoist-and-prefix-transform.test.ts.snap @@ -0,0 +1,123 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should compose the appropriate schema 1`] = ` +" +schema + @link(url: "https://specs.apollo.dev/link/v1.0") + @link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION) + + + + + + @link( + url: "https://the-guild.dev/graphql/mesh/spec/v1.0" + import: ["@transport", "@hoist", "@source", "@extraSchemaDefinitionDirective"] +) +{ + query: Query + + +} + + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field( + graph: join__Graph + requires: join__FieldSet + provides: join__FieldSet + type: String + external: Boolean + override: String + usedOverridden: Boolean + ) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements( + graph: join__Graph! + interface: String! + ) repeatable on OBJECT | INTERFACE + + directive @join__type( + graph: join__Graph! + key: join__FieldSet + extension: Boolean! = false + resolvable: Boolean! = true + isInterfaceObject: Boolean! = false + ) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + scalar join__FieldSet + + + directive @link( + url: String + as: String + for: link__Purpose + import: [link__Import] + ) repeatable on SCHEMA + + scalar link__Import + + enum link__Purpose { + """ + \`SECURITY\` features provide metadata necessary to securely resolve fields. + """ + SECURITY + + """ + \`EXECUTION\` features provide metadata necessary for operation execution. + """ + EXECUTION + } + + + + + + + +enum join__Graph { + WEATHER @join__graph(name: "weather", url: "http://localhost:/graphql") +} + +directive @transport( + kind: String! + subgraph: String! + location: String! + headers: [[String]] + options: Test_TransportOptions +) repeatable on SCHEMA + +directive @hoist(subgraph: String, pathConfig: _HoistConfig) repeatable on FIELD_DEFINITION + +directive @source(name: String!, type: String, subgraph: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @extraSchemaDefinitionDirective(directives: _DirectiveExtensions) repeatable on OBJECT + +scalar Test_TransportOptions @source(name: "TransportOptions", subgraph: "weather") @join__type(graph: WEATHER) + +scalar _HoistConfig @join__type(graph: WEATHER) + +scalar _DirectiveExtensions @join__type(graph: WEATHER) + +type Query @source(name: "Query", subgraph: "weather") @extraSchemaDefinitionDirective( + directives: {transport: [{kind: "http", subgraph: "weather", location: "http://localhost:/graphql", options: {}}]} +) @join__type(graph: WEATHER) { + here: Test_Weather @source(name: "here", type: "Weather", subgraph: "weather") +} + +type Test_Weather @source(name: "Weather", subgraph: "weather") @join__type(graph: WEATHER) { + rain: Test_Rain! @source(name: "rain", type: "Rain!", subgraph: "weather") + chanceOfRain: Float! @hoist(subgraph: "weather", pathConfig: ["rain", "chance"]) +} + +type Test_Rain @source(name: "Rain", subgraph: "weather") @join__type(graph: WEATHER) { + chance: Float! +} + +" +`; diff --git a/e2e/hoist-and-prefix-transform/hoist-and-prefix-transform.test.ts b/e2e/hoist-and-prefix-transform/hoist-and-prefix-transform.test.ts index a0ac23a6124c6..f181932f5265c 100644 --- a/e2e/hoist-and-prefix-transform/hoist-and-prefix-transform.test.ts +++ b/e2e/hoist-and-prefix-transform/hoist-and-prefix-transform.test.ts @@ -1,16 +1,30 @@ -import { createTenv } from '@e2e/tenv'; +import { createTenv, type Service } from '@e2e/tenv'; const { compose, serve, service, fs } = createTenv(__dirname); +let weather: Service; + +beforeAll(async () => { + weather = await service('weather'); +}); + +it('should compose the appropriate schema', async () => { + const { result } = await compose({ + services: [weather], + maskServicePorts: true, + }); + expect(result).toMatchSnapshot(); +}); + it('should compose and execute', async () => { - const { output } = await compose({ output: 'graphql', services: [await service('weather')] }); + const { output } = await compose({ output: 'graphql', services: [weather] }); // hoisted const supergraph = await fs.read(output); expect(supergraph).toContain('Test_Weather'); expect(supergraph).toContain('chanceOfRain'); - const { execute } = await serve({ supergraph: output }); + const { execute } = await serve({ supergraph: output, pipeLogs: true }); await expect( execute({ query: /* GraphQL */ ` diff --git a/e2e/hoist-and-prefix-transform/package.json b/e2e/hoist-and-prefix-transform/package.json index 58113906163a6..779a6e78e7854 100644 --- a/e2e/hoist-and-prefix-transform/package.json +++ b/e2e/hoist-and-prefix-transform/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "@graphql-tools/schema": "^10.0.6", "graphql": "16.9.0" } diff --git a/e2e/js-config/mesh.config.js b/e2e/js-config/mesh.config.js index 1b2aa0b6626a4..5bcc8705b5102 100644 --- a/e2e/js-config/mesh.config.js +++ b/e2e/js-config/mesh.config.js @@ -1,6 +1,6 @@ import { GraphQLObjectType, GraphQLSchema, GraphQLString } from 'graphql'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; export const composeConfig = defineComposeConfig({ subgraphs: [ diff --git a/e2e/js-config/package.json b/e2e/js-config/package.json index d04753a74d419..4c9f08293322f 100644 --- a/e2e/js-config/package.json +++ b/e2e/js-config/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/json-schema-subscriptions/mesh.config.ts b/e2e/json-schema-subscriptions/mesh.config.ts index 698a13e8428d9..1768628eff083 100644 --- a/e2e/json-schema-subscriptions/mesh.config.ts +++ b/e2e/json-schema-subscriptions/mesh.config.ts @@ -1,8 +1,8 @@ import { OperationTypeNode } from 'graphql'; import { Opts } from '@e2e/opts'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; import useMeshLiveQuery from '@graphql-mesh/plugin-live-query'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadJSONSchemaSubgraph } from '@omnigraph/json-schema'; const opts = Opts(process.argv); diff --git a/e2e/json-schema-subscriptions/package.json b/e2e/json-schema-subscriptions/package.json index 45979d7c2117c..009daaf99d5ba 100644 --- a/e2e/json-schema-subscriptions/package.json +++ b/e2e/json-schema-subscriptions/package.json @@ -2,7 +2,7 @@ "name": "@e2e/json-schema-subscriptions", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "fets": "^0.8.0", "graphql": "16.9.0", "graphql-sse": "^2.5.3" diff --git a/e2e/logs-to-stderr-results-to-stdout/package.json b/e2e/logs-to-stderr-results-to-stdout/package.json index d3cb7ee6f779b..5d4b38b6dd3d6 100644 --- a/e2e/logs-to-stderr-results-to-stdout/package.json +++ b/e2e/logs-to-stderr-results-to-stdout/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/manual-transport-def/mesh.config.ts b/e2e/manual-transport-def/mesh.config.ts index 9f4ba7b812d6f..11993b321cdcf 100644 --- a/e2e/manual-transport-def/mesh.config.ts +++ b/e2e/manual-transport-def/mesh.config.ts @@ -1,9 +1,9 @@ import { Opts } from '@e2e/opts'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig, loadGraphQLHTTPSubgraph, } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import rest from '@graphql-mesh/transport-rest'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; diff --git a/e2e/manual-transport-def/package.json b/e2e/manual-transport-def/package.json index 2a498f56f1cbc..105079ffffc45 100644 --- a/e2e/manual-transport-def/package.json +++ b/e2e/manual-transport-def/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "fets": "0.8.3", "graphql": "16.9.0" } diff --git a/e2e/mysql-employees/package.json b/e2e/mysql-employees/package.json index 1048a4dda41a7..cf09746a3cc74 100644 --- a/e2e/mysql-employees/package.json +++ b/e2e/mysql-employees/package.json @@ -2,7 +2,7 @@ "name": "@e2e/mysql-employees", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0" } } diff --git a/e2e/mysql-rfam/package.json b/e2e/mysql-rfam/package.json index c597be7bc0ac3..1e80c3ba1e451 100644 --- a/e2e/mysql-rfam/package.json +++ b/e2e/mysql-rfam/package.json @@ -2,7 +2,7 @@ "name": "@e2e/mysql-rfam", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/neo4j-example/package.json b/e2e/neo4j-example/package.json index 6d0d576bdb85c..464adb4d2c0d6 100644 --- a/e2e/neo4j-example/package.json +++ b/e2e/neo4j-example/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0" } } diff --git a/e2e/odata-trippin/package.json b/e2e/odata-trippin/package.json index a7144d9e7c23e..a2dde62a2da32 100644 --- a/e2e/odata-trippin/package.json +++ b/e2e/odata-trippin/package.json @@ -3,7 +3,7 @@ "license": "MIT", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0" } } diff --git a/e2e/openapi-additional-resolvers/mesh.config.ts b/e2e/openapi-additional-resolvers/mesh.config.ts index e0799595ce10d..9f5a93af8b405 100644 --- a/e2e/openapi-additional-resolvers/mesh.config.ts +++ b/e2e/openapi-additional-resolvers/mesh.config.ts @@ -1,5 +1,5 @@ +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; export const composeConfig = defineComposeConfig({ diff --git a/e2e/openapi-additional-resolvers/package.json b/e2e/openapi-additional-resolvers/package.json index 7c088df7bd88f..d51a22573b8ce 100644 --- a/e2e/openapi-additional-resolvers/package.json +++ b/e2e/openapi-additional-resolvers/package.json @@ -2,7 +2,7 @@ "name": "@e2e/openapi-additional-resolvers", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0", "moment": "2.30.1" } diff --git a/e2e/openapi-arg-rename/package.json b/e2e/openapi-arg-rename/package.json index f6da2a9a67e19..376ca6eb72203 100644 --- a/e2e/openapi-arg-rename/package.json +++ b/e2e/openapi-arg-rename/package.json @@ -2,7 +2,7 @@ "name": "@e2e/openapi-arg-rename", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0", "moment": "2.30.1" } diff --git a/e2e/openapi-javascript-wiki/mesh.config.ts b/e2e/openapi-javascript-wiki/mesh.config.ts index 8317fea135682..a6c72539d6aea 100644 --- a/e2e/openapi-javascript-wiki/mesh.config.ts +++ b/e2e/openapi-javascript-wiki/mesh.config.ts @@ -1,6 +1,6 @@ import moment from 'moment'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; export const composeConfig = defineComposeConfig({ diff --git a/e2e/openapi-javascript-wiki/package.json b/e2e/openapi-javascript-wiki/package.json index 0830e076adb10..977a774b697c2 100644 --- a/e2e/openapi-javascript-wiki/package.json +++ b/e2e/openapi-javascript-wiki/package.json @@ -2,7 +2,7 @@ "name": "@e2e/openapi-javascript-wiki", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0", "moment": "2.30.1" } diff --git a/e2e/openapi-min-length/mesh.config.ts b/e2e/openapi-min-length/mesh.config.ts index 7055b32ab8f48..fda556d2e6450 100644 --- a/e2e/openapi-min-length/mesh.config.ts +++ b/e2e/openapi-min-length/mesh.config.ts @@ -1,5 +1,5 @@ +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; export const composeConfig = defineComposeConfig({ diff --git a/e2e/openapi-min-length/package.json b/e2e/openapi-min-length/package.json index 421fe20cee328..7fc209ee55600 100644 --- a/e2e/openapi-min-length/package.json +++ b/e2e/openapi-min-length/package.json @@ -2,7 +2,7 @@ "name": "@e2e/openapi-min-length", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0", "moment": "2.30.1" } diff --git a/e2e/openapi-naming-convention/mesh.config.ts b/e2e/openapi-naming-convention/mesh.config.ts index 6734e8b07fe97..de5a0468b29f5 100644 --- a/e2e/openapi-naming-convention/mesh.config.ts +++ b/e2e/openapi-naming-convention/mesh.config.ts @@ -1,9 +1,9 @@ +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { createNamingConventionTransform, defineConfig as defineComposeConfig, upperCase, } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; export const composeConfig = defineComposeConfig({ diff --git a/e2e/openapi-naming-convention/package.json b/e2e/openapi-naming-convention/package.json index c378a00054334..bdd23fb8baae4 100644 --- a/e2e/openapi-naming-convention/package.json +++ b/e2e/openapi-naming-convention/package.json @@ -2,7 +2,7 @@ "name": "@e2e/openapi-naming-convention", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0", "moment": "2.30.1" } diff --git a/e2e/openapi-prune/mesh.config.ts b/e2e/openapi-prune/mesh.config.ts index 7a6baeebeceab..00d7f7f7346f8 100644 --- a/e2e/openapi-prune/mesh.config.ts +++ b/e2e/openapi-prune/mesh.config.ts @@ -1,9 +1,9 @@ import { Opts } from '@e2e/opts'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { createPruneTransform, defineConfig as defineComposeConfig, } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; const opts = Opts(process.argv); diff --git a/e2e/openapi-prune/package.json b/e2e/openapi-prune/package.json index 13cf3540fe448..eefeaea50d544 100644 --- a/e2e/openapi-prune/package.json +++ b/e2e/openapi-prune/package.json @@ -2,7 +2,7 @@ "name": "@e2e/openapi-prune", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0", "moment": "2.30.1" } diff --git a/e2e/openapi-subscriptions/mesh.config.ts b/e2e/openapi-subscriptions/mesh.config.ts index 43be176e40e73..405b824b99d08 100644 --- a/e2e/openapi-subscriptions/mesh.config.ts +++ b/e2e/openapi-subscriptions/mesh.config.ts @@ -1,6 +1,6 @@ import { Opts } from '@e2e/opts'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; const opts = Opts(process.argv); diff --git a/e2e/openapi-subscriptions/package.json b/e2e/openapi-subscriptions/package.json index 98db62d6c8341..24239cbead75c 100644 --- a/e2e/openapi-subscriptions/package.json +++ b/e2e/openapi-subscriptions/package.json @@ -2,7 +2,7 @@ "name": "@e2e/openapi-subscriptions", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "fets": "^0.8.0", "graphql": "16.9.0", "graphql-sse": "^2.5.3", diff --git a/e2e/opentelemetry/mesh.config.ts b/e2e/opentelemetry/mesh.config.ts index 9ab75a9a5ac52..d92f5373a9cff 100644 --- a/e2e/opentelemetry/mesh.config.ts +++ b/e2e/opentelemetry/mesh.config.ts @@ -1,8 +1,5 @@ -import { - createOtlpHttpExporter, - defineConfig as defineGatewayConfig, -} from '@graphql-mesh/serve-cli'; -import type { GatewayPlugin } from '@graphql-mesh/serve-runtime'; +import { createOtlpHttpExporter, defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; +import type { GatewayPlugin } from '@graphql-hive/gateway'; import type { MeshFetchRequestInit } from '@graphql-mesh/types'; // The following plugin is used to trace the fetch calls made by Mesh. diff --git a/e2e/opentelemetry/package.json b/e2e/opentelemetry/package.json index 5a0f8b825a325..314a4292b210a 100644 --- a/e2e/opentelemetry/package.json +++ b/e2e/opentelemetry/package.json @@ -4,7 +4,7 @@ "dependencies": { "@apollo/server": "^4.10.3", "@apollo/subgraph": "^2.7.2", - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.8.1", "graphql-yoga": "^5.7.0" } diff --git a/e2e/programmatic-batching/mesh.config.ts b/e2e/programmatic-batching/mesh.config.ts index 88e4cdc1ff8ee..8b75c8b4e63d8 100644 --- a/e2e/programmatic-batching/mesh.config.ts +++ b/e2e/programmatic-batching/mesh.config.ts @@ -1,7 +1,7 @@ import { print } from 'graphql'; import { Opts } from '@e2e/opts'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; const opts = Opts(process.argv); diff --git a/e2e/programmatic-batching/package.json b/e2e/programmatic-batching/package.json index c75f5d3bb8fd3..fc61997210057 100644 --- a/e2e/programmatic-batching/package.json +++ b/e2e/programmatic-batching/package.json @@ -2,7 +2,7 @@ "name": "@e2e/programmatic-batching-example", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "fets": "^0.8.0", "graphql": "16.9.0" } diff --git a/e2e/soap-demo/package.json b/e2e/soap-demo/package.json index c7e384ebf798b..f6dcd7a012b55 100644 --- a/e2e/soap-demo/package.json +++ b/e2e/soap-demo/package.json @@ -2,7 +2,7 @@ "name": "@e2e/soap-demo", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0" } } diff --git a/e2e/sqlite-chinook/package.json b/e2e/sqlite-chinook/package.json index b5d40456316f8..8aa4924e6ce38 100644 --- a/e2e/sqlite-chinook/package.json +++ b/e2e/sqlite-chinook/package.json @@ -2,7 +2,7 @@ "name": "@e2e/sqlite-chinook", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0" } } diff --git a/e2e/supergraph-url/package.json b/e2e/supergraph-url/package.json index a010048d970e8..091babf48ff1a 100644 --- a/e2e/supergraph-url/package.json +++ b/e2e/supergraph-url/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0" } } diff --git a/e2e/thrift-calculator/package.json b/e2e/thrift-calculator/package.json index ce9940e34445d..8f0b9975ccfb3 100644 --- a/e2e/thrift-calculator/package.json +++ b/e2e/thrift-calculator/package.json @@ -9,7 +9,7 @@ "@creditkarma/thrift-server-core": "^1.0.4", "@creditkarma/thrift-server-express": "^1.0.4", "@creditkarma/thrift-typescript": "^3.7.6", - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "@omnigraph/thrift": "^0.7.12", "express": "^4.18.2", "graphql": "^16.9.0", diff --git a/e2e/top-level-await/mesh.config.mjs b/e2e/top-level-await/mesh.config.mjs index b4640cd369191..5ff8521b37f99 100644 --- a/e2e/top-level-await/mesh.config.mjs +++ b/e2e/top-level-await/mesh.config.mjs @@ -1,6 +1,6 @@ import { GraphQLObjectType, GraphQLSchema, GraphQLString } from 'graphql'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; // top level await await Promise.resolve(); diff --git a/e2e/top-level-await/package.json b/e2e/top-level-await/package.json index 22e8caa2faedb..121523e3280b2 100644 --- a/e2e/top-level-await/package.json +++ b/e2e/top-level-await/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "16.9.0" } } diff --git a/e2e/type-merging-batching/package.json b/e2e/type-merging-batching/package.json index e296d53a41518..0b2eeb63c9432 100644 --- a/e2e/type-merging-batching/package.json +++ b/e2e/type-merging-batching/package.json @@ -2,7 +2,7 @@ "name": "@e2e/type-merging-batching", "private": true, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "graphql": "^16.9.0", "graphql-yoga": "^5.7.0" } diff --git a/e2e/utils/handleSerializedErrors.ts b/e2e/utils/handleSerializedErrors.ts new file mode 100644 index 0000000000000..e713502124568 --- /dev/null +++ b/e2e/utils/handleSerializedErrors.ts @@ -0,0 +1,17 @@ +import type { ExecutionResult } from 'graphql'; +import { createGraphQLError } from '@graphql-tools/utils'; + +export function handleSerializedErrors(serializedResult: ExecutionResult) { + if (serializedResult.errors?.length) { + const coercedErrors = serializedResult.errors.map((error: any) => + error instanceof Error ? error : createGraphQLError(error.message, error), + ); + if (coercedErrors.length === 1) { + throw coercedErrors[0]; + } + throw new AggregateError( + coercedErrors, + 'Received multiple errors\n' + coercedErrors.map(e => e.stack || e.message).join('\n'), + ); + } +} diff --git a/e2e/utils/package.json b/e2e/utils/package.json index 22e961ce04683..cad61fabd17dd 100644 --- a/e2e/utils/package.json +++ b/e2e/utils/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@apollo/gateway": "^2.8.3", - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "@types/dockerode": "^3.3.28", "dockerode": "^4.0.2", "glob": "^11.0.0", diff --git a/e2e/utils/tenv.ts b/e2e/utils/tenv.ts index 025069691831f..3fdde5a20db4e 100644 --- a/e2e/utils/tenv.ts +++ b/e2e/utils/tenv.ts @@ -242,7 +242,7 @@ export function createTenv(cwd: string): Tenv { const [proc, waitForExit] = await spawn( { env, cwd, pipeLogs }, 'node', // TODO: using yarn does not work on Windows in the CI - path.join(__project, 'node_modules', '@graphql-mesh', 'serve-cli', 'esm', 'bin.js'), + path.join(__project, 'node_modules', '@graphql-hive', 'gateway', 'dist', 'bin.js'), ...(supergraph ? ['supergraph', supergraph] : []), ...args, createPortOpt(port), @@ -727,7 +727,11 @@ async function waitForPort(port: number, signal: AbortSignal) { try { await fetch(`http://${localHostname}:${port}`, { signal }); break outer; - } catch (err) {} + } catch (err) { + if (err.toString().toLowerCase().includes('unsupported')) { + break outer; + } + } } // no need to track retries, jest will time out aborting the signal signal.throwIfAborted(); diff --git a/examples/grpc-example/tests/__snapshots__/grpc.test.ts.snap b/examples/grpc-example/tests/__snapshots__/grpc.test.ts.snap index d8dc2f85fbd32..ac96c9ec5207c 100644 --- a/examples/grpc-example/tests/__snapshots__/grpc.test.ts.snap +++ b/examples/grpc-example/tests/__snapshots__/grpc.test.ts.snap @@ -102,18 +102,18 @@ exports[`gRPC Example should fetch movies by cast as a subscription correctly: m `; exports[`gRPC Example should generate correct schema: grpc-schema 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost:50051", options: {requestTimeout: 200000, metaData: "{\\"someKey\\":\\"someValue\\",\\"connection_type\\":\\"{context.headers.connection}\\"}"}) { query: Query subscription: Subscription } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @enum(value: String) on ENUM_VALUE +directive @enum(subgraph: String, value: String) on ENUM_VALUE -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -127,17 +127,19 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int64\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int64\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { """get all movies""" - exampleGetMovies(input: MovieRequest_Input): MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "Example", methodName: "GetMovies", responseStream: false) + exampleGetMovies(input: MovieRequest_Input): MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - exampleSearchMoviesByCast(input: SearchByCastRequest_Input): [Movie] @grpcMethod(rootJsonName: "Root0", objPath: "Example", methodName: "SearchMoviesByCast", responseStream: true) - exampleConnectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "Example") + exampleSearchMoviesByCast(input: SearchByCastRequest_Input): [Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example", methodName: "SearchMoviesByCast", responseStream: true) + exampleConnectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example") """get all movies""" - anotherExampleGetMovies(input: MovieRequest_Input): MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "AnotherExample", methodName: "GetMovies", responseStream: false) + anotherExampleGetMovies(input: MovieRequest_Input): MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "AnotherExample", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - anotherExampleSearchMoviesByCast(input: SearchByCastRequest_Input): [Movie] @grpcMethod(rootJsonName: "Root0", objPath: "AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) - anotherExampleConnectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "AnotherExample") + anotherExampleSearchMoviesByCast(input: SearchByCastRequest_Input): [Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + anotherExampleConnectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "AnotherExample") } """movie result message, contains list of movies""" @@ -168,9 +170,9 @@ type google__protobuf__Timestamp { } enum Genre { - UNSPECIFIED @enum(value: "0") - ACTION @enum(value: "1") - DRAMA @enum(value: "2") + UNSPECIFIED @enum(subgraph: "grpc", value: "0") + ACTION @enum(subgraph: "grpc", value: "1") + DRAMA @enum(subgraph: "grpc", value: "2") } input MovieRequest_Input { @@ -207,12 +209,25 @@ enum ConnectivityState { type Subscription { """search movies by the name of the cast""" - exampleSearchMoviesByCast(input: SearchByCastRequest_Input): Movie @grpcMethod(rootJsonName: "Root0", objPath: "Example", methodName: "SearchMoviesByCast", responseStream: true) + exampleSearchMoviesByCast(input: SearchByCastRequest_Input): Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example", methodName: "SearchMoviesByCast", responseStream: true) """search movies by the name of the cast""" - anotherExampleSearchMoviesByCast(input: SearchByCastRequest_Input): Movie @grpcMethod(rootJsonName: "Root0", objPath: "AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + anotherExampleSearchMoviesByCast(input: SearchByCastRequest_Input): Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) +} + +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHttps: Boolean + metaData: ObjMap } -scalar ObjMap" +input GrpcCredentialsSsl { + rootCa: String + certChain: String + privateKey: String +}" `; exports[`gRPC Example should get movies correctly: get-movies-grpc-example-result 1`] = ` diff --git a/examples/grpc-reflection-example/tests/__snapshots__/grpc-reflection.test.ts.snap b/examples/grpc-reflection-example/tests/__snapshots__/grpc-reflection.test.ts.snap index 56470c61d6fa1..15610c652a88e 100644 --- a/examples/grpc-reflection-example/tests/__snapshots__/grpc-reflection.test.ts.snap +++ b/examples/grpc-reflection-example/tests/__snapshots__/grpc-reflection.test.ts.snap @@ -1,15 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`gRPC Reflection Example should generate correct schema: grpc-schema 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost:50052", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -23,13 +23,15 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"nested\\":{\\"helloworld\\":{\\"nested\\":{\\"GreetingRequest\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"GreetingResult\\":{\\"fields\\":{\\"greeting\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"GreetingService\\":{\\"methods\\":{\\"GetGreeting\\":{\\"requestType\\":\\".helloworld.GreetingRequest\\",\\"responseType\\":\\".helloworld.GreetingResult\\"}},\\"comment\\":null}}}}}") @grpcRootJson(name: "Root1", rootJson: "{\\"nested\\":{\\"artnet\\":{\\"nested\\":{\\"coredata\\":{\\"nested\\":{\\"playground\\":{\\"nested\\":{\\"EchoInputRequest\\":{\\"fields\\":{\\"price\\":{\\"type\\":\\"PlayGroundPriceFilter\\",\\"id\\":3}},\\"comment\\":null},\\"EchoUserInfoRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"EchoUserInfoResponse\\":{\\"fields\\":{\\"userInfo\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"PlayGroundPriceFilter\\":{\\"fields\\":{\\"range\\":{\\"type\\":\\"PlayGroundPriceRange\\",\\"id\\":1}},\\"comment\\":null},\\"PlayGroundPriceRange\\":{\\"fields\\":{\\"valueDouble\\":{\\"type\\":\\"google.protobuf.DoubleValue\\",\\"id\\":1},\\"valueFloat\\":{\\"type\\":\\"google.protobuf.FloatValue\\",\\"id\\":2},\\"valueLong\\":{\\"type\\":\\"google.protobuf.Int64Value\\",\\"id\\":3},\\"valueInt\\":{\\"type\\":\\"google.protobuf.Int64Value\\",\\"id\\":4},\\"valueLongNotnull\\":{\\"type\\":\\"int64\\",\\"id\\":5}},\\"comment\\":null},\\"SnailMailRequest\\":{\\"fields\\":{\\"allowCancellation\\":{\\"type\\":\\"bool\\",\\"id\\":1},\\"fakeDataLength\\":{\\"type\\":\\"int32\\",\\"id\\":2},\\"waitSeconds\\":{\\"type\\":\\"int32\\",\\"id\\":3}},\\"comment\\":null},\\"SnailMailResponse\\":{\\"fields\\":{\\"fakeData\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"Playground\\":{\\"methods\\":{\\"GetInput\\":{\\"requestType\\":\\".artnet.coredata.playground.EchoInputRequest\\",\\"responseType\\":\\".artnet.coredata.playground.EchoInputRequest\\"},\\"GetSnailMail\\":{\\"requestType\\":\\".artnet.coredata.playground.SnailMailRequest\\",\\"responseType\\":\\".artnet.coredata.playground.SnailMailResponse\\"},\\"GetUserInfo\\":{\\"requestType\\":\\".artnet.coredata.playground.EchoUserInfoRequest\\",\\"responseType\\":\\".artnet.coredata.playground.EchoUserInfoResponse\\"}},\\"comment\\":null}}}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"DoubleValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"double\\",\\"id\\":1}},\\"comment\\":null},\\"FloatValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"float\\",\\"id\\":1}},\\"comment\\":null},\\"Int64Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"int64\\",\\"id\\":1}},\\"comment\\":null},\\"UInt64Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"uint64\\",\\"id\\":1}},\\"comment\\":null},\\"Int32Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"int32\\",\\"id\\":1}},\\"comment\\":null},\\"UInt32Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"uint32\\",\\"id\\":1}},\\"comment\\":null},\\"BoolValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"bool\\",\\"id\\":1}},\\"comment\\":null},\\"StringValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"BytesValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"bytes\\",\\"id\\":1}},\\"comment\\":null}}}}}}}") { - helloworld_GreetingService_GetGreeting(input: helloworld__GreetingRequest_Input): helloworld__GreetingResult @grpcMethod(rootJsonName: "Root0", objPath: "helloworld.GreetingService", methodName: "GetGreeting", responseStream: false) - helloworld_GreetingService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "helloworld.GreetingService") - artnet_coredata_playground_Playground_GetInput(input: artnet__coredata__playground__EchoInputRequest_Input): artnet__coredata__playground__EchoInputRequest @grpcMethod(rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground", methodName: "GetInput", responseStream: false) - artnet_coredata_playground_Playground_GetSnailMail(input: artnet__coredata__playground__SnailMailRequest_Input): artnet__coredata__playground__SnailMailResponse @grpcMethod(rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground", methodName: "GetSnailMail", responseStream: false) - artnet_coredata_playground_Playground_GetUserInfo(input: artnet__coredata__playground__EchoUserInfoRequest_Input): artnet__coredata__playground__EchoUserInfoResponse @grpcMethod(rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground", methodName: "GetUserInfo", responseStream: false) - artnet_coredata_playground_Playground_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"nested\\":{\\"helloworld\\":{\\"nested\\":{\\"GreetingRequest\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"GreetingResult\\":{\\"fields\\":{\\"greeting\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"GreetingService\\":{\\"methods\\":{\\"GetGreeting\\":{\\"requestType\\":\\".helloworld.GreetingRequest\\",\\"responseType\\":\\".helloworld.GreetingResult\\"}},\\"comment\\":null}}}}}") @grpcRootJson(subgraph: "grpc", name: "Root1", rootJson: "{\\"nested\\":{\\"artnet\\":{\\"nested\\":{\\"coredata\\":{\\"nested\\":{\\"playground\\":{\\"nested\\":{\\"EchoInputRequest\\":{\\"fields\\":{\\"price\\":{\\"type\\":\\"PlayGroundPriceFilter\\",\\"id\\":3}},\\"comment\\":null},\\"EchoUserInfoRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"EchoUserInfoResponse\\":{\\"fields\\":{\\"userInfo\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"PlayGroundPriceFilter\\":{\\"fields\\":{\\"range\\":{\\"type\\":\\"PlayGroundPriceRange\\",\\"id\\":1}},\\"comment\\":null},\\"PlayGroundPriceRange\\":{\\"fields\\":{\\"valueDouble\\":{\\"type\\":\\"google.protobuf.DoubleValue\\",\\"id\\":1},\\"valueFloat\\":{\\"type\\":\\"google.protobuf.FloatValue\\",\\"id\\":2},\\"valueLong\\":{\\"type\\":\\"google.protobuf.Int64Value\\",\\"id\\":3},\\"valueInt\\":{\\"type\\":\\"google.protobuf.Int64Value\\",\\"id\\":4},\\"valueLongNotnull\\":{\\"type\\":\\"int64\\",\\"id\\":5}},\\"comment\\":null},\\"SnailMailRequest\\":{\\"fields\\":{\\"allowCancellation\\":{\\"type\\":\\"bool\\",\\"id\\":1},\\"fakeDataLength\\":{\\"type\\":\\"int32\\",\\"id\\":2},\\"waitSeconds\\":{\\"type\\":\\"int32\\",\\"id\\":3}},\\"comment\\":null},\\"SnailMailResponse\\":{\\"fields\\":{\\"fakeData\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"Playground\\":{\\"methods\\":{\\"GetInput\\":{\\"requestType\\":\\".artnet.coredata.playground.EchoInputRequest\\",\\"responseType\\":\\".artnet.coredata.playground.EchoInputRequest\\"},\\"GetSnailMail\\":{\\"requestType\\":\\".artnet.coredata.playground.SnailMailRequest\\",\\"responseType\\":\\".artnet.coredata.playground.SnailMailResponse\\"},\\"GetUserInfo\\":{\\"requestType\\":\\".artnet.coredata.playground.EchoUserInfoRequest\\",\\"responseType\\":\\".artnet.coredata.playground.EchoUserInfoResponse\\"}},\\"comment\\":null}}}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"DoubleValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"double\\",\\"id\\":1}},\\"comment\\":null},\\"FloatValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"float\\",\\"id\\":1}},\\"comment\\":null},\\"Int64Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"int64\\",\\"id\\":1}},\\"comment\\":null},\\"UInt64Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"uint64\\",\\"id\\":1}},\\"comment\\":null},\\"Int32Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"int32\\",\\"id\\":1}},\\"comment\\":null},\\"UInt32Value\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"uint32\\",\\"id\\":1}},\\"comment\\":null},\\"BoolValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"bool\\",\\"id\\":1}},\\"comment\\":null},\\"StringValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1}},\\"comment\\":null},\\"BytesValue\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"bytes\\",\\"id\\":1}},\\"comment\\":null}}}}}}}") { + helloworld_GreetingService_GetGreeting(input: helloworld__GreetingRequest_Input): helloworld__GreetingResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "helloworld.GreetingService", methodName: "GetGreeting", responseStream: false) + helloworld_GreetingService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "helloworld.GreetingService") + artnet_coredata_playground_Playground_GetInput(input: artnet__coredata__playground__EchoInputRequest_Input): artnet__coredata__playground__EchoInputRequest @grpcMethod(subgraph: "grpc", rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground", methodName: "GetInput", responseStream: false) + artnet_coredata_playground_Playground_GetSnailMail(input: artnet__coredata__playground__SnailMailRequest_Input): artnet__coredata__playground__SnailMailResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground", methodName: "GetSnailMail", responseStream: false) + artnet_coredata_playground_Playground_GetUserInfo(input: artnet__coredata__playground__EchoUserInfoRequest_Input): artnet__coredata__playground__EchoUserInfoResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground", methodName: "GetUserInfo", responseStream: false) + artnet_coredata_playground_Playground_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root1", objPath: "artnet.coredata.playground.Playground") } type helloworld__GreetingResult { @@ -125,7 +127,20 @@ type artnet__coredata__playground__EchoUserInfoResponse { scalar artnet__coredata__playground__EchoUserInfoRequest_Input @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf") -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Reflection Example should get greeting correctly: greeting-result 1`] = ` diff --git a/examples/v1-next/apollo-federation-compatibility/gateway.ts b/examples/v1-next/apollo-federation-compatibility/gateway.ts index 43534927e9940..6f26237942ebd 100644 --- a/examples/v1-next/apollo-federation-compatibility/gateway.ts +++ b/examples/v1-next/apollo-federation-compatibility/gateway.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { createServer } from 'http'; -import { createGatewayRuntime } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime } from '@graphql-hive/gateway'; import http from '@graphql-mesh/transport-http'; import { useApolloInlineTrace } from '@graphql-yoga/plugin-apollo-inline-trace'; diff --git a/examples/v1-next/apollo-federation-compatibility/mesh.config.ts b/examples/v1-next/apollo-federation-compatibility/mesh.config.ts index d4fd2481298b9..b8b2930dba2c6 100644 --- a/examples/v1-next/apollo-federation-compatibility/mesh.config.ts +++ b/examples/v1-next/apollo-federation-compatibility/mesh.config.ts @@ -1,9 +1,9 @@ +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { createFederationTransform, defineConfig as defineComposeConfig, loadGraphQLHTTPSubgraph, } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { useApolloInlineTrace } from '@graphql-yoga/plugin-apollo-inline-trace'; export const composeConfig = defineComposeConfig({ diff --git a/examples/v1-next/apollo-federation-compatibility/package.json b/examples/v1-next/apollo-federation-compatibility/package.json index 1e021d068a016..511a28e2a5b13 100644 --- a/examples/v1-next/apollo-federation-compatibility/package.json +++ b/examples/v1-next/apollo-federation-compatibility/package.json @@ -15,7 +15,7 @@ "start": "node bundle.js" }, "dependencies": { - "@graphql-mesh/serve-cli": "1.4.0", + "@graphql-hive/gateway": "1.4.0", "@graphql-yoga/plugin-apollo-inline-trace": "3.7.0", "concurrently": "9.0.1", "graphql": "16.9.0", diff --git a/examples/v1-next/auth0/mesh.config.ts b/examples/v1-next/auth0/mesh.config.ts index a48893c96a3f6..19ee69e4df8e3 100644 --- a/examples/v1-next/auth0/mesh.config.ts +++ b/examples/v1-next/auth0/mesh.config.ts @@ -1,9 +1,8 @@ import { OperationTypeNode } from 'graphql'; import { useAuth0 } from '@envelop/auth0'; +import { defineConfig as defineGatewayConfig, useStaticFiles } from '@graphql-hive/gateway'; import { defineConfig as defineComposeConfig } from '@graphql-mesh/compose-cli'; import useOperationFieldPermissions from '@graphql-mesh/plugin-operation-field-permissions'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; -import { useStaticFiles } from '@graphql-mesh/serve-runtime'; import { loadJSONSchemaSubgraph } from '@omnigraph/json-schema'; export const composeConfig = defineComposeConfig({ diff --git a/examples/v1-next/auth0/package.json b/examples/v1-next/auth0/package.json index b5726e8d790b1..d101cd17d1caf 100644 --- a/examples/v1-next/auth0/package.json +++ b/examples/v1-next/auth0/package.json @@ -5,14 +5,14 @@ "scripts": { "compose": "node ../../packages/compose-cli/dist/esm/bin.js", "pretest": "npm run compose", - "start": "node ../../packages/serve-cli/dist/esm/bin.js", + "start": "npx hive-gateway", "test": "jest" }, "dependencies": { "@envelop/auth0": "^6.0.0", + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/compose-cli": "^1.1.4", "@graphql-mesh/plugin-operation-field-permissions": "^0.102.10", - "@graphql-mesh/serve-cli": "^1.4.0", "@omnigraph/json-schema": "^0.107.4", "graphql": "16.9.0" }, diff --git a/examples/v1-next/hive-example/gateway/package.json b/examples/v1-next/hive-example/gateway/package.json index b40b9cef6c4ff..8912a047ab390 100644 --- a/examples/v1-next/hive-example/gateway/package.json +++ b/examples/v1-next/hive-example/gateway/package.json @@ -5,7 +5,7 @@ "gateway:start": "yarn mesh-serve supergraph" }, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", + "@graphql-hive/gateway": "^1.4.1", "dotenv": "^16.4.5", "graphql": "16.9.0" } diff --git a/examples/v1-next/integrations/cfw-breweries/package.json b/examples/v1-next/integrations/cfw-breweries/package.json index 8f77b9470ddb0..528a05fc92617 100644 --- a/examples/v1-next/integrations/cfw-breweries/package.json +++ b/examples/v1-next/integrations/cfw-breweries/package.json @@ -6,11 +6,11 @@ "start": "wrangler dev" }, "dependencies": { + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/cache-cfw-kv": "^0.102.10", "@graphql-mesh/cache-localforage": "^0.102.10", "@graphql-mesh/compose-cli": "^1.1.4", "@graphql-mesh/plugin-response-cache": "^0.102.10", - "@graphql-mesh/serve-runtime": "^1.2.4", "@omnigraph/json-schema": "^0.107.4", "graphql": "16.9.0" }, diff --git a/examples/v1-next/integrations/cfw-breweries/src/index.ts b/examples/v1-next/integrations/cfw-breweries/src/index.ts index 0ed410a1e9dc9..4a75915fbea0f 100644 --- a/examples/v1-next/integrations/cfw-breweries/src/index.ts +++ b/examples/v1-next/integrations/cfw-breweries/src/index.ts @@ -1,6 +1,6 @@ +import { createGatewayRuntime } from '@graphql-hive/gateway'; import CFWorkerKVCache from '@graphql-mesh/cache-cfw-kv'; import useResponseCache from '@graphql-mesh/plugin-response-cache'; -import { createGatewayRuntime } from '@graphql-mesh/serve-runtime'; import * as rest from '@omnigraph/json-schema'; import supergraph from './supergraph.graphql'; diff --git a/examples/v1-next/integrations/cfw-spacex/package.json b/examples/v1-next/integrations/cfw-spacex/package.json index ed69139fd181e..e6a89cdb90917 100644 --- a/examples/v1-next/integrations/cfw-spacex/package.json +++ b/examples/v1-next/integrations/cfw-spacex/package.json @@ -6,10 +6,10 @@ }, "dependencies": { "@envelop/depth-limit": "^4.0.0", + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/cache-cfw-kv": "^0.102.10", "@graphql-mesh/plugin-rate-limit": "^0.102.10", "@graphql-mesh/plugin-response-cache": "^0.102.10", - "@graphql-mesh/serve-runtime": "^1.2.4", "graphql": "16.9.0" }, "devDependencies": { diff --git a/examples/v1-next/integrations/cfw-spacex/src/index.ts b/examples/v1-next/integrations/cfw-spacex/src/index.ts index 91c5f471d0b02..f1934a22f417f 100644 --- a/examples/v1-next/integrations/cfw-spacex/src/index.ts +++ b/examples/v1-next/integrations/cfw-spacex/src/index.ts @@ -1,8 +1,8 @@ import { useDepthLimit } from '@envelop/depth-limit'; +import { createGatewayRuntime } from '@graphql-hive/gateway'; import CFWorkerKVCache from '@graphql-mesh/cache-cfw-kv'; import useMeshRateLimit from '@graphql-mesh/plugin-rate-limit'; import useMeshResponseCache from '@graphql-mesh/plugin-response-cache'; -import { createGatewayRuntime } from '@graphql-mesh/serve-runtime'; self.addEventListener( 'fetch', diff --git a/examples/v1-next/integrations/fastify/package.json b/examples/v1-next/integrations/fastify/package.json index 1a60e35010c5f..cae85dc1c004d 100644 --- a/examples/v1-next/integrations/fastify/package.json +++ b/examples/v1-next/integrations/fastify/package.json @@ -6,8 +6,8 @@ "start": "ts-node-dev src/index.ts" }, "dependencies": { + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/compose-cli": "^1.1.4", - "@graphql-mesh/serve-runtime": "^1.2.4", "@omnigraph/openapi": "^0.107.4", "fastify": "^5.0.0", "graphql": "16.9.0", diff --git a/examples/v1-next/integrations/fastify/src/app.ts b/examples/v1-next/integrations/fastify/src/app.ts index 3bc6818fadd0e..0281cb035641f 100644 --- a/examples/v1-next/integrations/fastify/src/app.ts +++ b/examples/v1-next/integrations/fastify/src/app.ts @@ -1,6 +1,6 @@ import { join } from 'path'; import fastify from 'fastify'; -import { createGatewayRuntime } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime } from '@graphql-hive/gateway'; export const app = fastify(); diff --git a/examples/v1-next/integrations/gcp-functions/index.ts b/examples/v1-next/integrations/gcp-functions/index.ts index 61ebd90a9067c..9c34be4e19d92 100644 --- a/examples/v1-next/integrations/gcp-functions/index.ts +++ b/examples/v1-next/integrations/gcp-functions/index.ts @@ -1,5 +1,5 @@ import type { IncomingMessage, ServerResponse } from 'node:http'; -import { createGatewayRuntime } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime } from '@graphql-hive/gateway'; const functionBasePath = '/mesh'; diff --git a/examples/v1-next/integrations/gcp-functions/package.json b/examples/v1-next/integrations/gcp-functions/package.json index da8f05c2dc7e5..2bb3740bca207 100644 --- a/examples/v1-next/integrations/gcp-functions/package.json +++ b/examples/v1-next/integrations/gcp-functions/package.json @@ -12,8 +12,8 @@ }, "dependencies": { "@google-cloud/functions-framework": "^3.3.0", + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/compose-cli": "^1.1.4", - "@graphql-mesh/serve-runtime": "^1.2.4", "@omnigraph/json-schema": "^0.107.4", "@types/node": "^22.0.0", "graphql": "^16.9.0", diff --git a/examples/v1-next/integrations/openwhisk-example/package.json b/examples/v1-next/integrations/openwhisk-example/package.json index 599df7410cec4..7da1c352a3e84 100644 --- a/examples/v1-next/integrations/openwhisk-example/package.json +++ b/examples/v1-next/integrations/openwhisk-example/package.json @@ -11,8 +11,7 @@ "dev": "mesh serve" }, "dependencies": { - "@graphql-mesh/serve-cli": "^1.4.0", - "@graphql-mesh/serve-runtime": "^1.2.4", + "@graphql-hive/gateway": "^1.4.1", "esbuild": "^0.24.0", "graphql": "16.9.0", "typescript": "^5.4.2" diff --git a/examples/v1-next/integrations/openwhisk-example/src/index.ts b/examples/v1-next/integrations/openwhisk-example/src/index.ts index d981e2a0dce03..ef47e32c95906 100644 --- a/examples/v1-next/integrations/openwhisk-example/src/index.ts +++ b/examples/v1-next/integrations/openwhisk-example/src/index.ts @@ -1,4 +1,4 @@ -import { createGatewayRuntime } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime } from '@graphql-hive/gateway'; const httpHandler = createGatewayRuntime({ http: { diff --git a/examples/v1-next/json-schema-reddit/package.json b/examples/v1-next/json-schema-reddit/package.json index 906d1320446d7..d16b82dce230c 100644 --- a/examples/v1-next/json-schema-reddit/package.json +++ b/examples/v1-next/json-schema-reddit/package.json @@ -6,8 +6,8 @@ "serve": "yarn mesh-serve" }, "dependencies": { + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/compose-cli": "workspace:*", - "@graphql-mesh/serve-cli": "^1.4.0", "@omnigraph/json-schema": "workspace:*", "graphql": "16.9.0" } diff --git a/examples/v1-next/openapi-location-weather/mesh.config.ts b/examples/v1-next/openapi-location-weather/mesh.config.ts index f2118c25394e5..8d79b3407ed27 100644 --- a/examples/v1-next/openapi-location-weather/mesh.config.ts +++ b/examples/v1-next/openapi-location-weather/mesh.config.ts @@ -1,9 +1,8 @@ -import LocalforageCache from '@graphql-mesh/cache-localforage'; +import { defineConfig as defineGatewayConfig } from '@graphql-hive/gateway'; import { createRenameTypeTransform, defineConfig as defineComposeConfig, } from '@graphql-mesh/compose-cli'; -import { defineConfig as defineGatewayConfig } from '@graphql-mesh/serve-cli'; import { loadOpenAPISubgraph } from '@omnigraph/openapi'; export const composeConfig = defineComposeConfig({ diff --git a/examples/v1-next/openapi-location-weather/package.json b/examples/v1-next/openapi-location-weather/package.json index 000659397e9fb..6d6f1f87fc8f8 100644 --- a/examples/v1-next/openapi-location-weather/package.json +++ b/examples/v1-next/openapi-location-weather/package.json @@ -4,12 +4,12 @@ "private": true, "scripts": { "compose": "node ../../packages/compose-cli/dist/esm/bin.js", - "serve": "node ../../packages/serve-cli/dist/esm/bin.js" + "start": "npx hive-gateway" }, "dependencies": { + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/cache-localforage": "^0.102.10", "@graphql-mesh/compose-cli": "^1.1.4", - "@graphql-mesh/serve-cli": "^1.4.0", "@omnigraph/openapi": "^0.107.4", "graphql": "^16.9.0" } diff --git a/examples/v1-next/openapi-youtrack/package.json b/examples/v1-next/openapi-youtrack/package.json index 02ddef562a6d6..d2bd0ab19e918 100644 --- a/examples/v1-next/openapi-youtrack/package.json +++ b/examples/v1-next/openapi-youtrack/package.json @@ -4,11 +4,11 @@ "private": true, "scripts": { "compose": "node ../../packages/compose-cli/dist/esm/bin.js > supergraph.graphql", - "serve": "node ../../packages/serve-cli/dist/esm/bin.js" + "start": "npx hive-gateway" }, "dependencies": { + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/compose-cli": "^1.1.4", - "@graphql-mesh/serve-cli": "^1.4.0", "@omnigraph/openapi": "^0.107.4", "graphql": "^16.9.0" } diff --git a/jest.config.js b/jest.config.js index f4ce74ca5f5d4..2fb7d44a8344c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -83,8 +83,6 @@ module.exports = { modulePathIgnorePatterns: ['dist', 'fixtures', '.bob'], moduleNameMapper: { '@graphql-mesh/cross-helpers': '/packages/cross-helpers/node.js', - '@graphql-mesh/serve-runtime': - '/node_modules/@graphql-mesh/serve-runtime/cjs/index.js', '^graphql$': '/node_modules/graphql/index.js', ...pathsToModuleNameMapper(tsconfig.compilerOptions.paths, { prefix: `${ROOT_DIR}/`, diff --git a/packages/fusion/composition/package.json b/packages/fusion/composition/package.json index 8b3559da28a33..875dfb490c897 100644 --- a/packages/fusion/composition/package.json +++ b/packages/fusion/composition/package.json @@ -52,7 +52,7 @@ "dependencies": { "@graphql-mesh/utils": "^0.102.10", "@graphql-tools/schema": "^10.0.5", - "@graphql-tools/stitching-directives": "^3.1.8", + "@graphql-tools/stitching-directives": "^3.1.9", "@graphql-tools/utils": "^10.5.5", "@theguild/federation-composition": "^0.14.0", "change-case": "^4.1.2", @@ -63,7 +63,7 @@ "tslib": "^2.4.0" }, "devDependencies": { - "@graphql-mesh/serve-runtime": "^1.2.4", + "@graphql-hive/gateway": "^1.4.1", "@types/minimatch": "5.1.2", "@types/pluralize": "^0.0.33" }, diff --git a/packages/fusion/composition/src/compose.ts b/packages/fusion/composition/src/compose.ts index 70c3cb35c543d..f1cbe43aa8405 100644 --- a/packages/fusion/composition/src/compose.ts +++ b/packages/fusion/composition/src/compose.ts @@ -23,7 +23,6 @@ import { getDocumentNodeFromSchema, MapperKind, mapSchema, - type Constructor, type FieldMapper, } from '@graphql-tools/utils'; import type { ServiceDefinition } from '@theguild/federation-composition'; diff --git a/packages/fusion/composition/src/federation-utils.ts b/packages/fusion/composition/src/federation-utils.ts index a3a677d0a4203..3b98a2459743d 100644 --- a/packages/fusion/composition/src/federation-utils.ts +++ b/packages/fusion/composition/src/federation-utils.ts @@ -101,6 +101,7 @@ export function detectAndAddMeshDirectives(subgraph: GraphQLSchema) { !isSpecifiedDirective(directive) && !FEDERATION_V1_DIRECTIVES.includes(directiveName) && !directiveName.startsWith('@federation__') && + directiveName !== '@stream' && directiveName !== '@link' ) { meshDirectives.push(directiveName); diff --git a/packages/fusion/composition/tests/loaders.spec.ts b/packages/fusion/composition/tests/loaders.spec.ts index 9d734a3295003..9af3d617362d5 100644 --- a/packages/fusion/composition/tests/loaders.spec.ts +++ b/packages/fusion/composition/tests/loaders.spec.ts @@ -1,5 +1,5 @@ import { OperationTypeNode } from 'graphql'; -import { createGatewayRuntime, useCustomFetch } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime, useCustomFetch } from '@graphql-hive/gateway'; import { loadJSONSchemaSubgraph } from '@omnigraph/json-schema'; import { composeSubgraphs } from '../src/compose'; diff --git a/packages/fusion/runtime/package.json b/packages/fusion/runtime/package.json index 06f2ab7a1dd90..4159e6a0e6f68 100644 --- a/packages/fusion/runtime/package.json +++ b/packages/fusion/runtime/package.json @@ -56,14 +56,14 @@ "@graphql-mesh/transport-common": "^0.7.11", "@graphql-mesh/types": "^0.102.10", "@graphql-mesh/utils": "^0.102.10", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/executor": "^1.3.2", - "@graphql-tools/federation": "^2.2.19", + "@graphql-tools/federation": "^2.2.21", "@graphql-tools/merge": "^9.0.8", - "@graphql-tools/stitch": "^9.2.15", - "@graphql-tools/stitching-directives": "^3.1.8", + "@graphql-tools/stitch": "^9.2.17", + "@graphql-tools/stitching-directives": "^3.1.9", "@graphql-tools/utils": "^10.5.5", - "@graphql-tools/wrap": "^10.0.11", + "@graphql-tools/wrap": "^10.0.12", "@whatwg-node/disposablestack": "^0.0.5", "change-case": "^4.1.2", "graphql-yoga": "^5.7.0", diff --git a/packages/fusion/runtime/src/federation/subgraph.ts b/packages/fusion/runtime/src/federation/subgraph.ts index e6ca338800fa4..b3693a8ab92d1 100644 --- a/packages/fusion/runtime/src/federation/subgraph.ts +++ b/packages/fusion/runtime/src/federation/subgraph.ts @@ -11,20 +11,18 @@ import { typeFromAST, visit, } from 'graphql'; -import type { AdditionalStitchingResolverObject } from 'packages/legacy/types/src/config.js'; import type { TransportEntry } from '@graphql-mesh/transport-common'; -import { resolveAdditionalResolversWithoutImport } from '@graphql-mesh/utils'; import type { SubschemaConfig, Transform } from '@graphql-tools/delegate'; import { astFromField, getDirectiveExtensions, MapperKind, mapSchema, - type IResolvers, type TypeSource, } from '@graphql-tools/utils'; import { HoistField, + PruneSchema, RenameInputObjectFields, RenameInterfaceFields, RenameObjectFieldArguments, @@ -183,7 +181,7 @@ export function handleFederationSubschema({ : () => true, }; }); - transforms.push(new HoistField(realTypeName, pathConfig, fieldName)); + transforms.push(new HoistField(realTypeName, pathConfig, fieldName), new PruneSchema()); } } } diff --git a/packages/fusion/runtime/src/federation/supergraph.ts b/packages/fusion/runtime/src/federation/supergraph.ts index abb1717a52ec3..41d8c1f59eafb 100644 --- a/packages/fusion/runtime/src/federation/supergraph.ts +++ b/packages/fusion/runtime/src/federation/supergraph.ts @@ -1,7 +1,6 @@ import { isEnumType, Kind, - print, visit, type GraphQLSchema, type ObjectTypeDefinitionNode, diff --git a/packages/fusion/runtime/src/unifiedGraphManager.ts b/packages/fusion/runtime/src/unifiedGraphManager.ts index 4c6f11512ce6a..cd70bb24310e0 100644 --- a/packages/fusion/runtime/src/unifiedGraphManager.ts +++ b/packages/fusion/runtime/src/unifiedGraphManager.ts @@ -1,7 +1,7 @@ import type { DocumentNode, GraphQLSchema } from 'graphql'; import { buildASTSchema, buildSchema, isSchema } from 'graphql'; +import type { TransportEntryAdditions } from '@graphql-hive/gateway'; import { getInContextSDK } from '@graphql-mesh/runtime'; -import type { TransportEntryAdditions } from '@graphql-mesh/serve-runtime'; import type { TransportContext, TransportEntry } from '@graphql-mesh/transport-common'; import type { OnDelegateHook } from '@graphql-mesh/types'; import { mapMaybePromise } from '@graphql-mesh/utils'; diff --git a/packages/fusion/runtime/tests/transforms/hoist-field.test.ts b/packages/fusion/runtime/tests/transforms/hoist-field.test.ts index a1cb7dbe83ad0..195e4279b89d8 100644 --- a/packages/fusion/runtime/tests/transforms/hoist-field.test.ts +++ b/packages/fusion/runtime/tests/transforms/hoist-field.test.ts @@ -68,12 +68,6 @@ describe('Hoist Field', () => { users(limit: Int!, page: Int): [User!]! } -scalar _HoistConfig - -type UserSearchResult { - page: Int! -} - type User { id: ID! name: String! @@ -114,12 +108,6 @@ type User { users(limit: Int!, page: Int): [User!]! } -scalar _HoistConfig - -type UserSearchResult { - page: Int! -} - type User { id: ID! name: String! @@ -158,12 +146,6 @@ type User { users: [User!]! } -scalar _HoistConfig - -type UserSearchResult { - page: Int! -} - type User { id: ID! name: String! @@ -208,12 +190,6 @@ type User { users(page: Int): [User!]! } -scalar _HoistConfig - -type UserSearchResult { - page: Int! -} - type User { id: ID! name: String! @@ -261,12 +237,6 @@ type User { users(page: Int): [User!]! } -scalar _HoistConfig - -type UserSearchResult { - page: Int! -} - type User { id: ID! name: String! @@ -343,8 +313,6 @@ type User { usersResults(limit: Int!, page: Int): [User!]! } -scalar _HoistConfig - type UserSearchResult { page: Int! } diff --git a/packages/include/src/hooks.ts b/packages/include/src/hooks.ts index 663e8788b5b49..518c78bbf063a 100644 --- a/packages/include/src/hooks.ts +++ b/packages/include/src/hooks.ts @@ -100,7 +100,7 @@ export const resolve: module.ResolveHook = async (specifier, context, nextResolv } try { - debug(`Trying default resolve for "${specifier}"`); + // debug(`Trying default resolve for "${specifier}"`); return await nextResolve(specifier, context); } catch (e) { try { @@ -170,7 +170,7 @@ export const load: module.LoadHook = async (url, context, nextLoad) => { url = `file:///${url.replace(/\\/g, '/')}`; } if (/\.(m|c)?ts$/.test(url)) { - debug(`Transpiling TypeScript file at "${url}"`); + // debug(`Transpiling TypeScript file at "${url}"`); const filePath = fileURLToPath(url); let source: string; try { diff --git a/packages/legacy/handlers/graphql/package.json b/packages/legacy/handlers/graphql/package.json index c1f31b73c8aa6..502e591ce6e24 100644 --- a/packages/legacy/handlers/graphql/package.json +++ b/packages/legacy/handlers/graphql/package.json @@ -42,9 +42,9 @@ }, "dependencies": { "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/federation": "^2.2.19", - "@graphql-tools/url-loader": "^8.0.8", + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/federation": "^2.2.21", + "@graphql-tools/url-loader": "^8.0.9", "lodash.get": "^4.4.2" }, "publishConfig": { diff --git a/packages/legacy/handlers/grpc/package.json b/packages/legacy/handlers/grpc/package.json index 343f50ebb3e08..f42c1b00cc3b5 100644 --- a/packages/legacy/handlers/grpc/package.json +++ b/packages/legacy/handlers/grpc/package.json @@ -32,30 +32,15 @@ }, "typings": "dist/typings/index.d.ts", "peerDependencies": { - "@graphql-mesh/cross-helpers": "^0.4.7", "@graphql-mesh/store": "^0.102.10", "@graphql-mesh/types": "^0.102.10", "@graphql-mesh/utils": "^0.102.10", - "@graphql-tools/utils": "^10.5.5", "graphql": "*", "tslib": "^2.4.0" }, "dependencies": { - "@ardatan/grpc-reflection-js": "^0.0.2", - "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-mesh/transport-common": "^0.7.11", - "@grpc/grpc-js": "^1.1.7", - "@grpc/proto-loader": "^0.7.8", - "globby": "^11.1.0", - "graphql-compose": "^9.0.11", - "graphql-scalars": "^1.22.4", - "lodash.get": "^4.4.2", - "lodash.has": "^4.5.2", - "long": "4.0.0", - "protobufjs": "^7.2.5" - }, - "devDependencies": { - "@types/lodash.has": "4.5.9" + "@graphql-mesh/transport-grpc": "^0.0.0", + "@omnigraph/grpc": "^0.0.0" }, "publishConfig": { "access": "public", diff --git a/packages/legacy/handlers/grpc/src/index.ts b/packages/legacy/handlers/grpc/src/index.ts index abb586310a795..92ee526207773 100644 --- a/packages/legacy/handlers/grpc/src/index.ts +++ b/packages/legacy/handlers/grpc/src/index.ts @@ -1,33 +1,10 @@ /* eslint-disable import/no-duplicates */ -import globby from 'globby'; -import type { GraphQLFieldResolver, GraphQLScalarType, GraphQLSchema } from 'graphql'; -import { buildSchema, isEnumType, specifiedDirectives } from 'graphql'; -import type { - Directive, - EnumTypeComposerValueConfigDefinition, - ObjectTypeComposerFieldConfigAsObjectDefinition, -} from 'graphql-compose'; -import { SchemaComposer } from 'graphql-compose'; -import { - GraphQLBigInt, - GraphQLByte, - GraphQLJSON, - GraphQLUnsignedInt, - GraphQLVoid, -} from 'graphql-scalars'; -import lodashGet from 'lodash.get'; -import lodashHas from 'lodash.has'; -import type { AnyNestedObject, IParseOptions, Message, RootConstructor } from 'protobufjs'; -import protobufjs from 'protobufjs'; -import type { IFileDescriptorSet } from 'protobufjs/ext/descriptor'; -import descriptor from 'protobufjs/ext/descriptor/index.js'; -import { Client } from '@ardatan/grpc-reflection-js'; -import { fs, path, process } from '@graphql-mesh/cross-helpers'; +import type { GraphQLSchema } from 'graphql'; +import { buildSchema } from 'graphql'; import type { StoreProxy } from '@graphql-mesh/store'; import { PredefinedProxyOptions } from '@graphql-mesh/store'; -import { stringInterpolator } from '@graphql-mesh/string-interpolation'; +import { GrpcTransportHelper } from '@graphql-mesh/transport-grpc'; import type { - GetMeshSourcePayload, ImportFn, Logger, MeshFetch, @@ -37,38 +14,7 @@ import type { YamlConfig, } from '@graphql-mesh/types'; import { readFileOrUrl } from '@graphql-mesh/utils'; -import { - getDirective, - getDirectiveExtensions, - getDirectives, - getRootTypes, - GraphQLStreamDirective, -} from '@graphql-tools/utils'; -import type { ChannelCredentials } from '@grpc/grpc-js'; -import { credentials, loadPackageDefinition } from '@grpc/grpc-js'; -import type { ServiceClient } from '@grpc/grpc-js/build/src/make-client.js'; -import { fromJSON } from '@grpc/proto-loader'; -import { - EnumDirective, - grpcConnectivityStateDirective, - grpcMethodDirective, - grpcRootJsonDirective, -} from './directives.js'; -import './patchLongJs.js'; -import { resolvers as scalarResolvers } from 'graphql-scalars'; -import { ObjMapScalar } from '@graphql-mesh/transport-common'; -import { addExecutionLogicToScalar } from './scalars.js'; -import { addIncludePathResolver, addMetaDataToCall, getTypeName } from './utils.js'; - -const { Root } = protobufjs; - -interface LoadOptions extends IParseOptions { - includeDirs?: string[]; -} - -type DecodedDescriptorSet = Message & IFileDescriptorSet; - -const QUERY_METHOD_PREFIXES = ['get', 'list', 'search']; +import { loadGrpcSubgraph } from '@omnigraph/grpc'; export default class GrpcHandler implements MeshHandler { private config: YamlConfig.GrpcHandler; @@ -98,732 +44,43 @@ export default class GrpcHandler implements MeshHandler { this.importFn = importFn; } - async processReflection(creds: ChannelCredentials): Promise[]> { - this.logger.debug(`Using the reflection`); - const reflectionEndpoint = stringInterpolator.parse(this.config.endpoint, { env: process.env }); - this.logger.debug(`Creating gRPC Reflection Client`); - const reflectionClient = new Client(reflectionEndpoint, creds); - const subId = this.pubsub.subscribe('destroy', () => { - reflectionClient.grpcClient.close(); - this.pubsub.unsubscribe(subId); - }); - const services: (string | void)[] = await reflectionClient.listServices(); - const userServices = services.filter( - service => service && !service?.startsWith('grpc.'), - ) as string[]; - return userServices.map(async service => { - this.logger.debug(`Resolving root of Service: ${service} from the reflection response`); - const serviceRoot = await reflectionClient.fileContainingSymbol(service); - return serviceRoot; - }); - } - - async processDescriptorFile() { - let fileName: string; - let options: LoadOptions; - if (typeof this.config.source === 'object') { - fileName = this.config.source.file; - options = { - ...this.config.source.load, - includeDirs: this.config.source.load.includeDirs?.map(includeDir => - path.isAbsolute(includeDir) ? includeDir : path.join(this.baseDir, includeDir), - ), - }; - } else { - fileName = this.config.source; - } - fileName = stringInterpolator.parse(fileName, { env: process.env }); - const absoluteFilePath = path.isAbsolute(fileName) - ? fileName - : path.join(this.baseDir, fileName); - this.logger.debug(`Using the descriptor set from ${absoluteFilePath} `); - const descriptorSetBuffer = await fs.promises.readFile(absoluteFilePath); - this.logger.debug(`Reading ${absoluteFilePath} `); - let decodedDescriptorSet: DecodedDescriptorSet; - if (absoluteFilePath.endsWith('json')) { - this.logger.debug(`Parsing ${absoluteFilePath} as json`); - const descriptorSetJSON = JSON.parse(descriptorSetBuffer.toString()); - decodedDescriptorSet = descriptor.FileDescriptorSet.fromObject( - descriptorSetJSON, - ) as DecodedDescriptorSet; - } else { - decodedDescriptorSet = descriptor.FileDescriptorSet.decode( - descriptorSetBuffer, - ) as DecodedDescriptorSet; - } - this.logger.debug(`Creating root from descriptor set`); - const rootFromDescriptor = (Root as RootConstructor).fromDescriptor(decodedDescriptorSet); - if (options.includeDirs) { - if (!Array.isArray(options.includeDirs)) { - return Promise.reject(new Error('The includeDirs option must be an array')); - } - addIncludePathResolver(rootFromDescriptor, options.includeDirs); - } - return rootFromDescriptor; - } - - async processProtoFile() { - this.logger.debug(`Using proto file(s)`); - let protoRoot = new Root(); - let fileGlob: string; - let options: LoadOptions = { - keepCase: true, - alternateCommentMode: true, - }; - if (typeof this.config.source === 'object') { - fileGlob = this.config.source.file; - options = { - ...options, - ...this.config.source.load, - includeDirs: this.config.source.load?.includeDirs?.map(includeDir => - path.isAbsolute(includeDir) ? includeDir : path.join(this.baseDir, includeDir), - ), - }; - if (options.includeDirs) { - if (!Array.isArray(options.includeDirs)) { - throw new Error('The includeDirs option must be an array'); - } - addIncludePathResolver(protoRoot, options.includeDirs); - } - } else { - fileGlob = this.config.source; - } - - fileGlob = stringInterpolator.parse(fileGlob, { env: process.env }); - - const fileNames = await globby(fileGlob, { - cwd: this.baseDir, - }); - this.logger.debug(`Loading proto files(${fileGlob}); \n ${fileNames.join('\n')} `); - protoRoot = await protoRoot.load( - fileNames.map(filePath => - path.isAbsolute(filePath) ? filePath : path.join(this.baseDir, filePath), - ), - options, - ); - this.logger.debug(`Adding proto content to the root`); - return protoRoot; - } - - async getDescriptorSets(creds: ChannelCredentials) { - const rootPromises: Promise[] = []; - this.logger.debug(`Building Roots`); - if (this.config.source) { - const filePath = - typeof this.config.source === 'string' ? this.config.source : this.config.source.file; - if (filePath.endsWith('json')) { - rootPromises.push(this.processDescriptorFile()); - } else if (filePath.endsWith('proto')) { - rootPromises.push(this.processProtoFile()); - } - } else { - const reflectionPromises = await this.processReflection(creds); - rootPromises.push(...reflectionPromises); - } - - return Promise.all( - rootPromises.map(async (root$, i) => { - const root = await root$; - const rootName = root.name || `Root${i}`; - const rootLogger = this.logger.child(rootName); - rootLogger.debug(`Resolving entire the root tree`); - root.resolveAll(); - rootLogger.debug(`Creating artifacts from descriptor set and root`); - return { - name: rootName, - rootJson: root.toJSON({ - keepComments: true, - }), - }; - }), - ); - } - - async getCredentials(): Promise { - if (this.config.credentialsSsl) { - this.logger.debug( - () => - `Using SSL Connection with credentials at ${this.config.credentialsSsl.privateKey} & ${this.config.credentialsSsl.certChain}`, - ); - const absolutePrivateKeyPath = path.isAbsolute(this.config.credentialsSsl.privateKey) - ? this.config.credentialsSsl.privateKey - : path.join(this.baseDir, this.config.credentialsSsl.privateKey); - const absoluteCertChainPath = path.isAbsolute(this.config.credentialsSsl.certChain) - ? this.config.credentialsSsl.certChain - : path.join(this.baseDir, this.config.credentialsSsl.certChain); - - const sslFiles = [ - fs.promises.readFile(absolutePrivateKeyPath), - fs.promises.readFile(absoluteCertChainPath), - ]; - if (this.config.credentialsSsl.rootCA !== 'rootCA') { - const absoluteRootCAPath = path.isAbsolute(this.config.credentialsSsl.rootCA) - ? this.config.credentialsSsl.rootCA - : path.join(this.baseDir, this.config.credentialsSsl.rootCA); - sslFiles.unshift(fs.promises.readFile(absoluteRootCAPath)); - } - const [rootCA, privateKey, certChain] = await Promise.all(sslFiles); - return credentials.createSsl(rootCA, privateKey, certChain); - } else if (this.config.useHTTPS) { - this.logger.debug(`Using SSL Connection`); - return credentials.createSsl(); - } - this.logger.debug(`Using insecure connection`); - return credentials.createInsecure(); - } - - walkToFindTypePath( - rootJson: protobufjs.INamespace, - pathWithName: string[], - baseTypePath: string[], - ) { - const currentWalkingPath = [...pathWithName]; - while (!lodashHas(rootJson.nested, currentWalkingPath.concat(baseTypePath).join('.nested.'))) { - if (!currentWalkingPath.length) { - break; - } - currentWalkingPath.pop(); - } - return currentWalkingPath.concat(baseTypePath); - } - - getGrpcObject({ - rootJson, - loadOptions, - rootLogger, - }: { - rootJson: protobufjs.INamespace; - loadOptions: LoadOptions; - rootLogger: Logger; - }) { - const packageDefinition = fromJSON(rootJson, loadOptions); - - rootLogger.debug(`Creating service client for package definition`); - const grpcObject = loadPackageDefinition(packageDefinition); - return grpcObject; - } - - private grpcObjectByserviceClientByObjPath = new WeakMap< - ReturnType, - Map - >(); - - getServiceClient({ - grpcObject, - objPath, - creds, - }: { - grpcObject: ReturnType; - objPath: string; - creds: ChannelCredentials; - }) { - let serviceClientByObjPath = this.grpcObjectByserviceClientByObjPath.get(grpcObject); - if (!serviceClientByObjPath) { - serviceClientByObjPath = new Map(); - this.grpcObjectByserviceClientByObjPath.set(grpcObject, serviceClientByObjPath); - } - let client: ServiceClient = serviceClientByObjPath.get(objPath); - if (!client) { - const ServiceClient = lodashGet(grpcObject, objPath); - if (typeof ServiceClient !== 'function') { - throw new Error(`Object at path ${objPath} is not a Service constructor`); - } - client = new ServiceClient( - stringInterpolator.parse(this.config.endpoint, { env: process.env }) ?? - this.config.endpoint, - creds, - ); - const subId = this.pubsub.subscribe('destroy', () => { - client.close(); - this.pubsub.unsubscribe(subId); - }); - serviceClientByObjPath.set(objPath, client); - } - return client; - } - - getFieldResolver({ - client, - methodName, - isResponseStream, - }: { - client: ServiceClient; - methodName: string; - isResponseStream: boolean; - }): GraphQLFieldResolver { - const metaData = this.config.metaData; - const clientMethod = client[methodName].bind(client); - return function grpcFieldResolver(root, args, context) { - return addMetaDataToCall( - clientMethod, - args.input, - { - root, - args, - context, - env: process.env, - }, - metaData, - isResponseStream, - ); - }; - } - - getConnectivityStateResolver({ - client, - }: { - client: ServiceClient; - }): GraphQLFieldResolver { - return function connectivityStateResolver(_, { tryToConnect }) { - return client.getChannel().getConnectivityState(tryToConnect); - }; - } - - processDirectives({ schema, creds }: { schema: GraphQLSchema; creds: ChannelCredentials }) { - const schemaTypeMap = schema.getTypeMap(); - for (const scalarTypeName in scalarResolvers) { - if (scalarTypeName in schemaTypeMap) { - addExecutionLogicToScalar( - schemaTypeMap[scalarTypeName] as GraphQLScalarType, - scalarResolvers[scalarTypeName], - ); - } - } - if ('ObjMap' in schemaTypeMap) { - addExecutionLogicToScalar(schemaTypeMap.ObjMap as GraphQLScalarType, ObjMapScalar); - } - const queryType = schema.getQueryType(); - const rootJsonAnnotations = getDirective(schema, queryType, 'grpcRootJson'); - const rootJsonMap = new Map(); - const grpcObjectByRootJsonName = new Map>(); - for (const { name, rootJson, loadOptions } of rootJsonAnnotations) { - rootJsonMap.set(name, rootJson); - const rootLogger = this.logger.child(name); - grpcObjectByRootJsonName.set(name, this.getGrpcObject({ rootJson, loadOptions, rootLogger })); - } - const rootTypes = getRootTypes(schema); - for (const rootType of rootTypes) { - const rootTypeFields = rootType.getFields(); - for (const fieldName in rootTypeFields) { - const field = rootTypeFields[fieldName]; - const directives = getDirectives(schema, field); - if (directives?.length) { - for (const directiveObj of directives) { - switch (directiveObj.name) { - case 'grpcMethod': { - const { rootJsonName, objPath, methodName, responseStream } = directiveObj.args; - const grpcObject = grpcObjectByRootJsonName.get(rootJsonName); - const client = this.getServiceClient({ - grpcObject, - objPath, - creds, - }); - if (rootType.name === 'Subscription') { - field.subscribe = this.getFieldResolver({ - client, - methodName, - isResponseStream: responseStream, - }); - field.resolve = function identityFn(root) { - return root; - }; - } else { - field.resolve = this.getFieldResolver({ - client, - methodName, - isResponseStream: responseStream, - }); - } - break; - } - case 'grpcConnectivityState': { - const { rootJsonName, objPath } = directiveObj.args; - const grpcObject = grpcObjectByRootJsonName.get(rootJsonName); - const client = this.getServiceClient({ - grpcObject, - objPath, - creds, - }); - field.resolve = this.getConnectivityStateResolver({ client }); - break; - } - } - } - } - } - } - const typeMap = schema.getTypeMap(); - for (const typeName in typeMap) { - const type = typeMap[typeName]; - if (isEnumType(type)) { - const values = type.getValues(); - for (const value of values) { - const enumAnnotations = getDirective(schema, value, 'enum'); - if (enumAnnotations?.length) { - for (const enumAnnotation of enumAnnotations) { - const enumSerializedValue = enumAnnotation.value; - if (enumSerializedValue) { - const serializedValue = JSON.parse(enumSerializedValue); - value.value = serializedValue; - let valueLookup = (type as any)._valueLookup; - if (!valueLookup) { - valueLookup = new Map( - type.getValues().map(enumValue => [enumValue.value, enumValue]), - ); - (type as any)._valueLookup = valueLookup; - } - (type as any)._valueLookup.set(serializedValue, value); - } - } - } - } - } - } - } - - visit({ - nested, - name, - currentPath, - rootJsonName, - rootJson, - rootLogger: logger, - loadOptions, - }: { - nested: AnyNestedObject; - name: string; - currentPath: string[]; - rootJsonName: string; - rootJson: protobufjs.INamespace; - rootLogger: Logger; - loadOptions?: LoadOptions; - }) { - const pathWithName = [...currentPath, ...name.split('.')].filter(Boolean); - if ('nested' in nested) { - for (const key in nested.nested) { - logger.debug(`Visiting ${currentPath}.nested[${key}]`); - const currentNested = nested.nested[key]; - this.visit({ - nested: currentNested, - name: key, - currentPath: pathWithName, - rootJsonName, - rootJson, - rootLogger: logger, - }); - } - } - const typeName = pathWithName.join('__'); - if ('values' in nested) { - const enumValues: Record = {}; - const commentMap = (nested as any).comments; - for (const [key, value] of Object.entries(nested.values)) { - logger.debug(`Visiting ${currentPath}.nested.values[${key}]`); - enumValues[key] = { - directives: [ - { - name: 'enum', - args: { - value: JSON.stringify(value), - }, - }, - ], - description: commentMap?.[key], - }; - } - this.schemaComposer.addDirective(EnumDirective); - this.schemaComposer.createEnumTC({ - name: typeName, - values: enumValues, - description: (nested as any).comment, - }); - } else if ('fields' in nested) { - const inputTypeName = typeName + '_Input'; - const outputTypeName = typeName; - const description = (nested as any).comment; - const fieldEntries = Object.entries(nested.fields) as [ - string, - protobufjs.IField & { comment: string; keyType?: string }, - ][]; - if (fieldEntries.length) { - const inputTC = this.schemaComposer.createInputTC({ - name: inputTypeName, - description, - fields: {}, - }); - const outputTC = this.schemaComposer.createObjectTC({ - name: outputTypeName, - description, - fields: {}, - }); - for (const [fieldName, { type, rule, comment, keyType }] of fieldEntries) { - logger.debug(`Visiting ${currentPath}.nested.fields[${fieldName}]`); - const baseFieldTypePath = type.split('.'); - inputTC.addFields({ - [fieldName]: { - type: () => { - let fieldInputTypeName: string; - if (keyType) { - fieldInputTypeName = 'JSON'; - } else { - const fieldTypePath = this.walkToFindTypePath( - rootJson, - pathWithName, - baseFieldTypePath, - ); - fieldInputTypeName = getTypeName(this.schemaComposer, fieldTypePath, true); - } - return rule === 'repeated' ? `[${fieldInputTypeName}]` : fieldInputTypeName; - }, - description: comment, - }, - }); - outputTC.addFields({ - [fieldName]: { - type: () => { - let fieldTypeName: string; - if (keyType) { - fieldTypeName = 'JSON'; - } else { - const fieldTypePath = this.walkToFindTypePath( - rootJson, - pathWithName, - baseFieldTypePath, - ); - fieldTypeName = getTypeName(this.schemaComposer, fieldTypePath, false); - } - return rule === 'repeated' ? `[${fieldTypeName}]` : fieldTypeName; - }, - description: comment, - }, - }); - } - } else { - this.schemaComposer.createScalarTC({ - ...GraphQLJSON.toConfig(), - name: inputTypeName, - description, - }); - this.schemaComposer.createScalarTC({ - ...GraphQLJSON.toConfig(), - name: outputTypeName, - description, - }); - } - } else if ('methods' in nested) { - const objPath = pathWithName.join('.'); - for (const methodName in nested.methods) { - const method = nested.methods[methodName]; - const rootFieldName = [...pathWithName, methodName].join('_'); - const fieldConfigTypeFactory = () => { - const baseResponseTypePath = method.responseType?.split('.'); - if (baseResponseTypePath) { - const responseTypePath = this.walkToFindTypePath( - rootJson, - pathWithName, - baseResponseTypePath, - ); - return getTypeName(this.schemaComposer, responseTypePath, false); - } - return 'Void'; - }; - const fieldConfig: ObjectTypeComposerFieldConfigAsObjectDefinition = { - type: () => { - const typeName = fieldConfigTypeFactory(); - if (method.responseStream) { - return `[${typeName}]`; - } - return typeName; - }, - description: method.comment, - }; - const fieldConfigArgs = { - input: () => { - if (method.requestStream) { - return 'File'; - } - const baseRequestTypePath = method.requestType?.split('.'); - if (baseRequestTypePath) { - const requestTypePath = this.walkToFindTypePath( - rootJson, - pathWithName, - baseRequestTypePath, - ); - const requestTypeName = getTypeName(this.schemaComposer, requestTypePath, true); - return requestTypeName; - } - return undefined; - }, - }; - fieldConfig.args = fieldConfigArgs; - const methodNameLowerCased = methodName.toLowerCase(); - const prefixQueryMethod = this.config.prefixQueryMethod || QUERY_METHOD_PREFIXES; - const rootTypeComposer = prefixQueryMethod.some(prefix => - methodNameLowerCased.startsWith(prefix), - ) - ? this.schemaComposer.Query - : this.schemaComposer.Mutation; - this.schemaComposer.addDirective(grpcMethodDirective); - rootTypeComposer.addFields({ - [rootFieldName]: { - ...fieldConfig, - directives: [ - { - name: 'grpcMethod', - args: { - rootJsonName, - objPath, - methodName, - responseStream: !!method.responseStream, - }, - }, - ], - }, - }); - if (method.responseStream) { - this.schemaComposer.Subscription.addFields({ - [rootFieldName]: { - args: fieldConfigArgs, - description: method.comment, - type: fieldConfigTypeFactory, - directives: [ - { - name: 'grpcMethod', - args: { - rootJsonName, - objPath, - methodName, - responseStream: true, - }, - }, - ], - }, - }); - } - } - const connectivityStateFieldName = pathWithName.join('_') + '_connectivityState'; - this.schemaComposer.addDirective(grpcConnectivityStateDirective); - this.schemaComposer.Query.addFields({ - [connectivityStateFieldName]: { - type: 'ConnectivityState', - args: { - tryToConnect: { - type: 'Boolean', - }, - }, - directives: [ - { - name: 'grpcConnectivityState', - args: { - rootJsonName, - objPath, - }, - }, - ], - }, - }); - } - } - - private schemaComposer = new SchemaComposer(); - - private async getCachedNonExecutableSchema(creds: ChannelCredentials) { + private getCachedNonExecutableSchema() { const interpolatedSource = this.config.source?.toString(); if (interpolatedSource?.endsWith('.graphql')) { this.logger.info(`Fetching GraphQL Schema with annotations`); - const sdl = await readFileOrUrl(interpolatedSource, { + return readFileOrUrl(interpolatedSource, { allowUnknownExtensions: true, cwd: this.baseDir, fetch: this.fetchFn, importFn: this.importFn, logger: this.logger, headers: this.config.schemaHeaders, - }); - return buildSchema(sdl, { - assumeValidSDL: true, - assumeValid: true, - }); + }).then(sdl => buildSchema(sdl, { assumeValidSDL: true, assumeValid: true })); } - return this.schemaWithAnnotationsProxy.getWithSet(async () => { - this.schemaComposer.add(GraphQLBigInt); - this.schemaComposer.add(GraphQLByte); - this.schemaComposer.add(GraphQLUnsignedInt); - this.schemaComposer.add(GraphQLVoid); - this.schemaComposer.add(GraphQLJSON); - this.schemaComposer.createScalarTC({ - name: 'File', - }); - // identical of grpc's ConnectivityState - this.schemaComposer.createEnumTC({ - name: 'ConnectivityState', - values: { - IDLE: { value: 0 }, - CONNECTING: { value: 1 }, - READY: { value: 2 }, - TRANSIENT_FAILURE: { value: 3 }, - SHUTDOWN: { value: 4 }, - }, - }); - - this.logger.debug(`Getting stored root and decoded descriptor set objects`); - const descriptorSets = await this.getDescriptorSets(creds); - - const directives: Directive[] = []; - for (const { name: rootJsonName, rootJson } of descriptorSets) { - const rootLogger = this.logger.child(rootJsonName); - - rootLogger.debug(`Creating package definition from file descriptor set object`); - let loadOptions: LoadOptions; - if (typeof this.config.source === 'object') { - loadOptions = this.config.source.load; - } - - this.logger.debug(`Building the schema structure based on the root object`); - this.visit({ - nested: rootJson, - name: '', - currentPath: [], - rootJsonName, - rootJson, - rootLogger, - loadOptions, - }); - - this.schemaComposer.addDirective(grpcRootJsonDirective); - directives.push({ - name: 'grpcRootJson', - args: { - name: rootJsonName, - rootJson, - }, - }); - } - this.schemaComposer.Query.setDirectives(directives); - - // graphql-compose doesn't add @defer and @stream to the schema - specifiedDirectives.forEach(directive => this.schemaComposer.addDirective(directive)); - - if (!this.schemaComposer.hasDirective('stream')) { - this.schemaComposer.addDirective(GraphQLStreamDirective); - } - - this.logger.debug(`Building the final GraphQL Schema`); - const schema = this.schemaComposer.buildSchema(); - return schema; - }); + return this.schemaWithAnnotationsProxy.getWithSet( + () => + loadGrpcSubgraph('grpc', this.config)({ cwd: this.baseDir, logger: this.logger }).schema$, + ); } - async getMeshSource({ fetchFn }: GetMeshSourcePayload) { - this.fetchFn = fetchFn; - this.config.requestTimeout = this.config.requestTimeout || 200000; - - this.logger.debug(`Getting channel credentials`); - const creds = await this.getCredentials(); - - const schema = await this.getCachedNonExecutableSchema(creds); - this.processDirectives({ schema, creds }); - return { - schema, - }; + getMeshSource() { + const transport = new GrpcTransportHelper( + this.baseDir, + this.logger, + this.config.endpoint, + this.config, + ); + const subId = this.pubsub.subscribe('destroy', () => { + transport.dispose(); + this.pubsub.unsubscribe(subId); + }); + return Promise.all([transport.getCredentials(), this.getCachedNonExecutableSchema()]).then( + ([creds, schema]) => { + transport.processDirectives({ schema, creds }); + return { + schema, + }; + }, + ); } } diff --git a/packages/legacy/handlers/grpc/test/__snapshots__/handler.spec.ts.snap b/packages/legacy/handlers/grpc/test/__snapshots__/handler.spec.ts.snap index 3d34175c70afe..0ba162c3583bc 100644 --- a/packages/legacy/handlers/grpc/test/__snapshots__/handler.spec.ts.snap +++ b/packages/legacy/handlers/grpc/test/__snapshots__/handler.spec.ts.snap @@ -1,16 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`gRPC Handler Interpreting Protos should load the Comments proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query mutation: Mutation } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -24,12 +24,14 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"foo\\":{\\"nested\\":{\\"SampleService\\":{\\"methods\\":{\\"CreateSample\\":{\\"requestType\\":\\"CreateSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 1: This is a comment with two slashes\\"},\\"GetSample\\":{\\"requestType\\":\\"GetSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 2: This is a comment with initial slash star and final star slash (all on one line)\\"},\\"UpdateSample\\":{\\"requestType\\":\\"UpdateSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 3: This is a comment with initial slash star star and final star slash (all on one line\\"},\\"DeleteSample\\":{\\"requestType\\":\\"DeleteSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 4: This is a comment on multiple lines, initial slash star star\\\\nat beginning of the line.\\"}},\\"comment\\":null},\\"SampleResponse\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":\\"Comment 5: This is a comment on one line, delimiters slash star star at beginning of the line. Trailing comment delimiter at beginning of next line after comment.\\"},\\"CreateSampleRequest\\":{\\"fields\\":{\\"description\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 6: This is a comment with slash followed by two stars at the beginning. The first comment delimiter is at the beginning of the line. Trailing comment delimiter on same line as text.\\"},\\"type\\":{\\"type\\":\\"string\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null},\\"GetSampleRequest\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 8: This is a comment with slash star delimiter on the same line as a field definition.\\"}},\\"comment\\":\\"Comment 7: This is a comment with slash followed by two stars at the beginning. The first comment delimiter is not at the beginning of the line.\\"},\\"UpdateSampleRequest\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 10: This is a comment with slash star star delimiter on the same line as a field definition.\\"}},\\"comment\\":null},\\"DeleteSampleRequest\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 12: This is a two-slash comment on the same line as a field definition.\\"}},\\"comment\\":null}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"foo\\":{\\"nested\\":{\\"SampleService\\":{\\"methods\\":{\\"CreateSample\\":{\\"requestType\\":\\"CreateSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 1: This is a comment with two slashes\\"},\\"GetSample\\":{\\"requestType\\":\\"GetSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 2: This is a comment with initial slash star and final star slash (all on one line)\\"},\\"UpdateSample\\":{\\"requestType\\":\\"UpdateSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 3: This is a comment with initial slash star star and final star slash (all on one line\\"},\\"DeleteSample\\":{\\"requestType\\":\\"DeleteSampleRequest\\",\\"responseType\\":\\"SampleResponse\\",\\"comment\\":\\"Comment 4: This is a comment on multiple lines, initial slash star star\\\\nat beginning of the line.\\"}},\\"comment\\":null},\\"SampleResponse\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":\\"Comment 5: This is a comment on one line, delimiters slash star star at beginning of the line. Trailing comment delimiter at beginning of next line after comment.\\"},\\"CreateSampleRequest\\":{\\"fields\\":{\\"description\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 6: This is a comment with slash followed by two stars at the beginning. The first comment delimiter is at the beginning of the line. Trailing comment delimiter on same line as text.\\"},\\"type\\":{\\"type\\":\\"string\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null},\\"GetSampleRequest\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 8: This is a comment with slash star delimiter on the same line as a field definition.\\"}},\\"comment\\":\\"Comment 7: This is a comment with slash followed by two stars at the beginning. The first comment delimiter is not at the beginning of the line.\\"},\\"UpdateSampleRequest\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 10: This is a comment with slash star star delimiter on the same line as a field definition.\\"}},\\"comment\\":null},\\"DeleteSampleRequest\\":{\\"fields\\":{\\"sample_id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":\\"Comment 12: This is a two-slash comment on the same line as a field definition.\\"}},\\"comment\\":null}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { """ Comment 2: This is a comment with initial slash star and final star slash (all on one line) """ - foo_SampleService_GetSample(input: foo__GetSampleRequest_Input): foo__SampleResponse @grpcMethod(rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "GetSample", responseStream: false) - foo_SampleService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "foo.SampleService") + foo_SampleService_GetSample(input: foo__GetSampleRequest_Input): foo__SampleResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "GetSample", responseStream: false) + foo_SampleService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "foo.SampleService") } """ @@ -59,16 +61,16 @@ enum ConnectivityState { type Mutation { """Comment 1: This is a comment with two slashes""" - foo_SampleService_CreateSample(input: foo__CreateSampleRequest_Input): foo__SampleResponse @grpcMethod(rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "CreateSample", responseStream: false) + foo_SampleService_CreateSample(input: foo__CreateSampleRequest_Input): foo__SampleResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "CreateSample", responseStream: false) """ Comment 3: This is a comment with initial slash star star and final star slash (all on one line """ - foo_SampleService_UpdateSample(input: foo__UpdateSampleRequest_Input): foo__SampleResponse @grpcMethod(rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "UpdateSample", responseStream: false) + foo_SampleService_UpdateSample(input: foo__UpdateSampleRequest_Input): foo__SampleResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "UpdateSample", responseStream: false) """ Comment 4: This is a comment on multiple lines, initial slash star star at beginning of the line. """ - foo_SampleService_DeleteSample(input: foo__DeleteSampleRequest_Input): foo__SampleResponse @grpcMethod(rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "DeleteSample", responseStream: false) + foo_SampleService_DeleteSample(input: foo__DeleteSampleRequest_Input): foo__SampleResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "foo.SampleService", methodName: "DeleteSample", responseStream: false) } input foo__CreateSampleRequest_Input { @@ -93,19 +95,32 @@ input foo__DeleteSampleRequest_Input { sample_id: String } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Custom Message proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -119,9 +134,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"foos\\":{\\"nested\\":{\\"BamService\\":{\\"methods\\":{\\"GetW\\":{\\"requestType\\":\\"GetBamRequest\\",\\"responseType\\":\\"GetFoosResponse\\",\\"comment\\":null}},\\"comment\\":null},\\"GetBamRequest\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int32\\",\\"id\\":1,\\"comment\\":null},\\"abcd\\":{\\"type\\":\\"Bam\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null},\\"Bam\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int64\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"GetFoosResponse\\":{\\"fields\\":{\\"abcd\\":{\\"type\\":\\"Bam\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null}}}}}") { - foos_BamService_GetW(input: foos__GetBamRequest_Input): foos__GetFoosResponse @grpcMethod(rootJsonName: "Root0", objPath: "foos.BamService", methodName: "GetW", responseStream: false) - foos_BamService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "foos.BamService") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"foos\\":{\\"nested\\":{\\"BamService\\":{\\"methods\\":{\\"GetW\\":{\\"requestType\\":\\"GetBamRequest\\",\\"responseType\\":\\"GetFoosResponse\\",\\"comment\\":null}},\\"comment\\":null},\\"GetBamRequest\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int32\\",\\"id\\":1,\\"comment\\":null},\\"abcd\\":{\\"type\\":\\"Bam\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null},\\"Bam\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int64\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"GetFoosResponse\\":{\\"fields\\":{\\"abcd\\":{\\"type\\":\\"Bam\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null}}}}}") { + foos_BamService_GetW(input: foos__GetBamRequest_Input): foos__GetFoosResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "foos.BamService", methodName: "GetW", responseStream: false) + foos_BamService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "foos.BamService") } type foos__GetFoosResponse { @@ -154,19 +171,32 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Custom Message2 proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -180,9 +210,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"foo\\":{\\"nested\\":{\\"BamService\\":{\\"methods\\":{\\"GetFOOs\\":{\\"requestType\\":\\"GetFOOsRequest\\",\\"responseType\\":\\"GetFOOsResponse\\",\\"comment\\":null}},\\"comment\\":null},\\"GetFOOsRequest\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int32\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"FOO\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int64\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"GetFOOsResponse\\":{\\"fields\\":{\\"foos\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"FOO\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null}}}}}") { - foo_BamService_GetFOOs(input: foo__GetFOOsRequest_Input): foo__GetFOOsResponse @grpcMethod(rootJsonName: "Root0", objPath: "foo.BamService", methodName: "GetFOOs", responseStream: false) - foo_BamService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "foo.BamService") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"foo\\":{\\"nested\\":{\\"BamService\\":{\\"methods\\":{\\"GetFOOs\\":{\\"requestType\\":\\"GetFOOsRequest\\",\\"responseType\\":\\"GetFOOsResponse\\",\\"comment\\":null}},\\"comment\\":null},\\"GetFOOsRequest\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int32\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"FOO\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"int64\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"GetFOOsResponse\\":{\\"fields\\":{\\"foos\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"FOO\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null}}}}}") { + foo_BamService_GetFOOs(input: foo__GetFOOsRequest_Input): foo__GetFOOsResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "foo.BamService", methodName: "GetFOOs", responseStream: false) + foo_BamService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "foo.BamService") } type foo__GetFOOsResponse { @@ -210,22 +242,35 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Empty proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query subscription: Subscription } -directive @enum(value: String) on ENUM_VALUE +directive @enum(subgraph: String, value: String) on ENUM_VALUE -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -239,18 +284,20 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"GetEmpty\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"EmptyRequest\\",\\"comment\\":null},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"GetEmpty\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"EmptyRequest\\",\\"comment\\":null},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { """get all movies""" - io_xtech_Example_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) - io_xtech_Example_GetEmpty(input: io__xtech__MovieRequest_Input): io__xtech__EmptyRequest @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetEmpty", responseStream: false) + io_xtech_Example_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) + io_xtech_Example_GetEmpty(input: io__xtech__MovieRequest_Input): io__xtech__EmptyRequest @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetEmpty", responseStream: false) """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.Example") + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example") """get all movies""" - io_xtech_AnotherExample_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) + io_xtech_AnotherExample_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") } """movie result message, contains list of movies""" @@ -281,9 +328,9 @@ The \`BigInt\` scalar type represents non-fractional signed whole numeric values scalar BigInt enum io__xtech__Genre { - UNSPECIFIED @enum(value: "0") - ACTION @enum(value: "1") - DRAMA @enum(value: "2") + UNSPECIFIED @enum(subgraph: "grpc", value: "0") + ACTION @enum(subgraph: "grpc", value: "1") + DRAMA @enum(subgraph: "grpc", value: "2") } input io__xtech__MovieRequest_Input { @@ -322,26 +369,39 @@ enum ConnectivityState { type Subscription { """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) +} + +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap } -scalar ObjMap" +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Enums proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @enum(value: String) on ENUM_VALUE +directive @enum(subgraph: String, value: String) on ENUM_VALUE -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -355,9 +415,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"OrganizationStateProto\\":{\\"values\\":{\\"UNKNOWN\\":0,\\"ACTIVE\\":1,\\"PENDING_PAYMENT\\":2,\\"SUSPENDED\\":3},\\"comment\\":null,\\"comments\\":{\\"UNKNOWN\\":null,\\"ACTIVE\\":null,\\"PENDING_PAYMENT\\":null,\\"SUSPENDED\\":null}},\\"OrganizationProto\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"owner\\":{\\"type\\":\\"string\\",\\"id\\":2,\\"comment\\":null},\\"name\\":{\\"type\\":\\"string\\",\\"id\\":3,\\"comment\\":null},\\"description\\":{\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":null},\\"image_url\\":{\\"type\\":\\"string\\",\\"id\\":5,\\"comment\\":null},\\"state\\":{\\"type\\":\\"OrganizationStateProto\\",\\"id\\":6,\\"comment\\":null},\\"default_org\\":{\\"type\\":\\"bool\\",\\"id\\":7,\\"comment\\":null}},\\"comment\\":null},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"OrganizationService\\":{\\"methods\\":{\\"GetOrganization\\":{\\"requestType\\":\\"EmptyRequest\\",\\"responseType\\":\\"OrganizationProto\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { - io_xtech_OrganizationService_GetOrganization(input: io__xtech__EmptyRequest_Input): io__xtech__OrganizationProto @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.OrganizationService", methodName: "GetOrganization", responseStream: false) - io_xtech_OrganizationService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.OrganizationService") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"OrganizationStateProto\\":{\\"values\\":{\\"UNKNOWN\\":0,\\"ACTIVE\\":1,\\"PENDING_PAYMENT\\":2,\\"SUSPENDED\\":3},\\"comment\\":null,\\"comments\\":{\\"UNKNOWN\\":null,\\"ACTIVE\\":null,\\"PENDING_PAYMENT\\":null,\\"SUSPENDED\\":null}},\\"OrganizationProto\\":{\\"fields\\":{\\"id\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"owner\\":{\\"type\\":\\"string\\",\\"id\\":2,\\"comment\\":null},\\"name\\":{\\"type\\":\\"string\\",\\"id\\":3,\\"comment\\":null},\\"description\\":{\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":null},\\"image_url\\":{\\"type\\":\\"string\\",\\"id\\":5,\\"comment\\":null},\\"state\\":{\\"type\\":\\"OrganizationStateProto\\",\\"id\\":6,\\"comment\\":null},\\"default_org\\":{\\"type\\":\\"bool\\",\\"id\\":7,\\"comment\\":null}},\\"comment\\":null},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"OrganizationService\\":{\\"methods\\":{\\"GetOrganization\\":{\\"requestType\\":\\"EmptyRequest\\",\\"responseType\\":\\"OrganizationProto\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { + io_xtech_OrganizationService_GetOrganization(input: io__xtech__EmptyRequest_Input): io__xtech__OrganizationProto @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.OrganizationService", methodName: "GetOrganization", responseStream: false) + io_xtech_OrganizationService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.OrganizationService") } type io__xtech__OrganizationProto { @@ -371,10 +433,10 @@ type io__xtech__OrganizationProto { } enum io__xtech__OrganizationStateProto { - UNKNOWN @enum(value: "0") - ACTIVE @enum(value: "1") - PENDING_PAYMENT @enum(value: "2") - SUSPENDED @enum(value: "3") + UNKNOWN @enum(subgraph: "grpc", value: "0") + ACTIVE @enum(subgraph: "grpc", value: "1") + PENDING_PAYMENT @enum(subgraph: "grpc", value: "2") + SUSPENDED @enum(subgraph: "grpc", value: "3") } scalar io__xtech__EmptyRequest_Input @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf") @@ -387,19 +449,32 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Import Nested proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -413,11 +488,13 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"outer\\":{\\"nested\\":{\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"io.xtech.TopLevel.Nested\\",\\"responseType\\":\\"io.xtech.Result\\",\\"comment\\":null}},\\"comment\\":null}}},\\"Item\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"TopLevel\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"nested_usage\\":{\\"type\\":\\"Nested\\",\\"id\\":3,\\"comment\\":null}},\\"nested\\":{\\"Nested\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Item\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TopLevel.Nested\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { - io_xtech_outer_Example_Get(input: io__xtech__TopLevel__Nested_Input): io__xtech__Result @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.outer.Example", methodName: "Get", responseStream: false) - io_xtech_outer_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.outer.Example") - io_xtech_Example_Get(input: io__xtech__TopLevel__Nested_Input): io__xtech__Result @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "Get", responseStream: false) - io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.Example") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"outer\\":{\\"nested\\":{\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"io.xtech.TopLevel.Nested\\",\\"responseType\\":\\"io.xtech.Result\\",\\"comment\\":null}},\\"comment\\":null}}},\\"Item\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"TopLevel\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"nested_usage\\":{\\"type\\":\\"Nested\\",\\"id\\":3,\\"comment\\":null}},\\"nested\\":{\\"Nested\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Item\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TopLevel.Nested\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { + io_xtech_outer_Example_Get(input: io__xtech__TopLevel__Nested_Input): io__xtech__Result @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.outer.Example", methodName: "Get", responseStream: false) + io_xtech_outer_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.outer.Example") + io_xtech_Example_Get(input: io__xtech__TopLevel__Nested_Input): io__xtech__Result @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "Get", responseStream: false) + io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example") } type io__xtech__Result { @@ -444,19 +521,32 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Input bug 5880 proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -470,9 +560,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"TestMessage\\":{\\"fields\\":{\\"input\\":{\\"type\\":\\"Input\\",\\"id\\":1,\\"comment\\":null}},\\"nested\\":{\\"Input\\":{\\"fields\\":{},\\"comment\\":null}},\\"comment\\":null},\\"TestService\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TestMessage\\",\\"responseType\\":\\"TestMessage\\",\\"comment\\":null}},\\"comment\\":null}}}") { - TestService_Get(input: TestMessage_Input): TestMessage @grpcMethod(rootJsonName: "Root0", objPath: "TestService", methodName: "Get", responseStream: false) - TestService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "TestService") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"TestMessage\\":{\\"fields\\":{\\"input\\":{\\"type\\":\\"Input\\",\\"id\\":1,\\"comment\\":null}},\\"nested\\":{\\"Input\\":{\\"fields\\":{},\\"comment\\":null}},\\"comment\\":null},\\"TestService\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TestMessage\\",\\"responseType\\":\\"TestMessage\\",\\"comment\\":null}},\\"comment\\":null}}}") { + TestService_Get(input: TestMessage_Input): TestMessage @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "TestService", methodName: "Get", responseStream: false) + TestService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "TestService") } type TestMessage { @@ -495,19 +587,32 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Map proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -521,9 +626,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"MapRequest\\":{\\"fields\\":{\\"map\\":{\\"keyType\\":\\"string\\",\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MapResponse\\":{\\"fields\\":{\\"map\\":{\\"keyType\\":\\"string\\",\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MapService\\":{\\"methods\\":{\\"GetMap\\":{\\"requestType\\":\\"MapRequest\\",\\"responseType\\":\\"MapResponse\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { - io_xtech_MapService_GetMap(input: io__xtech__MapRequest_Input): io__xtech__MapResponse @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.MapService", methodName: "GetMap", responseStream: false) - io_xtech_MapService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.MapService") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"MapRequest\\":{\\"fields\\":{\\"map\\":{\\"keyType\\":\\"string\\",\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MapResponse\\":{\\"fields\\":{\\"map\\":{\\"keyType\\":\\"string\\",\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MapService\\":{\\"methods\\":{\\"GetMap\\":{\\"requestType\\":\\"MapRequest\\",\\"responseType\\":\\"MapResponse\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { + io_xtech_MapService_GetMap(input: io__xtech__MapRequest_Input): io__xtech__MapResponse @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.MapService", methodName: "GetMap", responseStream: false) + io_xtech_MapService_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.MapService") } type io__xtech__MapResponse { @@ -547,22 +654,35 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Movie proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query subscription: Subscription } -directive @enum(value: String) on ENUM_VALUE +directive @enum(subgraph: String, value: String) on ENUM_VALUE -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -576,17 +696,19 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { """get all movies""" - io_xtech_Example_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) + io_xtech_Example_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.Example") + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example") """get all movies""" - io_xtech_AnotherExample_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) + io_xtech_AnotherExample_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") } """movie result message, contains list of movies""" @@ -617,9 +739,9 @@ The \`BigInt\` scalar type represents non-fractional signed whole numeric values scalar BigInt enum io__xtech__Genre { - UNSPECIFIED @enum(value: "0") - ACTION @enum(value: "1") - DRAMA @enum(value: "2") + UNSPECIFIED @enum(subgraph: "grpc", value: "0") + ACTION @enum(subgraph: "grpc", value: "1") + DRAMA @enum(subgraph: "grpc", value: "2") } input io__xtech__MovieRequest_Input { @@ -656,24 +778,37 @@ enum ConnectivityState { type Subscription { """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) +} + +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap } -scalar ObjMap" +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Nested proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -687,9 +822,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Item\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"TopLevel\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"nested_usage\\":{\\"type\\":\\"Nested\\",\\"id\\":3,\\"comment\\":null}},\\"nested\\":{\\"Nested\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Item\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TopLevel.Nested\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { - io_xtech_Example_Get(input: io__xtech__TopLevel__Nested_Input): io__xtech__Result @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "Get", responseStream: false) - io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.Example") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Item\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"TopLevel\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"nested_usage\\":{\\"type\\":\\"Nested\\",\\"id\\":3,\\"comment\\":null}},\\"nested\\":{\\"Nested\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Item\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TopLevel.Nested\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}}}}}") { + io_xtech_Example_Get(input: io__xtech__TopLevel__Nested_Input): io__xtech__Result @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "Get", responseStream: false) + io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example") } type io__xtech__Result { @@ -716,19 +853,32 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the No Package Nested proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -742,9 +892,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"Item\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"TopLevel\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"nested_usage\\":{\\"type\\":\\"Nested\\",\\"id\\":3,\\"comment\\":null}},\\"nested\\":{\\"Nested\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Item\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TopLevel.Nested\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}") { - Example_Get(input: TopLevel__Nested_Input): Result @grpcMethod(rootJsonName: "Root0", objPath: "Example", methodName: "Get", responseStream: false) - Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "Example") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"Item\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"TopLevel\\":{\\"fields\\":{\\"value\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"nested_usage\\":{\\"type\\":\\"Nested\\",\\"id\\":3,\\"comment\\":null}},\\"nested\\":{\\"Nested\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Item\\",\\"id\\":2,\\"comment\\":null}},\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"TopLevel.Nested\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}") { + Example_Get(input: TopLevel__Nested_Input): Result @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example", methodName: "Get", responseStream: false) + Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example") } type Result { @@ -771,22 +923,35 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the Outside proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query subscription: Subscription } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @enum(value: String) on ENUM_VALUE +directive @enum(subgraph: String, value: String) on ENUM_VALUE -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -800,19 +965,21 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"outside\\":{\\"nested\\":{\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"io.xtech.Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"io.xtech.Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":null}},\\"comment\\":null}}},\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { - io_outside_Example_GetMovies(input: io__outside__MovieRequest_Input): io__outside__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.outside.Example", methodName: "GetMovies", responseStream: false) - io_outside_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.outside.Example") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"outside\\":{\\"nested\\":{\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"io.xtech.Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"io.xtech.Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":null}},\\"comment\\":null}}},\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"MovieRequest\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"MovieRequest\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { + io_outside_Example_GetMovies(input: io__outside__MovieRequest_Input): io__outside__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.outside.Example", methodName: "GetMovies", responseStream: false) + io_outside_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.outside.Example") """get all movies""" - io_xtech_Example_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) + io_xtech_Example_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.Example") + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example") """get all movies""" - io_xtech_AnotherExample_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) + io_xtech_AnotherExample_GetMovies(input: io__xtech__MovieRequest_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") } type io__outside__MoviesResult { @@ -841,9 +1008,9 @@ The \`BigInt\` scalar type represents non-fractional signed whole numeric values scalar BigInt enum io__xtech__Genre { - UNSPECIFIED @enum(value: "0") - ACTION @enum(value: "1") - DRAMA @enum(value: "2") + UNSPECIFIED @enum(subgraph: "grpc", value: "0") + ACTION @enum(subgraph: "grpc", value: "1") + DRAMA @enum(subgraph: "grpc", value: "2") } input io__outside__MovieRequest_Input { @@ -890,24 +1057,37 @@ input io__xtech__SearchByCastRequest_Input { type Subscription { """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the With All Values proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query } -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -921,9 +1101,11 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"Item\\":{\\"fields\\":{\\"boolean\\":{\\"type\\":\\"bool\\",\\"id\\":1,\\"comment\\":null},\\"bytesType\\":{\\"type\\":\\"bytes\\",\\"id\\":2,\\"comment\\":null},\\"doubleNum\\":{\\"type\\":\\"double\\",\\"id\\":3,\\"comment\\":null},\\"fixedint32\\":{\\"type\\":\\"fixed32\\",\\"id\\":4,\\"comment\\":null},\\"fixedint64\\":{\\"type\\":\\"fixed64\\",\\"id\\":5,\\"comment\\":null},\\"floatNum\\":{\\"type\\":\\"float\\",\\"id\\":6,\\"comment\\":null},\\"integer32\\":{\\"type\\":\\"int32\\",\\"id\\":7,\\"comment\\":null},\\"integer64\\":{\\"type\\":\\"int64\\",\\"id\\":8,\\"comment\\":null},\\"sfixedint32\\":{\\"type\\":\\"sfixed32\\",\\"id\\":9,\\"comment\\":null},\\"sfixedint64\\":{\\"type\\":\\"sfixed64\\",\\"id\\":10,\\"comment\\":null},\\"sinteger32\\":{\\"type\\":\\"sint32\\",\\"id\\":11,\\"comment\\":null},\\"sinteger64\\":{\\"type\\":\\"sint64\\",\\"id\\":12,\\"comment\\":null},\\"str\\":{\\"type\\":\\"string\\",\\"id\\":13,\\"comment\\":null},\\"uinteger32\\":{\\"type\\":\\"uint32\\",\\"id\\":14,\\"comment\\":null},\\"uinteger64\\":{\\"type\\":\\"uint64\\",\\"id\\":15,\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"Item\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}") { - Example_Get(input: Item_Input): Result @grpcMethod(rootJsonName: "Root0", objPath: "Example", methodName: "Get", responseStream: false) - Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "Example") +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"Item\\":{\\"fields\\":{\\"boolean\\":{\\"type\\":\\"bool\\",\\"id\\":1,\\"comment\\":null},\\"bytesType\\":{\\"type\\":\\"bytes\\",\\"id\\":2,\\"comment\\":null},\\"doubleNum\\":{\\"type\\":\\"double\\",\\"id\\":3,\\"comment\\":null},\\"fixedint32\\":{\\"type\\":\\"fixed32\\",\\"id\\":4,\\"comment\\":null},\\"fixedint64\\":{\\"type\\":\\"fixed64\\",\\"id\\":5,\\"comment\\":null},\\"floatNum\\":{\\"type\\":\\"float\\",\\"id\\":6,\\"comment\\":null},\\"integer32\\":{\\"type\\":\\"int32\\",\\"id\\":7,\\"comment\\":null},\\"integer64\\":{\\"type\\":\\"int64\\",\\"id\\":8,\\"comment\\":null},\\"sfixedint32\\":{\\"type\\":\\"sfixed32\\",\\"id\\":9,\\"comment\\":null},\\"sfixedint64\\":{\\"type\\":\\"sfixed64\\",\\"id\\":10,\\"comment\\":null},\\"sinteger32\\":{\\"type\\":\\"sint32\\",\\"id\\":11,\\"comment\\":null},\\"sinteger64\\":{\\"type\\":\\"sint64\\",\\"id\\":12,\\"comment\\":null},\\"str\\":{\\"type\\":\\"string\\",\\"id\\":13,\\"comment\\":null},\\"uinteger32\\":{\\"type\\":\\"uint32\\",\\"id\\":14,\\"comment\\":null},\\"uinteger64\\":{\\"type\\":\\"uint64\\",\\"id\\":15,\\"comment\\":null}},\\"comment\\":null},\\"Result\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Item\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"Example\\":{\\"methods\\":{\\"Get\\":{\\"requestType\\":\\"Item\\",\\"responseType\\":\\"Result\\",\\"comment\\":null}},\\"comment\\":null}}}") { + Example_Get(input: Item_Input): Result @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example", methodName: "Get", responseStream: false) + Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "Example") } type Result { @@ -985,22 +1167,35 @@ enum ConnectivityState { SHUTDOWN } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Interpreting Protos should load the With Underscores proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query subscription: Subscription } -directive @enum(value: String) on ENUM_VALUE +directive @enum(subgraph: String, value: String) on ENUM_VALUE -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -1014,17 +1209,19 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"movie_request\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"movie_request\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { """get all movies""" - io_xtech_Example_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) + io_xtech_Example_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.Example") + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example") """get all movies""" - io_xtech_AnotherExample_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) + io_xtech_AnotherExample_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) - io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") } """movie result message, contains list of movies""" @@ -1055,9 +1252,9 @@ The \`BigInt\` scalar type represents non-fractional signed whole numeric values scalar BigInt enum io__xtech__Genre { - UNSPECIFIED @enum(value: "0") - ACTION @enum(value: "1") - DRAMA @enum(value: "2") + UNSPECIFIED @enum(subgraph: "grpc", value: "0") + ACTION @enum(subgraph: "grpc", value: "1") + DRAMA @enum(subgraph: "grpc", value: "2") } input io__xtech__movie_request_Input { @@ -1094,28 +1291,41 @@ enum ConnectivityState { type Subscription { """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) } -scalar ObjMap" +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap +} + +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; exports[`gRPC Handler Load proto with prefixQueryMethod should load the retrieve-movie.proto 1`] = ` -"schema { +"schema @transport(subgraph: "grpc", kind: "grpc", location: "localhost", options: {requestTimeout: 200000}) { query: Query mutation: Mutation subscription: Subscription } -directive @enum(value: String) on ENUM_VALUE +directive @enum(subgraph: String, value: String) on ENUM_VALUE -directive @grpcMethod(rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION +directive @grpcMethod(subgraph: String, rootJsonName: String, objPath: String, methodName: String, responseStream: Boolean) on FIELD_DEFINITION -directive @grpcConnectivityState(rootJsonName: String, objPath: String) on FIELD_DEFINITION +directive @grpcConnectivityState(subgraph: String, rootJsonName: String, objPath: String) on FIELD_DEFINITION -directive @grpcRootJson(name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT +directive @grpcRootJson(subgraph: String, name: String, rootJson: ObjMap, loadOptions: ObjMap) repeatable on OBJECT """ Directs the executor to stream plural fields when the \`if\` argument is true or undefined. @@ -1129,17 +1339,19 @@ directive @stream( initialCount: Int = 0 ) on FIELD -type Query @grpcRootJson(name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"movie_request\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"movie_request_by_ids\\":{\\"fields\\":{\\"movieIds\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"RetrieveMovies\\":{\\"requestType\\":\\"movie_request_by_ids\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"RetrieveMovies\\":{\\"requestType\\":\\"movie_request_by_ids\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { +directive @transport(subgraph: String, kind: String, location: String, options: TransportOptions) repeatable on SCHEMA + +type Query @grpcRootJson(subgraph: "grpc", name: "Root0", rootJson: "{\\"options\\":{\\"syntax\\":\\"proto3\\"},\\"nested\\":{\\"io\\":{\\"nested\\":{\\"xtech\\":{\\"nested\\":{\\"Genre\\":{\\"values\\":{\\"UNSPECIFIED\\":0,\\"ACTION\\":1,\\"DRAMA\\":2},\\"comment\\":null,\\"comments\\":{\\"UNSPECIFIED\\":null,\\"ACTION\\":null,\\"DRAMA\\":null}},\\"Movie\\":{\\"fields\\":{\\"name\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null},\\"year\\":{\\"type\\":\\"int32\\",\\"id\\":2,\\"comment\\":null},\\"rating\\":{\\"type\\":\\"float\\",\\"id\\":3,\\"comment\\":null},\\"cast\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":4,\\"comment\\":\\"list of cast\\"},\\"time\\":{\\"type\\":\\"google.protobuf.Timestamp\\",\\"id\\":5,\\"comment\\":null},\\"genre\\":{\\"type\\":\\"Genre\\",\\"id\\":6,\\"comment\\":null}},\\"comment\\":\\"movie message payload\\"},\\"EmptyRequest\\":{\\"fields\\":{},\\"comment\\":null},\\"movie_request\\":{\\"fields\\":{\\"movie\\":{\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"movie_request_by_ids\\":{\\"fields\\":{\\"movieIds\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"SearchByCastRequest\\":{\\"fields\\":{\\"castName\\":{\\"type\\":\\"string\\",\\"id\\":1,\\"comment\\":null}},\\"comment\\":null},\\"MoviesResult\\":{\\"fields\\":{\\"result\\":{\\"rule\\":\\"repeated\\",\\"type\\":\\"Movie\\",\\"id\\":1,\\"comment\\":\\"list of movies\\"}},\\"comment\\":\\"movie result message, contains list of movies\\"},\\"Example\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"RetrieveMovies\\":{\\"requestType\\":\\"movie_request_by_ids\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null},\\"AnotherExample\\":{\\"methods\\":{\\"GetMovies\\":{\\"requestType\\":\\"movie_request\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get all movies\\"},\\"RetrieveMovies\\":{\\"requestType\\":\\"movie_request_by_ids\\",\\"responseType\\":\\"MoviesResult\\",\\"comment\\":\\"get movies\\"},\\"SearchMoviesByCast\\":{\\"requestType\\":\\"SearchByCastRequest\\",\\"responseType\\":\\"Movie\\",\\"responseStream\\":true,\\"comment\\":\\"search movies by the name of the cast\\"}},\\"comment\\":null}}}}},\\"google\\":{\\"nested\\":{\\"protobuf\\":{\\"nested\\":{\\"Timestamp\\":{\\"fields\\":{\\"seconds\\":{\\"type\\":\\"int64\\",\\"id\\":1},\\"nanos\\":{\\"type\\":\\"int32\\",\\"id\\":2}},\\"comment\\":null}}}}}}}") { """get all movies""" - io_xtech_Example_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) + io_xtech_Example_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "GetMovies", responseStream: false) """get movies""" - io_xtech_Example_RetrieveMovies(input: io__xtech__movie_request_by_ids_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "RetrieveMovies", responseStream: false) - io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.Example") + io_xtech_Example_RetrieveMovies(input: io__xtech__movie_request_by_ids_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "RetrieveMovies", responseStream: false) + io_xtech_Example_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example") """get all movies""" - io_xtech_AnotherExample_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) + io_xtech_AnotherExample_GetMovies(input: io__xtech__movie_request_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "GetMovies", responseStream: false) """get movies""" - io_xtech_AnotherExample_RetrieveMovies(input: io__xtech__movie_request_by_ids_Input): io__xtech__MoviesResult @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "RetrieveMovies", responseStream: false) - io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") + io_xtech_AnotherExample_RetrieveMovies(input: io__xtech__movie_request_by_ids_Input): io__xtech__MoviesResult @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "RetrieveMovies", responseStream: false) + io_xtech_AnotherExample_connectivityState(tryToConnect: Boolean): ConnectivityState @grpcConnectivityState(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample") } """movie result message, contains list of movies""" @@ -1170,9 +1382,9 @@ The \`BigInt\` scalar type represents non-fractional signed whole numeric values scalar BigInt enum io__xtech__Genre { - UNSPECIFIED @enum(value: "0") - ACTION @enum(value: "1") - DRAMA @enum(value: "2") + UNSPECIFIED @enum(subgraph: "grpc", value: "0") + ACTION @enum(subgraph: "grpc", value: "1") + DRAMA @enum(subgraph: "grpc", value: "2") } input io__xtech__movie_request_Input { @@ -1209,9 +1421,9 @@ enum ConnectivityState { type Mutation { """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): [io__xtech__Movie] @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) } input io__xtech__SearchByCastRequest_Input { @@ -1220,10 +1432,23 @@ input io__xtech__SearchByCastRequest_Input { type Subscription { """search movies by the name of the cast""" - io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_Example_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.Example", methodName: "SearchMoviesByCast", responseStream: true) """search movies by the name of the cast""" - io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) + io_xtech_AnotherExample_SearchMoviesByCast(input: io__xtech__SearchByCastRequest_Input): io__xtech__Movie @grpcMethod(subgraph: "grpc", rootJsonName: "Root0", objPath: "io.xtech.AnotherExample", methodName: "SearchMoviesByCast", responseStream: true) +} + +scalar ObjMap + +input TransportOptions { + requestTimeout: Int + credentialsSsl: GrpcCredentialsSsl + useHTTPS: Boolean + metaData: ObjMap } -scalar ObjMap" +input GrpcCredentialsSsl { + rootCA: String + certChain: String + privateKey: String +}" `; diff --git a/packages/legacy/handlers/grpc/test/handler.spec.ts b/packages/legacy/handlers/grpc/test/handler.spec.ts index eb9dfd6765e38..10a5a1db0a29e 100644 --- a/packages/legacy/handlers/grpc/test/handler.spec.ts +++ b/packages/legacy/handlers/grpc/test/handler.spec.ts @@ -60,7 +60,7 @@ describe('gRPC Handler', () => { importFn: defaultImportFn, baseDir: __dirname, }); - const { schema } = await handler.getMeshSource({ fetchFn }); + const { schema } = await handler.getMeshSource(); expect(schema).toBeInstanceOf(GraphQLSchema); expect(validateSchema(schema)).toHaveLength(0); @@ -68,8 +68,6 @@ describe('gRPC Handler', () => { expect(printedSDL).toMatchSnapshot(); const loadedFromPrintedSDL = buildSchema(printedSDL, { noLocation: true }); expect(validateSchema(loadedFromPrintedSDL)).toHaveLength(0); - const creds = await handler.getCredentials(); - handler.processDirectives({ schema: loadedFromPrintedSDL, creds }); }); }); @@ -95,7 +93,7 @@ describe('gRPC Handler', () => { baseDir: __dirname, }); - const { schema } = await handler.getMeshSource({ fetchFn }); + const { schema } = await handler.getMeshSource(); expect(schema).toBeInstanceOf(GraphQLSchema); expect(validateSchema(schema)).toHaveLength(0); diff --git a/packages/legacy/handlers/postgraphile/package.json b/packages/legacy/handlers/postgraphile/package.json index b9d20075e0914..68df069b86b2d 100644 --- a/packages/legacy/handlers/postgraphile/package.json +++ b/packages/legacy/handlers/postgraphile/package.json @@ -41,7 +41,7 @@ }, "dependencies": { "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "pg": "^8.6.0", "postgraphile": "^4.13.0", "postgraphile-core": "^4.13.0" diff --git a/packages/legacy/handlers/supergraph/package.json b/packages/legacy/handlers/supergraph/package.json index 1c621763981fc..a76ca416279ec 100644 --- a/packages/legacy/handlers/supergraph/package.json +++ b/packages/legacy/handlers/supergraph/package.json @@ -41,8 +41,8 @@ }, "dependencies": { "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/federation": "^2.2.19", - "@graphql-tools/url-loader": "^8.0.8", + "@graphql-tools/federation": "^2.2.21", + "@graphql-tools/url-loader": "^8.0.9", "@graphql-tools/utils": "^10.5.5", "lodash.get": "^4.4.2" }, diff --git a/packages/legacy/mergers/federation/package.json b/packages/legacy/mergers/federation/package.json index 47cdd7c1ed449..5556593157da9 100644 --- a/packages/legacy/mergers/federation/package.json +++ b/packages/legacy/mergers/federation/package.json @@ -44,7 +44,7 @@ "dependencies": { "@apollo/gateway": "^2.4.1", "@graphql-tools/schema": "^10.0.5", - "@graphql-tools/wrap": "^10.0.11" + "@graphql-tools/wrap": "^10.0.12" }, "publishConfig": { "access": "public", diff --git a/packages/legacy/mergers/stitching/package.json b/packages/legacy/mergers/stitching/package.json index 6e1e0a9d98d5f..35977d59e001a 100644 --- a/packages/legacy/mergers/stitching/package.json +++ b/packages/legacy/mergers/stitching/package.json @@ -40,9 +40,9 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/schema": "^10.0.5", - "@graphql-tools/stitch": "^9.2.15" + "@graphql-tools/stitch": "^9.2.17" }, "publishConfig": { "access": "public", diff --git a/packages/legacy/runtime/package.json b/packages/legacy/runtime/package.json index 8b84f76bb784e..933e7fa4d698a 100644 --- a/packages/legacy/runtime/package.json +++ b/packages/legacy/runtime/package.json @@ -45,9 +45,9 @@ "@envelop/graphql-jit": "^8.0.0", "@graphql-mesh/string-interpolation": "^0.5.6", "@graphql-tools/batch-delegate": "^9.0.9", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/executor": "^1.3.2", - "@graphql-tools/wrap": "^10.0.11", + "@graphql-tools/wrap": "^10.0.12", "@whatwg-node/fetch": "^0.9.0", "graphql-jit": "^0.8.7" }, diff --git a/packages/legacy/transforms/encapsulate/package.json b/packages/legacy/transforms/encapsulate/package.json index 30766d6a69472..e46659be92492 100644 --- a/packages/legacy/transforms/encapsulate/package.json +++ b/packages/legacy/transforms/encapsulate/package.json @@ -39,8 +39,8 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/wrap": "^10.0.11" + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/wrap": "^10.0.12" }, "devDependencies": { "@graphql-tools/schema": "10.0.7" diff --git a/packages/legacy/transforms/federation/package.json b/packages/legacy/transforms/federation/package.json index 24fdd8679c4c7..aa8744382d162 100644 --- a/packages/legacy/transforms/federation/package.json +++ b/packages/legacy/transforms/federation/package.json @@ -41,8 +41,8 @@ "dependencies": { "@apollo/subgraph": "^2.4.1", "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/stitching-directives": "^3.1.8", + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/stitching-directives": "^3.1.9", "dset": "^3.1.2", "graphql-transform-federation": "^2.2.0" }, diff --git a/packages/legacy/transforms/filter-schema/package.json b/packages/legacy/transforms/filter-schema/package.json index ee6fb2c17d196..dd212aa972abb 100644 --- a/packages/legacy/transforms/filter-schema/package.json +++ b/packages/legacy/transforms/filter-schema/package.json @@ -39,8 +39,8 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/wrap": "^10.0.11", + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/wrap": "^10.0.12", "minimatch": "^10.0.0" }, "devDependencies": { diff --git a/packages/legacy/transforms/hive/package.json b/packages/legacy/transforms/hive/package.json index 47612c802ad4c..2519eaa864bb3 100644 --- a/packages/legacy/transforms/hive/package.json +++ b/packages/legacy/transforms/hive/package.json @@ -42,7 +42,7 @@ "@graphql-hive/core": "^0.8.1", "@graphql-hive/yoga": "^0.38.1", "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/delegate": "^10.0.27" + "@graphql-tools/delegate": "^10.0.28" }, "publishConfig": { "access": "public", diff --git a/packages/legacy/transforms/hoist-field/package.json b/packages/legacy/transforms/hoist-field/package.json index a1d71cad7df6c..15f3f53a376f3 100644 --- a/packages/legacy/transforms/hoist-field/package.json +++ b/packages/legacy/transforms/hoist-field/package.json @@ -38,8 +38,8 @@ "graphql": "*" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/wrap": "^10.0.11" + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/wrap": "^10.0.12" }, "devDependencies": { "@graphql-mesh/cache-localforage": "0.102.10" diff --git a/packages/legacy/transforms/naming-convention/package.json b/packages/legacy/transforms/naming-convention/package.json index 64a0a1fab7cf6..c7f2d7dd4e8ed 100644 --- a/packages/legacy/transforms/naming-convention/package.json +++ b/packages/legacy/transforms/naming-convention/package.json @@ -39,8 +39,8 @@ "tslib": "^2.5.0" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/wrap": "^10.0.11", + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/wrap": "^10.0.12", "change-case": "^4.1.2", "graphql-scalars": "^1.22.4", "lower-case": "^2.0.2", diff --git a/packages/legacy/transforms/prefix/package.json b/packages/legacy/transforms/prefix/package.json index d949e0ff781b5..04d7e540a7826 100644 --- a/packages/legacy/transforms/prefix/package.json +++ b/packages/legacy/transforms/prefix/package.json @@ -39,8 +39,8 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/wrap": "^10.0.11", + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/wrap": "^10.0.12", "graphql-scalars": "^1.22.4" }, "devDependencies": { diff --git a/packages/legacy/transforms/rename/package.json b/packages/legacy/transforms/rename/package.json index a173bfea7d70b..cffe9aa756916 100644 --- a/packages/legacy/transforms/rename/package.json +++ b/packages/legacy/transforms/rename/package.json @@ -39,8 +39,8 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/wrap": "^10.0.11", + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/wrap": "^10.0.12", "graphql-scalars": "^1.22.4" }, "devDependencies": { diff --git a/packages/legacy/transforms/type-merging/package.json b/packages/legacy/transforms/type-merging/package.json index f6b575eb093ee..edb981884477c 100644 --- a/packages/legacy/transforms/type-merging/package.json +++ b/packages/legacy/transforms/type-merging/package.json @@ -38,8 +38,8 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/delegate": "^10.0.27", - "@graphql-tools/stitching-directives": "^3.1.8" + "@graphql-tools/delegate": "^10.0.28", + "@graphql-tools/stitching-directives": "^3.1.9" }, "publishConfig": { "access": "public", diff --git a/packages/legacy/types/package.json b/packages/legacy/types/package.json index b32995a70f732..610b7466ae61f 100644 --- a/packages/legacy/types/package.json +++ b/packages/legacy/types/package.json @@ -38,8 +38,8 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/batch-delegate": "^9.0.9", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/batch-delegate": "^9.0.10", + "@graphql-tools/delegate": "^10.0.28", "@graphql-typed-document-node/core": "^3.2.0" }, "publishConfig": { diff --git a/packages/legacy/utils/package.json b/packages/legacy/utils/package.json index 97466feb06312..0fe41aa519a09 100644 --- a/packages/legacy/utils/package.json +++ b/packages/legacy/utils/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/fetch": "^0.9.13", "dset": "^3.1.2", diff --git a/packages/loaders/grpc/package.json b/packages/loaders/grpc/package.json new file mode 100644 index 0000000000000..7e31b184b1a99 --- /dev/null +++ b/packages/loaders/grpc/package.json @@ -0,0 +1,59 @@ +{ + "name": "@omnigraph/grpc", + "version": "0.0.0", + "type": "module", + "repository": { + "type": "git", + "url": "ardatan/graphql-mesh", + "directory": "packages/loaders/grpc" + }, + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "main": "dist/cjs/index.js", + "module": "dist/esm/index.js", + "exports": { + ".": { + "require": { + "types": "./dist/typings/index.d.cts", + "default": "./dist/cjs/index.js" + }, + "import": { + "types": "./dist/typings/index.d.ts", + "default": "./dist/esm/index.js" + }, + "default": { + "types": "./dist/typings/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "./package.json": "./package.json" + }, + "typings": "dist/typings/index.d.ts", + "peerDependencies": { + "graphql": "*" + }, + "dependencies": { + "@ardatan/grpc-reflection-js": "^0.0.2", + "@graphql-mesh/cross-helpers": "^0.4.7", + "@graphql-mesh/string-interpolation": "^0.5.6", + "@graphql-mesh/transport-common": "^0.7.11", + "@graphql-tools/utils": "^10.5.5", + "@grpc/grpc-js": "^1.1.7", + "@whatwg-node/disposablestack": "^0.0.5", + "globby": "^11.1.0", + "graphql-compose": "^9.0.11", + "graphql-scalars": "^1.23.0", + "lodash.has": "^4.5.2", + "protobufjs": "^7.2.5" + }, + "publishConfig": { + "access": "public", + "directory": "dist" + }, + "sideEffects": false, + "typescript": { + "definition": "dist/typings/index.d.ts" + } +} diff --git a/packages/legacy/handlers/grpc/src/directives.ts b/packages/loaders/grpc/src/directives.ts similarity index 52% rename from packages/legacy/handlers/grpc/src/directives.ts rename to packages/loaders/grpc/src/directives.ts index 6c237c07df853..dfff90ce73c69 100644 --- a/packages/legacy/handlers/grpc/src/directives.ts +++ b/packages/loaders/grpc/src/directives.ts @@ -2,7 +2,8 @@ import { DirectiveLocation, GraphQLBoolean, GraphQLDirective, - GraphQLScalarType, + GraphQLInputObjectType, + GraphQLInt, GraphQLString, } from 'graphql'; import { ObjMapScalar } from '@graphql-mesh/transport-common'; @@ -11,6 +12,9 @@ export const grpcMethodDirective = new GraphQLDirective({ name: 'grpcMethod', locations: [DirectiveLocation.FIELD_DEFINITION], args: { + subgraph: { + type: GraphQLString, + }, rootJsonName: { type: GraphQLString, }, @@ -30,6 +34,9 @@ export const grpcConnectivityStateDirective = new GraphQLDirective({ name: 'grpcConnectivityState', locations: [DirectiveLocation.FIELD_DEFINITION], args: { + subgraph: { + type: GraphQLString, + }, rootJsonName: { type: GraphQLString, }, @@ -43,6 +50,9 @@ export const EnumDirective = new GraphQLDirective({ name: 'enum', locations: [DirectiveLocation.ENUM_VALUE], args: { + subgraph: { + type: GraphQLString, + }, value: { type: GraphQLString, }, @@ -53,6 +63,9 @@ export const grpcRootJsonDirective = new GraphQLDirective({ name: 'grpcRootJson', locations: [DirectiveLocation.OBJECT], args: { + subgraph: { + type: GraphQLString, + }, name: { type: GraphQLString, }, @@ -65,3 +78,57 @@ export const grpcRootJsonDirective = new GraphQLDirective({ }, isRepeatable: true, }); + +export const GrpcCredentialsSsl = new GraphQLInputObjectType({ + name: 'GrpcCredentialsSsl', + fields: { + rootCA: { + type: GraphQLString, + }, + certChain: { + type: GraphQLString, + }, + privateKey: { + type: GraphQLString, + }, + } +}) + + +export const TransportOptions = new GraphQLInputObjectType({ + name: 'TransportOptions', + fields: { + requestTimeout: { + type: GraphQLInt, + }, + credentialsSsl: { + type: GrpcCredentialsSsl, + }, + useHTTPS: { + type: GraphQLBoolean, + }, + metaData: { + type: ObjMapScalar, + } + } +}) + +export const transportDirective = new GraphQLDirective({ + name: 'transport', + args: { + subgraph: { + type: GraphQLString, + }, + kind: { + type: GraphQLString, + }, + location: { + type: GraphQLString, + }, + options: { + type: TransportOptions, + } + }, + isRepeatable: true, + locations: [DirectiveLocation.SCHEMA], +}) diff --git a/packages/loaders/grpc/src/grpcLoaderHelper.ts b/packages/loaders/grpc/src/grpcLoaderHelper.ts new file mode 100644 index 0000000000000..98d256813ddd8 --- /dev/null +++ b/packages/loaders/grpc/src/grpcLoaderHelper.ts @@ -0,0 +1,561 @@ +import globby from 'globby'; +import { specifiedDirectives } from 'graphql'; +import { + SchemaComposer, + type Directive, + type EnumTypeComposerValueConfigDefinition, + type ObjectTypeComposerFieldConfigAsObjectDefinition, +} from 'graphql-compose'; +import { + GraphQLBigInt, + GraphQLByte, + GraphQLJSON, + GraphQLUnsignedInt, + GraphQLVoid, +} from 'graphql-scalars'; +import protobufjs, { + type AnyNestedObject, + type IParseOptions, + type RootConstructor, +} from 'protobufjs'; +import type { IFileDescriptorSet } from 'protobufjs/ext/descriptor'; +import descriptor from 'protobufjs/ext/descriptor/index.js'; +import { Client } from '@ardatan/grpc-reflection-js'; +import { fs, path } from '@graphql-mesh/cross-helpers'; +import { stringInterpolator } from '@graphql-mesh/string-interpolation'; +import type { Logger, YamlConfig } from '@graphql-mesh/types'; +import { GraphQLStreamDirective, type MaybePromise } from '@graphql-tools/utils'; +import { credentials, type ChannelCredentials } from '@grpc/grpc-js'; +import { AsyncDisposableStack } from '@whatwg-node/disposablestack'; +import { + EnumDirective, + grpcConnectivityStateDirective, + grpcMethodDirective, + grpcRootJsonDirective, + transportDirective, +} from './directives.js'; +import { addIncludePathResolver, getTypeName, walkToFindTypePath } from './utils.js'; + +const { Root } = protobufjs; + +interface LoadOptions extends IParseOptions { + includeDirs?: string[]; +} + +type DecodedDescriptorSet = Message & IFileDescriptorSet; + +const QUERY_METHOD_PREFIXES = ['get', 'list', 'search']; + +export class GrpcLoaderHelper implements AsyncDisposable { + private schemaComposer = new SchemaComposer(); + private asyncDisposableStack = new AsyncDisposableStack(); + constructor( + private subgraphName: string, + private baseDir: string, + private logger: Logger, + private config: YamlConfig.GrpcHandler, + ) {} + + [Symbol.asyncDispose]() { + return this.asyncDisposableStack.disposeAsync(); + } + + async buildSchema() { + this.schemaComposer.add(GraphQLBigInt); + this.schemaComposer.add(GraphQLByte); + this.schemaComposer.add(GraphQLUnsignedInt); + this.schemaComposer.add(GraphQLVoid); + this.schemaComposer.add(GraphQLJSON); + this.schemaComposer.createScalarTC({ + name: 'File', + }); + // identical of grpc's ConnectivityState + this.schemaComposer.createEnumTC({ + name: 'ConnectivityState', + values: { + IDLE: { value: 0 }, + CONNECTING: { value: 1 }, + READY: { value: 2 }, + TRANSIENT_FAILURE: { value: 3 }, + SHUTDOWN: { value: 4 }, + }, + }); + + this.config.requestTimeout = this.config.requestTimeout || 200000; + + this.logger.debug(`Getting channel credentials`); + const creds = await this.getCredentials(); + + this.logger.debug(`Getting stored root and decoded descriptor set objects`); + const descriptorSets = await this.getDescriptorSets(creds); + + const directives: Directive[] = []; + for (const { name: rootJsonName, rootJson } of descriptorSets) { + const rootLogger = this.logger.child(rootJsonName); + + this.logger.debug(`Building the schema structure based on the root object`); + this.visit({ + nested: rootJson, + name: '', + currentPath: [], + rootJsonName, + rootJson, + rootLogger, + }); + + this.schemaComposer.addDirective(grpcRootJsonDirective); + directives.push({ + name: 'grpcRootJson', + args: { + subgraph: this.subgraphName, + name: rootJsonName, + rootJson, + }, + }); + } + this.schemaComposer.Query.setDirectives(directives); + + // graphql-compose doesn't add @defer and @stream to the schema + specifiedDirectives.forEach(directive => this.schemaComposer.addDirective(directive)); + + if (!this.schemaComposer.hasDirective('stream')) { + this.schemaComposer.addDirective(GraphQLStreamDirective); + } + + this.logger.debug(`Building the final GraphQL Schema`); + this.schemaComposer.addDirective(transportDirective); + const schema = this.schemaComposer.buildSchema(); + const schemaExtensions: Record = (schema.extensions = schema.extensions || {}); + const directiveExtensions = (schemaExtensions.directives = schemaExtensions.directives || {}); + directiveExtensions.transport = { + subgraph: this.subgraphName, + kind: 'grpc', + location: this.config.endpoint, + options: { + requestTimeout: this.config.requestTimeout, + credentialsSsl: this.config.credentialsSsl, + useHTTPS: this.config.useHTTPS, + metaData: this.config.metaData, + }, + }; + return schema; + } + + private processReflection(creds: ChannelCredentials): Promise[]> { + this.logger.debug(`Using the reflection`); + const reflectionEndpoint = stringInterpolator.parse(this.config.endpoint, { env: process.env }); + this.logger.debug(`Creating gRPC Reflection Client`); + const reflectionClient = new Client(reflectionEndpoint, creds); + this.asyncDisposableStack.defer(() => reflectionClient.grpcClient.close()); + return reflectionClient.listServices().then(services => + (services.filter(service => service && !service?.startsWith('grpc.')) as string[]).map( + service => { + this.logger.debug(`Resolving root of Service: ${service} from the reflection response`); + return reflectionClient.fileContainingSymbol(service); + }, + ), + ); + } + + private async processDescriptorFile() { + let fileName: string; + let options: LoadOptions; + if (typeof this.config.source === 'object') { + fileName = this.config.source.file; + options = { + ...this.config.source.load, + includeDirs: this.config.source.load.includeDirs?.map(includeDir => + path.isAbsolute(includeDir) ? includeDir : path.join(this.baseDir, includeDir), + ), + }; + } else { + fileName = this.config.source; + } + fileName = stringInterpolator.parse(fileName, { env: process.env }); + const absoluteFilePath = path.isAbsolute(fileName) + ? fileName + : path.join(this.baseDir, fileName); + this.logger.debug(`Using the descriptor set from ${absoluteFilePath} `); + const descriptorSetBuffer = await fs.promises.readFile(absoluteFilePath); + this.logger.debug(`Reading ${absoluteFilePath} `); + let decodedDescriptorSet: DecodedDescriptorSet; + if (absoluteFilePath.endsWith('json')) { + this.logger.debug(`Parsing ${absoluteFilePath} as json`); + const descriptorSetJSON = JSON.parse(descriptorSetBuffer.toString()); + decodedDescriptorSet = descriptor.FileDescriptorSet.fromObject( + descriptorSetJSON, + ) as unknown as DecodedDescriptorSet; + } else { + decodedDescriptorSet = descriptor.FileDescriptorSet.decode( + descriptorSetBuffer, + ) as unknown as DecodedDescriptorSet; + } + this.logger.debug(`Creating root from descriptor set`); + const rootFromDescriptor = (Root as RootConstructor).fromDescriptor(decodedDescriptorSet); + if (options.includeDirs) { + if (!Array.isArray(options.includeDirs)) { + return Promise.reject(new Error('The includeDirs option must be an array')); + } + addIncludePathResolver(rootFromDescriptor, options.includeDirs); + } + return rootFromDescriptor; + } + + private async processProtoFile() { + this.logger.debug(`Using proto file(s)`); + let protoRoot = new Root(); + let fileGlob: string; + let options: LoadOptions = { + keepCase: true, + alternateCommentMode: true, + }; + if (typeof this.config.source === 'object') { + fileGlob = this.config.source.file; + options = { + ...options, + ...this.config.source.load, + includeDirs: this.config.source.load?.includeDirs?.map(includeDir => + path.isAbsolute(includeDir) ? includeDir : path.join(this.baseDir, includeDir), + ), + }; + if (options.includeDirs) { + if (!Array.isArray(options.includeDirs)) { + throw new Error('The includeDirs option must be an array'); + } + addIncludePathResolver(protoRoot, options.includeDirs); + } + } else { + fileGlob = this.config.source; + } + + fileGlob = stringInterpolator.parse(fileGlob, { env: process.env }); + + const fileNames = await globby(fileGlob, { + cwd: this.baseDir, + }); + this.logger.debug(`Loading proto files(${fileGlob}); \n ${fileNames.join('\n')} `); + protoRoot = await protoRoot.load( + fileNames.map(filePath => + path.isAbsolute(filePath) ? filePath : path.join(this.baseDir, filePath), + ), + options, + ); + this.logger.debug(`Adding proto content to the root`); + return protoRoot; + } + + private async getDescriptorSets(creds: ChannelCredentials) { + const rootPromises: Promise[] = []; + this.logger.debug(`Building Roots`); + if (this.config.source) { + const filePath = + typeof this.config.source === 'string' ? this.config.source : this.config.source.file; + if (filePath.endsWith('json')) { + rootPromises.push(this.processDescriptorFile()); + } else if (filePath.endsWith('proto')) { + rootPromises.push(this.processProtoFile()); + } + } else { + const reflectionPromises = await this.processReflection(creds); + rootPromises.push(...reflectionPromises); + } + + return Promise.all( + rootPromises.map(async (root$, i) => { + const root = await root$; + const rootName = root.name || `Root${i}`; + const rootLogger = this.logger.child(rootName); + rootLogger.debug(`Resolving entire the root tree`); + root.resolveAll(); + rootLogger.debug(`Creating artifacts from descriptor set and root`); + return { + name: rootName, + rootJson: root.toJSON({ + keepComments: true, + }), + }; + }), + ); + } + + getCredentials(): MaybePromise { + this.logger.debug(`Getting channel credentials`); + if (this.config.credentialsSsl) { + this.logger.debug( + () => + `Using SSL Connection with credentials at ${this.config.credentialsSsl.privateKey} & ${this.config.credentialsSsl.certChain}`, + ); + const absolutePrivateKeyPath = path.isAbsolute(this.config.credentialsSsl.privateKey) + ? this.config.credentialsSsl.privateKey + : path.join(this.baseDir, this.config.credentialsSsl.privateKey); + const absoluteCertChainPath = path.isAbsolute(this.config.credentialsSsl.certChain) + ? this.config.credentialsSsl.certChain + : path.join(this.baseDir, this.config.credentialsSsl.certChain); + + const sslFiles = [ + fs.promises.readFile(absolutePrivateKeyPath), + fs.promises.readFile(absoluteCertChainPath), + ]; + if (this.config.credentialsSsl.rootCA !== 'rootCA') { + const absoluteRootCAPath = path.isAbsolute(this.config.credentialsSsl.rootCA) + ? this.config.credentialsSsl.rootCA + : path.join(this.baseDir, this.config.credentialsSsl.rootCA); + sslFiles.unshift(fs.promises.readFile(absoluteRootCAPath)); + } + return Promise.all(sslFiles).then(([rootCA, privateKey, certChain]) => + credentials.createSsl(rootCA, privateKey, certChain), + ); + } else if (this.config.useHTTPS) { + this.logger.debug(`Using SSL Connection`); + return credentials.createSsl(); + } + this.logger.debug(`Using insecure connection`); + return credentials.createInsecure(); + } + + visit({ + nested, + name, + currentPath, + rootJsonName, + rootJson, + rootLogger: logger, + }: { + nested: AnyNestedObject; + name: string; + currentPath: string[]; + rootJsonName: string; + rootJson: protobufjs.INamespace; + rootLogger: Logger; + }) { + const pathWithName = [...currentPath, ...name.split('.')].filter(Boolean); + if ('nested' in nested) { + for (const key in nested.nested) { + logger.debug(`Visiting ${currentPath}.nested[${key}]`); + const currentNested = nested.nested[key]; + this.visit({ + nested: currentNested, + name: key, + currentPath: pathWithName, + rootJsonName, + rootJson, + rootLogger: logger, + }); + } + } + const typeName = pathWithName.join('__'); + if ('values' in nested) { + const enumValues: Record = {}; + const commentMap = (nested as any).comments; + for (const [key, value] of Object.entries(nested.values)) { + logger.debug(`Visiting ${currentPath}.nested.values[${key}]`); + enumValues[key] = { + directives: [ + { + name: 'enum', + args: { + subgraph: this.subgraphName, + value: JSON.stringify(value), + }, + }, + ], + description: commentMap?.[key], + }; + } + this.schemaComposer.addDirective(EnumDirective); + this.schemaComposer.createEnumTC({ + name: typeName, + values: enumValues, + description: (nested as any).comment, + }); + } else if ('fields' in nested) { + const inputTypeName = typeName + '_Input'; + const outputTypeName = typeName; + const description = (nested as any).comment; + const fieldEntries = Object.entries(nested.fields) as [ + string, + protobufjs.IField & { comment: string; keyType?: string }, + ][]; + if (fieldEntries.length) { + const inputTC = this.schemaComposer.createInputTC({ + name: inputTypeName, + description, + fields: {}, + }); + const outputTC = this.schemaComposer.createObjectTC({ + name: outputTypeName, + description, + fields: {}, + }); + for (const [fieldName, { type, rule, comment, keyType }] of fieldEntries) { + logger.debug(`Visiting ${currentPath}.nested.fields[${fieldName}]`); + const baseFieldTypePath = type.split('.'); + inputTC.addFields({ + [fieldName]: { + type: () => { + let fieldInputTypeName: string; + if (keyType) { + fieldInputTypeName = 'JSON'; + } else { + const fieldTypePath = walkToFindTypePath( + rootJson, + pathWithName, + baseFieldTypePath, + ); + fieldInputTypeName = getTypeName(this.schemaComposer, fieldTypePath, true); + } + return rule === 'repeated' ? `[${fieldInputTypeName}]` : fieldInputTypeName; + }, + description: comment, + }, + }); + outputTC.addFields({ + [fieldName]: { + type: () => { + let fieldTypeName: string; + if (keyType) { + fieldTypeName = 'JSON'; + } else { + const fieldTypePath = walkToFindTypePath( + rootJson, + pathWithName, + baseFieldTypePath, + ); + fieldTypeName = getTypeName(this.schemaComposer, fieldTypePath, false); + } + return rule === 'repeated' ? `[${fieldTypeName}]` : fieldTypeName; + }, + description: comment, + }, + }); + } + } else { + this.schemaComposer.createScalarTC({ + ...GraphQLJSON.toConfig(), + name: inputTypeName, + description, + }); + this.schemaComposer.createScalarTC({ + ...GraphQLJSON.toConfig(), + name: outputTypeName, + description, + }); + } + } else if ('methods' in nested) { + const objPath = pathWithName.join('.'); + for (const methodName in nested.methods) { + const method = nested.methods[methodName]; + const rootFieldName = [...pathWithName, methodName].join('_'); + const fieldConfigTypeFactory = () => { + const baseResponseTypePath = method.responseType?.split('.'); + if (baseResponseTypePath) { + const responseTypePath = walkToFindTypePath( + rootJson, + pathWithName, + baseResponseTypePath, + ); + return getTypeName(this.schemaComposer, responseTypePath, false); + } + return 'Void'; + }; + const fieldConfig: ObjectTypeComposerFieldConfigAsObjectDefinition = { + type: () => { + const typeName = fieldConfigTypeFactory(); + if (method.responseStream) { + return `[${typeName}]`; + } + return typeName; + }, + description: method.comment, + }; + const fieldConfigArgs = { + input: () => { + if (method.requestStream) { + return 'File'; + } + const baseRequestTypePath = method.requestType?.split('.'); + if (baseRequestTypePath) { + const requestTypePath = walkToFindTypePath( + rootJson, + pathWithName, + baseRequestTypePath, + ); + const requestTypeName = getTypeName(this.schemaComposer, requestTypePath, true); + return requestTypeName; + } + return undefined; + }, + }; + fieldConfig.args = fieldConfigArgs; + const methodNameLowerCased = methodName.toLowerCase(); + const prefixQueryMethod = this.config.prefixQueryMethod || QUERY_METHOD_PREFIXES; + const rootTypeComposer = prefixQueryMethod.some(prefix => + methodNameLowerCased.startsWith(prefix), + ) + ? this.schemaComposer.Query + : this.schemaComposer.Mutation; + this.schemaComposer.addDirective(grpcMethodDirective); + rootTypeComposer.addFields({ + [rootFieldName]: { + ...fieldConfig, + directives: [ + { + name: 'grpcMethod', + args: { + subgraph: this.subgraphName, + rootJsonName, + objPath, + methodName, + responseStream: !!method.responseStream, + }, + }, + ], + }, + }); + if (method.responseStream) { + this.schemaComposer.Subscription.addFields({ + [rootFieldName]: { + args: fieldConfigArgs, + description: method.comment, + type: fieldConfigTypeFactory, + directives: [ + { + name: 'grpcMethod', + args: { + subgraph: this.subgraphName, + rootJsonName, + objPath, + methodName, + responseStream: true, + }, + }, + ], + }, + }); + } + } + const connectivityStateFieldName = pathWithName.join('_') + '_connectivityState'; + this.schemaComposer.addDirective(grpcConnectivityStateDirective); + this.schemaComposer.Query.addFields({ + [connectivityStateFieldName]: { + type: 'ConnectivityState', + args: { + tryToConnect: { + type: 'Boolean', + }, + }, + directives: [ + { + name: 'grpcConnectivityState', + args: { + subgraph: this.subgraphName, + rootJsonName, + objPath, + }, + }, + ], + }, + }); + } + } +} diff --git a/packages/loaders/grpc/src/index.ts b/packages/loaders/grpc/src/index.ts new file mode 100644 index 0000000000000..2a46f71968b74 --- /dev/null +++ b/packages/loaders/grpc/src/index.ts @@ -0,0 +1,14 @@ +import type { Logger, YamlConfig } from '@graphql-mesh/types'; +import { GrpcLoaderHelper } from './grpcLoaderHelper.js'; + +interface LoaderContext { + cwd: string; + logger: Logger; +} + +export function loadGrpcSubgraph(name: string, options: YamlConfig.GrpcHandler) { + return (ctx: LoaderContext) => ({ + name, + schema$: new GrpcLoaderHelper(name, ctx.cwd, ctx.logger, options).buildSchema(), + }); +} diff --git a/packages/legacy/handlers/grpc/src/scalars.ts b/packages/loaders/grpc/src/scalars.ts similarity index 50% rename from packages/legacy/handlers/grpc/src/scalars.ts rename to packages/loaders/grpc/src/scalars.ts index ff12d6fd043a1..961f489aa320b 100644 --- a/packages/legacy/handlers/grpc/src/scalars.ts +++ b/packages/loaders/grpc/src/scalars.ts @@ -1,5 +1,3 @@ -import type { GraphQLScalarType } from 'graphql'; - type ScalarMap = Map; const SCALARS: ScalarMap = new Map([ @@ -20,11 +18,11 @@ const SCALARS: ScalarMap = new Map([ ['uint64', 'BigInt'], // A new scalar might be needed ]); -export function isScalarType(type: string): boolean { +export function isGrpcScalar(type: string): boolean { return SCALARS.has(type); } -export function getGraphQLScalar(scalarType: string): string { +export function getGraphQLScalarForGrpc(scalarType: string): string { const gqlScalar = SCALARS.get(scalarType); if (!gqlScalar) { throw new Error(`Could not find GraphQL Scalar for type ${scalarType}`); @@ -32,25 +30,3 @@ export function getGraphQLScalar(scalarType: string): string { return SCALARS.get(scalarType); } -export function addExecutionLogicToScalar( - nonExecutableScalar: GraphQLScalarType, - actualScalar: GraphQLScalarType, -) { - Object.defineProperties(nonExecutableScalar, { - serialize: { - value: actualScalar.serialize, - }, - parseValue: { - value: actualScalar.parseValue, - }, - parseLiteral: { - value: actualScalar.parseLiteral, - }, - extensions: { - value: { - ...actualScalar.extensions, - ...nonExecutableScalar.extensions, - }, - }, - }); -} diff --git a/packages/loaders/grpc/src/utils.ts b/packages/loaders/grpc/src/utils.ts new file mode 100644 index 0000000000000..66178889d9c3d --- /dev/null +++ b/packages/loaders/grpc/src/utils.ts @@ -0,0 +1,59 @@ +import { existsSync } from "fs"; +import type { SchemaComposer } from "graphql-compose"; +import { isAbsolute, join } from "path"; +import type { INamespace, Root } from "protobufjs"; +import { getGraphQLScalarForGrpc, isGrpcScalar } from "./scalars.js"; +import lodashHas from 'lodash.has'; + +export function addIncludePathResolver(root: Root, includePaths: string[]): void { + const originalResolvePath = root.resolvePath; + root.resolvePath = (origin: string, target: string) => { + if (isAbsolute(target)) { + return target; + } + for (const directory of includePaths) { + const fullPath: string = join(directory, target); + if (existsSync(fullPath)) { + return fullPath; + } + } + const path = originalResolvePath(origin, target); + if (path === null) { + console.warn(`${target} not found in any of the include paths ${includePaths}`); + } + return path; + }; +} + +export function getTypeName( + schemaComposer: SchemaComposer, + pathWithName: string[] | undefined, + isInput: boolean, +) { + if (pathWithName?.length) { + const baseTypeName = pathWithName.filter(Boolean).join('__'); + if (isGrpcScalar(baseTypeName)) { + return getGraphQLScalarForGrpc(baseTypeName); + } + if (schemaComposer.isEnumType(baseTypeName)) { + return baseTypeName; + } + return isInput ? baseTypeName + '_Input' : baseTypeName; + } + return 'Void'; +} + +export function walkToFindTypePath( + rootJson: INamespace, + pathWithName: string[], + baseTypePath: string[], +) { + const currentWalkingPath = [...pathWithName]; + while (!lodashHas(rootJson.nested, currentWalkingPath.concat(baseTypePath).join('.nested.'))) { + if (!currentWalkingPath.length) { + break; + } + currentWalkingPath.pop(); + } + return currentWalkingPath.concat(baseTypePath); +} diff --git a/packages/legacy/handlers/grpc/test/scalars.spec.ts b/packages/loaders/grpc/test/scalars.spec.ts similarity index 69% rename from packages/legacy/handlers/grpc/test/scalars.spec.ts rename to packages/loaders/grpc/test/scalars.spec.ts index 4f2495275e3b0..a614c1ed98ec1 100644 --- a/packages/legacy/handlers/grpc/test/scalars.spec.ts +++ b/packages/loaders/grpc/test/scalars.spec.ts @@ -1,4 +1,4 @@ -import { getGraphQLScalar, isScalarType } from '../src/scalars.js'; +import { getGraphQLScalarForGrpc, isGrpcScalar } from '../src/scalars.js'; describe.each<[string, string]>([ ['bool', 'Boolean'], @@ -18,18 +18,18 @@ describe.each<[string, string]>([ ['uint64', 'BigInt'], ])('Valid Scalars', (scalarType, scalarGqlType) => { test(`getGraphQLScalar should return the proper graphql scalar for ${scalarType}`, () => { - expect(getGraphQLScalar(scalarType)).toBe(scalarGqlType); + expect(getGraphQLScalarForGrpc(scalarType)).toBe(scalarGqlType); }); test(`isScalarType should return true for ${scalarType}`, () => { - expect(isScalarType(scalarType)).toBe(true); + expect(isGrpcScalar(scalarType)).toBe(true); }); }); describe('Invalid Scalars', () => { test('getGraphQLScalar should throw an error', () => { - expect(() => getGraphQLScalar('randomType')).toThrow(/Could not find GraphQL Scalar for type/); + expect(() => getGraphQLScalarForGrpc('randomType')).toThrow(/Could not find GraphQL Scalar for type/); }); test('isScalarType should return false for none scalars', () => { - expect(isScalarType('randomType')).toBe(false); + expect(isGrpcScalar('randomType')).toBe(false); }); }); diff --git a/packages/loaders/json-schema/package.json b/packages/loaders/json-schema/package.json index eabfbee1f3e20..162c71e147695 100644 --- a/packages/loaders/json-schema/package.json +++ b/packages/loaders/json-schema/package.json @@ -43,7 +43,7 @@ "@graphql-mesh/string-interpolation": "0.5.6", "@graphql-mesh/transport-common": "^0.7.11", "@graphql-mesh/transport-rest": "^0.7.11", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@json-schema-tools/meta-schema": "1.7.5", "@whatwg-node/fetch": "^0.9.0", "ajv": "8.17.1", diff --git a/packages/loaders/mysql/package.json b/packages/loaders/mysql/package.json index 2dbe55a9d8a2a..e902ec919a750 100644 --- a/packages/loaders/mysql/package.json +++ b/packages/loaders/mysql/package.json @@ -40,7 +40,7 @@ "@graphql-mesh/string-interpolation": "^0.5.6", "@graphql-mesh/transport-mysql": "^0.7.11", "@graphql-mesh/utils": "^0.102.10", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/utils": "^10.5.5", "graphql-compose": "^9.0.11", "graphql-fields": "^2.0.3", diff --git a/packages/loaders/neo4j/package.json b/packages/loaders/neo4j/package.json index b2f34ebcbee00..a65aa681498f2 100644 --- a/packages/loaders/neo4j/package.json +++ b/packages/loaders/neo4j/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@graphql-mesh/transport-neo4j": "^0.7.11", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/schema": "^10.0.5", "@neo4j/introspector": "^3.0.0", "neo4j-driver": "^5.9.2" diff --git a/packages/loaders/odata/package.json b/packages/loaders/odata/package.json index 49be33c13a7c0..3bf5af92cf37d 100644 --- a/packages/loaders/odata/package.json +++ b/packages/loaders/odata/package.json @@ -42,7 +42,7 @@ }, "dependencies": { "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@whatwg-node/fetch": "^0.9.0", "dataloader": "^2.2.2", "fast-xml-parser": "^4.5.0", diff --git a/packages/loaders/openapi/package.json b/packages/loaders/openapi/package.json index ff29350cdc775..05c6f94aff9ba 100644 --- a/packages/loaders/openapi/package.json +++ b/packages/loaders/openapi/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "@graphql-mesh/string-interpolation": "^0.5.6", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@omnigraph/json-schema": "^0.107.4", "change-case": "^4.1.2", "json-machete": "^0.97.4", diff --git a/packages/loaders/raml/package.json b/packages/loaders/raml/package.json index 49ebdc35a414c..09cd61579ec9d 100644 --- a/packages/loaders/raml/package.json +++ b/packages/loaders/raml/package.json @@ -42,7 +42,7 @@ "dependencies": { "@ardatan/raml-1-parser": "1.1.69", "@graphql-mesh/string-interpolation": "0.5.6", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@omnigraph/json-schema": "0.107.4", "@whatwg-node/fetch": "^0.9.0", "change-case": "4.1.2", diff --git a/packages/loaders/sqlite/package.json b/packages/loaders/sqlite/package.json index d6ac2f0a0f9ae..87a580775a686 100644 --- a/packages/loaders/sqlite/package.json +++ b/packages/loaders/sqlite/package.json @@ -38,7 +38,7 @@ "dependencies": { "@graphql-mesh/cross-helpers": "^0.4.7", "@graphql-mesh/types": "^0.102.10", - "@graphql-tools/delegate": "^10.0.27" + "@graphql-tools/delegate": "^10.0.28" }, "optionalDependencies": { "tuql": "^1.7.0" diff --git a/packages/plugins/hmac-upstream-signature/package.json b/packages/plugins/hmac-upstream-signature/package.json index 8158dab9d8521..6ba6efa341dc7 100644 --- a/packages/plugins/hmac-upstream-signature/package.json +++ b/packages/plugins/hmac-upstream-signature/package.json @@ -42,7 +42,7 @@ "json-stable-stringify": "^1.1.1" }, "devDependencies": { - "@graphql-mesh/serve-runtime": "^1.2.4", + "@graphql-hive/gateway": "^1.4.1", "graphql-yoga": "^5.7.0" }, "publishConfig": { diff --git a/packages/plugins/hmac-upstream-signature/src/index.ts b/packages/plugins/hmac-upstream-signature/src/index.ts index f67075165d4d0..0427d758d4ea0 100644 --- a/packages/plugins/hmac-upstream-signature/src/index.ts +++ b/packages/plugins/hmac-upstream-signature/src/index.ts @@ -1,7 +1,7 @@ import type { FetchAPI, GraphQLParams, YogaLogger, Plugin as YogaPlugin } from 'graphql-yoga'; import jsonStableStringify from 'json-stable-stringify'; +import type { GatewayPlugin } from '@graphql-hive/gateway'; import type { OnSubgraphExecutePayload } from '@graphql-mesh/fusion-runtime'; -import type { GatewayPlugin } from '@graphql-mesh/serve-runtime'; import { defaultPrintFn } from '@graphql-mesh/transport-common'; import { mapMaybePromise } from '@graphql-mesh/utils'; import type { ExecutionRequest, MaybePromise } from '@graphql-tools/utils'; diff --git a/packages/plugins/hmac-upstream-signature/src/useHMACUpstreamSignature.spec.ts b/packages/plugins/hmac-upstream-signature/src/useHMACUpstreamSignature.spec.ts index 45bfaa8503623..48f61d2902745 100644 --- a/packages/plugins/hmac-upstream-signature/src/useHMACUpstreamSignature.spec.ts +++ b/packages/plugins/hmac-upstream-signature/src/useHMACUpstreamSignature.spec.ts @@ -2,7 +2,7 @@ // eslint-disable-next-line import/no-nodejs-modules import { createHmac } from 'node:crypto'; import { createSchema, createYoga, type Plugin } from 'graphql-yoga'; -import { createGatewayRuntime, useCustomFetch } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime, useCustomFetch } from '@graphql-hive/gateway'; import { defaultParamsSerializer, useHmacSignatureValidation } from './index'; describe('useHmacSignatureValidation', () => { diff --git a/packages/plugins/jit/package.json b/packages/plugins/jit/package.json index eb212c6a774de..9292b225f7f34 100644 --- a/packages/plugins/jit/package.json +++ b/packages/plugins/jit/package.json @@ -42,7 +42,7 @@ "graphql-jit": "^0.8.7" }, "devDependencies": { - "@graphql-mesh/serve-runtime": "^1.2.4" + "@graphql-hive/gateway": "^1.4.1" }, "publishConfig": { "access": "public", diff --git a/packages/plugins/jit/tests/jit.spec.ts b/packages/plugins/jit/tests/jit.spec.ts index 4097c62806672..16b2ae8dde8e9 100644 --- a/packages/plugins/jit/tests/jit.spec.ts +++ b/packages/plugins/jit/tests/jit.spec.ts @@ -1,7 +1,7 @@ import type { ExecutionResult } from 'graphql'; import { createSchema, createYoga } from 'graphql-yoga'; +import { createGatewayRuntime, useCustomFetch } from '@graphql-hive/gateway'; import { getUnifiedGraphGracefully } from '@graphql-mesh/fusion-composition'; -import { createGatewayRuntime, useCustomFetch } from '@graphql-mesh/serve-runtime'; describe('JIT', () => { it('memoizes the compiled query', async () => { diff --git a/packages/plugins/jwt-auth/package.json b/packages/plugins/jwt-auth/package.json index b270ac27bbd1a..14961c5f82bde 100644 --- a/packages/plugins/jwt-auth/package.json +++ b/packages/plugins/jwt-auth/package.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@envelop/generic-auth": "8.0.0", - "@graphql-mesh/serve-runtime": "^1.2.4", + "@graphql-hive/gateway": "^1.4.1", "graphql-yoga": "^5.7.0", "jsonwebtoken": "9.0.2" }, diff --git a/packages/plugins/jwt-auth/src/index.ts b/packages/plugins/jwt-auth/src/index.ts index 79311e11dcc92..d4d88474c5242 100644 --- a/packages/plugins/jwt-auth/src/index.ts +++ b/packages/plugins/jwt-auth/src/index.ts @@ -1,5 +1,5 @@ import { type Plugin as YogaPlugin } from 'graphql-yoga'; -import type { GatewayPlugin } from '@graphql-mesh/serve-runtime'; +import type { GatewayPlugin } from '@graphql-hive/gateway'; import { useJWT as useYogaJWT, type JWTExtendContextFields, diff --git a/packages/plugins/jwt-auth/tests/auth-directives.spec.ts b/packages/plugins/jwt-auth/tests/auth-directives.spec.ts index 3ad9533a242a2..77c76969152ff 100644 --- a/packages/plugins/jwt-auth/tests/auth-directives.spec.ts +++ b/packages/plugins/jwt-auth/tests/auth-directives.spec.ts @@ -2,7 +2,7 @@ import { parse, type ExecutionResult } from 'graphql'; import { createYoga } from 'graphql-yoga'; import jwt from 'jsonwebtoken'; import { buildSubgraphSchema } from '@apollo/subgraph'; -import { createGatewayRuntime, useCustomFetch } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime, useCustomFetch } from '@graphql-hive/gateway'; import { composeWithApollo } from '../../../testing/composeWithApollo'; import useJWT, { createInlineSigningKeyProvider, type JWTExtendContextFields } from '../src/index'; diff --git a/packages/plugins/jwt-auth/tests/useJWT.spec.ts b/packages/plugins/jwt-auth/tests/useJWT.spec.ts index b5353896ad010..0642f6f18b93f 100644 --- a/packages/plugins/jwt-auth/tests/useJWT.spec.ts +++ b/packages/plugins/jwt-auth/tests/useJWT.spec.ts @@ -1,6 +1,6 @@ import { createSchema, createYoga, type Plugin } from 'graphql-yoga'; import jwt from 'jsonwebtoken'; -import { createGatewayRuntime, useCustomFetch } from '@graphql-mesh/serve-runtime'; +import { createGatewayRuntime, useCustomFetch } from '@graphql-hive/gateway'; import { createInlineSigningKeyProvider, type JWTExtendContextFields, diff --git a/packages/plugins/opentelemetry/package.json b/packages/plugins/opentelemetry/package.json index b50d5a3cf4c70..2fee8714a35f5 100644 --- a/packages/plugins/opentelemetry/package.json +++ b/packages/plugins/opentelemetry/package.json @@ -38,7 +38,7 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-mesh/serve-runtime": "^1.2.4", + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/transport-common": "^0.7.11", "@graphql-tools/utils": "^10.5.5", "@opentelemetry/api": "^1.9.0", diff --git a/packages/plugins/opentelemetry/src/plugin.ts b/packages/plugins/opentelemetry/src/plugin.ts index bb9704813898d..558d345870505 100644 --- a/packages/plugins/opentelemetry/src/plugin.ts +++ b/packages/plugins/opentelemetry/src/plugin.ts @@ -3,8 +3,8 @@ import { type OnParseEventPayload, type OnValidateEventPayload, } from '@envelop/types'; +import { DisposableSymbols, type GatewayPlugin } from '@graphql-hive/gateway'; import type { OnSubgraphExecutePayload } from '@graphql-mesh/fusion-runtime'; -import { DisposableSymbols, type GatewayPlugin } from '@graphql-mesh/serve-runtime'; import type { Logger, OnFetchHookPayload } from '@graphql-mesh/types'; import { getHeadersObj } from '@graphql-mesh/utils'; import { isAsyncIterable } from '@graphql-tools/utils'; diff --git a/packages/plugins/opentelemetry/tests/useOpenTelemetry.spec.ts b/packages/plugins/opentelemetry/tests/useOpenTelemetry.spec.ts index a132569d5f0d8..01c3fa1555596 100644 --- a/packages/plugins/opentelemetry/tests/useOpenTelemetry.spec.ts +++ b/packages/plugins/opentelemetry/tests/useOpenTelemetry.spec.ts @@ -1,5 +1,4 @@ import { createSchema, createYoga } from 'graphql-yoga'; -import { createGatewayRuntime, useCustomFetch } from '@graphql-mesh/serve-runtime'; describe('useOpenTelemetry', () => { if (process.env.LEAK_TEST) { @@ -10,6 +9,10 @@ describe('useOpenTelemetry', () => { jest.mock('@opentelemetry/sdk-node', () => ({ NodeSDK: jest.fn(() => ({ start: mockStartSdk })), })); + const { + createGatewayRuntime, + useCustomFetch, + }: typeof import('@graphql-hive/gateway') = require('@graphql-hive/gateway'); beforeEach(() => { jest.clearAllMocks(); diff --git a/packages/plugins/operation-headers/package.json b/packages/plugins/operation-headers/package.json index 1dc2e6d0ad961..7cc7ca11100b4 100644 --- a/packages/plugins/operation-headers/package.json +++ b/packages/plugins/operation-headers/package.json @@ -32,7 +32,7 @@ }, "typings": "dist/typings/index.d.ts", "peerDependencies": { - "@graphql-mesh/serve-runtime": "^1.2.4", + "@graphql-hive/gateway": "^1.4.1", "@graphql-mesh/types": "^0.102.10", "@graphql-mesh/utils": "^0.102.10", "graphql": "*", diff --git a/packages/plugins/operation-headers/src/index.ts b/packages/plugins/operation-headers/src/index.ts index a6116c6d51295..80295281c619b 100644 --- a/packages/plugins/operation-headers/src/index.ts +++ b/packages/plugins/operation-headers/src/index.ts @@ -1,4 +1,4 @@ -import type { GatewayContext, GatewayPlugin } from '@graphql-mesh/serve-runtime'; +import type { GatewayContext, GatewayPlugin } from '@graphql-hive/gateway'; import type { MeshFetchRequestInit } from '@graphql-mesh/types'; import { getHeadersObj, mapMaybePromise } from '@graphql-mesh/utils'; diff --git a/packages/plugins/prometheus/package.json b/packages/plugins/prometheus/package.json index 4f4e1a620fff0..7f3c8e951c949 100644 --- a/packages/plugins/prometheus/package.json +++ b/packages/plugins/prometheus/package.json @@ -40,7 +40,7 @@ "tslib": "^2.4.0" }, "dependencies": { - "@graphql-mesh/serve-runtime": "^1.2.4", + "@graphql-hive/gateway": "^1.4.1", "@graphql-yoga/plugin-prometheus": "^6.1.0", "prom-client": "^15.0.0" }, diff --git a/packages/plugins/prometheus/src/index.ts b/packages/plugins/prometheus/src/index.ts index 2ccd2e1c22491..744e426aa11a1 100644 --- a/packages/plugins/prometheus/src/index.ts +++ b/packages/plugins/prometheus/src/index.ts @@ -1,7 +1,7 @@ import { isAsyncIterable, type Plugin as YogaPlugin } from 'graphql-yoga'; import type { Registry } from 'prom-client'; import { register as defaultRegistry } from 'prom-client'; -import { DisposableSymbols, type GatewayPlugin } from '@graphql-mesh/serve-runtime'; +import { DisposableSymbols, type GatewayPlugin } from '@graphql-hive/gateway'; import type { TransportEntry } from '@graphql-mesh/transport-common'; import type { ImportFn, Logger, MeshFetchRequestInit, MeshPlugin } from '@graphql-mesh/types'; import { diff --git a/packages/plugins/prometheus/tests/prometheus.spec.ts b/packages/plugins/prometheus/tests/prometheus.spec.ts index 49a38cccf624d..b8275b0cb9c04 100644 --- a/packages/plugins/prometheus/tests/prometheus.spec.ts +++ b/packages/plugins/prometheus/tests/prometheus.spec.ts @@ -1,8 +1,8 @@ /* eslint-disable import/no-extraneous-dependencies */ import { createSchema } from 'graphql-yoga'; import { register as registry } from 'prom-client'; +import { createGatewayRuntime } from '@graphql-hive/gateway'; import { getUnifiedGraphGracefully } from '@graphql-mesh/fusion-composition'; -import { createGatewayRuntime } from '@graphql-mesh/serve-runtime'; import { createDefaultExecutor } from '@graphql-mesh/transport-common'; import usePrometheus from '../src/index.js'; diff --git a/packages/transports/common/package.json b/packages/transports/common/package.json index 958f497cf792a..64f4867cfd40d 100644 --- a/packages/transports/common/package.json +++ b/packages/transports/common/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@envelop/core": "^5.0.1", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/utils": "^10.5.5" }, "publishConfig": { diff --git a/packages/transports/grpc/package.json b/packages/transports/grpc/package.json new file mode 100644 index 0000000000000..2a4d5a462efd7 --- /dev/null +++ b/packages/transports/grpc/package.json @@ -0,0 +1,60 @@ +{ + "name": "@graphql-mesh/transport-grpc", + "version": "0.0.0", + "type": "module", + "repository": { + "type": "git", + "url": "ardatan/graphql-mesh", + "directory": "packages/transports/grpc" + }, + "license": "MIT", + "engines": { + "node": ">=16.0.0" + }, + "main": "dist/cjs/index.js", + "module": "dist/esm/index.js", + "exports": { + ".": { + "require": { + "types": "./dist/typings/index.d.cts", + "default": "./dist/cjs/index.js" + }, + "import": { + "types": "./dist/typings/index.d.ts", + "default": "./dist/esm/index.js" + }, + "default": { + "types": "./dist/typings/index.d.ts", + "default": "./dist/esm/index.js" + } + }, + "./package.json": "./package.json" + }, + "typings": "dist/typings/index.d.ts", + "peerDependencies": { + "@graphql-mesh/types": "^0.102.10", + "@graphql-mesh/utils": "^0.102.10", + "@graphql-tools/utils": "^10.5.5", + "graphql": "*", + "tslib": "^2.4.0" + }, + "dependencies": { + "@graphql-mesh/cross-helpers": "^0.4.7", + "@graphql-mesh/string-interpolation": "^0.5.6", + "@graphql-mesh/transport-common": "^0.7.11", + "@grpc/grpc-js": "^1.1.7", + "@grpc/proto-loader": "^0.7.8", + "@whatwg-node/disposablestack": "^0.0.5", + "graphql-scalars": "^1.22.4", + "lodash.get": "^4.4.2", + "protobufjs": "^7.2.5" + }, + "publishConfig": { + "access": "public", + "directory": "dist" + }, + "sideEffects": false, + "typescript": { + "definition": "dist/typings/index.d.ts" + } +} diff --git a/packages/transports/grpc/src/index.ts b/packages/transports/grpc/src/index.ts new file mode 100644 index 0000000000000..5b5a897fbf117 --- /dev/null +++ b/packages/transports/grpc/src/index.ts @@ -0,0 +1,310 @@ +import { + isEnumType, + type GraphQLFieldResolver, + type GraphQLScalarType, + type GraphQLSchema, +} from 'graphql'; +import { resolvers as scalarResolvers } from 'graphql-scalars'; +import lodashGet from 'lodash.get'; +import type protobufjs from 'protobufjs'; +import { fs, path, process } from '@graphql-mesh/cross-helpers'; +import { stringInterpolator } from '@graphql-mesh/string-interpolation'; +import { + createDefaultExecutor, + ObjMapScalar, + type Transport, +} from '@graphql-mesh/transport-common'; +import type { Logger } from '@graphql-mesh/types'; +import { mapMaybePromise } from '@graphql-mesh/utils'; +import { getDirective, getDirectives, getRootTypes, type MaybePromise } from '@graphql-tools/utils'; +import type { ChannelCredentials } from '@grpc/grpc-js'; +import { credentials, loadPackageDefinition } from '@grpc/grpc-js'; +import type { ServiceClient } from '@grpc/grpc-js/build/src/make-client.js'; +import { fromJSON } from '@grpc/proto-loader'; +import { DisposableStack } from '@whatwg-node/disposablestack'; +import { addExecutionLogicToScalar, addMetaDataToCall } from './utils.js'; +import './patchLongJs.js'; + +/** + * SSL Credentials + */ +interface GrpcCredentialsSsl { + rootCA?: string; + certChain?: string; + privateKey?: string; +} + +export interface gRPCTransportOptions { + /** + * Request timeout in milliseconds + * Default: 200000 + */ + requestTimeout?: number; + credentialsSsl?: GrpcCredentialsSsl; + /** + * Use https instead of http for gRPC connection + */ + useHTTPS?: boolean; + /** + * MetaData + */ + metaData?: { + [k: string]: any; + }; +} + +interface LoadOptions { + includeDirs?: string[]; +} + +export class GrpcTransportHelper extends DisposableStack { + constructor( + private baseDir: string, + private logger: Logger, + private endpoint: string, + private config: gRPCTransportOptions, + ) { + super(); + } + + getCredentials(): MaybePromise { + this.logger.debug(`Getting channel credentials`); + if (this.config.credentialsSsl) { + this.logger.debug( + () => + `Using SSL Connection with credentials at ${this.config.credentialsSsl.privateKey} & ${this.config.credentialsSsl.certChain}`, + ); + const absolutePrivateKeyPath = path.isAbsolute(this.config.credentialsSsl.privateKey) + ? this.config.credentialsSsl.privateKey + : path.join(this.baseDir, this.config.credentialsSsl.privateKey); + const absoluteCertChainPath = path.isAbsolute(this.config.credentialsSsl.certChain) + ? this.config.credentialsSsl.certChain + : path.join(this.baseDir, this.config.credentialsSsl.certChain); + + const sslFiles = [ + fs.promises.readFile(absolutePrivateKeyPath), + fs.promises.readFile(absoluteCertChainPath), + ]; + if (this.config.credentialsSsl.rootCA !== 'rootCA') { + const absoluteRootCAPath = path.isAbsolute(this.config.credentialsSsl.rootCA) + ? this.config.credentialsSsl.rootCA + : path.join(this.baseDir, this.config.credentialsSsl.rootCA); + sslFiles.unshift(fs.promises.readFile(absoluteRootCAPath)); + } + return Promise.all(sslFiles).then(([rootCA, privateKey, certChain]) => + credentials.createSsl(rootCA, privateKey, certChain), + ); + } else if (this.config.useHTTPS) { + this.logger.debug(`Using SSL Connection`); + return credentials.createSsl(); + } + this.logger.debug(`Using insecure connection`); + return credentials.createInsecure(); + } + + getGrpcObject({ + rootJson, + loadOptions, + rootLogger, + }: { + rootJson: protobufjs.INamespace; + loadOptions: LoadOptions; + rootLogger: Logger; + }) { + const packageDefinition = fromJSON(rootJson, loadOptions); + + rootLogger.debug(`Creating service client for package definition`); + const grpcObject = loadPackageDefinition(packageDefinition); + return grpcObject; + } + + private grpcObjectByserviceClientByObjPath = new WeakMap< + ReturnType, + Map + >(); + + getServiceClient({ + grpcObject, + objPath, + creds, + }: { + grpcObject: ReturnType; + objPath: string; + creds: ChannelCredentials; + }) { + let serviceClientByObjPath = this.grpcObjectByserviceClientByObjPath.get(grpcObject); + if (!serviceClientByObjPath) { + serviceClientByObjPath = new Map(); + this.grpcObjectByserviceClientByObjPath.set(grpcObject, serviceClientByObjPath); + } + let client: ServiceClient = serviceClientByObjPath.get(objPath); + if (!client) { + const ServiceClient = lodashGet(grpcObject, objPath); + if (typeof ServiceClient !== 'function') { + throw new Error(`Object at path ${objPath} is not a Service constructor`); + } + client = new ServiceClient( + stringInterpolator.parse(this.endpoint, { env: process.env }) ?? this.endpoint, + creds, + ); + this.defer(() => client.close()); + serviceClientByObjPath.set(objPath, client); + } + return client; + } + + getFieldResolver({ + client, + methodName, + isResponseStream, + }: { + client: ServiceClient; + methodName: string; + isResponseStream: boolean; + }): GraphQLFieldResolver { + const metaData = this.config.metaData; + const clientMethod = client[methodName].bind(client); + return function grpcFieldResolver(root, args, context) { + return addMetaDataToCall( + clientMethod, + args.input, + { + root, + args, + context, + env: process.env, + }, + metaData, + isResponseStream, + ); + }; + } + + getConnectivityStateResolver({ + client, + }: { + client: ServiceClient; + }): GraphQLFieldResolver { + return function connectivityStateResolver(_, { tryToConnect }) { + return client.getChannel().getConnectivityState(tryToConnect); + }; + } + + processDirectives({ schema, creds }: { schema: GraphQLSchema; creds: ChannelCredentials }) { + const schemaTypeMap = schema.getTypeMap(); + for (const scalarTypeName in scalarResolvers) { + if (scalarTypeName in schemaTypeMap) { + addExecutionLogicToScalar( + schemaTypeMap[scalarTypeName] as GraphQLScalarType, + scalarResolvers[scalarTypeName], + ); + } + } + if ('ObjMap' in schemaTypeMap) { + addExecutionLogicToScalar(schemaTypeMap.ObjMap as GraphQLScalarType, ObjMapScalar); + } + const queryType = schema.getQueryType(); + const rootJsonAnnotations = getDirective(schema, queryType, 'grpcRootJson'); + const rootJsonMap = new Map(); + const grpcObjectByRootJsonName = new Map>(); + for (let { name, rootJson, loadOptions } of rootJsonAnnotations) { + rootJson = typeof rootJson === 'string' ? JSON.parse(rootJson) : rootJson; + rootJsonMap.set(name, rootJson); + const rootLogger = this.logger.child(name); + grpcObjectByRootJsonName.set(name, this.getGrpcObject({ rootJson, loadOptions, rootLogger })); + } + const rootTypes = getRootTypes(schema); + for (const rootType of rootTypes) { + const rootTypeFields = rootType.getFields(); + for (const fieldName in rootTypeFields) { + const field = rootTypeFields[fieldName]; + const directives = getDirectives(schema, field); + if (directives?.length) { + for (const directiveObj of directives) { + switch (directiveObj.name) { + case 'grpcMethod': { + const { rootJsonName, objPath, methodName, responseStream } = directiveObj.args; + const grpcObject = grpcObjectByRootJsonName.get(rootJsonName); + const client = this.getServiceClient({ + grpcObject, + objPath, + creds, + }); + if (rootType.name === 'Subscription') { + field.subscribe = this.getFieldResolver({ + client, + methodName, + isResponseStream: responseStream, + }); + field.resolve = function identityFn(root) { + return root; + }; + } else { + field.resolve = this.getFieldResolver({ + client, + methodName, + isResponseStream: responseStream, + }); + } + break; + } + case 'grpcConnectivityState': { + const { rootJsonName, objPath } = directiveObj.args; + const grpcObject = grpcObjectByRootJsonName.get(rootJsonName); + const client = this.getServiceClient({ + grpcObject, + objPath, + creds, + }); + field.resolve = this.getConnectivityStateResolver({ client }); + break; + } + } + } + } + } + } + const typeMap = schema.getTypeMap(); + for (const typeName in typeMap) { + const type = typeMap[typeName]; + if (isEnumType(type)) { + const values = type.getValues(); + for (const value of values) { + const enumAnnotations = getDirective(schema, value, 'enum'); + if (enumAnnotations?.length) { + for (const enumAnnotation of enumAnnotations) { + const enumSerializedValue = enumAnnotation.value; + if (enumSerializedValue) { + const serializedValue = JSON.parse(enumSerializedValue); + value.value = serializedValue; + let valueLookup = (type as any)._valueLookup; + if (!valueLookup) { + valueLookup = new Map( + type.getValues().map(enumValue => [enumValue.value, enumValue]), + ); + (type as any)._valueLookup = valueLookup; + } + (type as any)._valueLookup.set(serializedValue, value); + } + } + } + } + } + } + } +} + +export default { + getSubgraphExecutor({ transportEntry, subgraph, cwd, logger }) { + const transport = new GrpcTransportHelper( + cwd, + logger, + transportEntry.location, + transportEntry.options, + ); + return mapMaybePromise(transport.getCredentials(), creds => { + transport.processDirectives({ schema: subgraph, creds }); + return createDefaultExecutor(subgraph); + }); + }, +} satisfies Transport; diff --git a/packages/legacy/handlers/grpc/src/patchLongJs.ts b/packages/transports/grpc/src/patchLongJs.ts similarity index 100% rename from packages/legacy/handlers/grpc/src/patchLongJs.ts rename to packages/transports/grpc/src/patchLongJs.ts diff --git a/packages/legacy/handlers/grpc/src/utils.ts b/packages/transports/grpc/src/utils.ts similarity index 62% rename from packages/legacy/handlers/grpc/src/utils.ts rename to packages/transports/grpc/src/utils.ts index 135034d8e335e..3b570a7322ff9 100644 --- a/packages/legacy/handlers/grpc/src/utils.ts +++ b/packages/transports/grpc/src/utils.ts @@ -1,7 +1,4 @@ -import type { SchemaComposer } from 'graphql-compose'; import lodashGet from 'lodash.get'; -import type { Root } from 'protobufjs'; -import { fs, path as pathModule } from '@graphql-mesh/cross-helpers'; import type { ResolverData } from '@graphql-mesh/string-interpolation'; import { stringInterpolator } from '@graphql-mesh/string-interpolation'; import { withCancel } from '@graphql-mesh/utils'; @@ -12,45 +9,7 @@ import type { MetadataValue, } from '@grpc/grpc-js'; import { Metadata } from '@grpc/grpc-js'; -import { getGraphQLScalar, isScalarType } from './scalars.js'; - -export function getTypeName( - schemaComposer: SchemaComposer, - pathWithName: string[] | undefined, - isInput: boolean, -) { - if (pathWithName?.length) { - const baseTypeName = pathWithName.filter(Boolean).join('__'); - if (isScalarType(baseTypeName)) { - return getGraphQLScalar(baseTypeName); - } - if (schemaComposer.isEnumType(baseTypeName)) { - return baseTypeName; - } - return isInput ? baseTypeName + '_Input' : baseTypeName; - } - return 'Void'; -} - -export function addIncludePathResolver(root: Root, includePaths: string[]): void { - const originalResolvePath = root.resolvePath; - root.resolvePath = (origin: string, target: string) => { - if (pathModule.isAbsolute(target)) { - return target; - } - for (const directory of includePaths) { - const fullPath: string = pathModule.join(directory, target); - if (fs.existsSync(fullPath)) { - return fullPath; - } - } - const path = originalResolvePath(origin, target); - if (path === null) { - console.warn(`${target} not found in any of the include paths ${includePaths}`); - } - return path; - }; -} +import type { GraphQLScalarType } from 'graphql'; function isBlob(input: any): input is Blob { return input != null && input.stream instanceof Function; @@ -115,3 +74,26 @@ export function addMetaDataToCall( } }); } + +export function addExecutionLogicToScalar( + nonExecutableScalar: GraphQLScalarType, + actualScalar: GraphQLScalarType, +) { + Object.defineProperties(nonExecutableScalar, { + serialize: { + value: actualScalar.serialize, + }, + parseValue: { + value: actualScalar.parseValue, + }, + parseLiteral: { + value: actualScalar.parseLiteral, + }, + extensions: { + value: { + ...actualScalar.extensions, + ...nonExecutableScalar.extensions, + }, + }, + }); +} diff --git a/packages/legacy/handlers/grpc/test/utils.spec.ts b/packages/transports/grpc/test/utils.spec.ts similarity index 100% rename from packages/legacy/handlers/grpc/test/utils.spec.ts rename to packages/transports/grpc/test/utils.spec.ts diff --git a/packages/transports/http/src/index.ts b/packages/transports/http/src/index.ts index 037c55dcf25f2..8fd669b431810 100644 --- a/packages/transports/http/src/index.ts +++ b/packages/transports/http/src/index.ts @@ -100,4 +100,4 @@ export default { return httpExecutor; }, -} satisfies Transport; +} satisfies Transport; diff --git a/packages/transports/mysql/package.json b/packages/transports/mysql/package.json index 85eb21c7f717c..a57c99ddb3df9 100644 --- a/packages/transports/mysql/package.json +++ b/packages/transports/mysql/package.json @@ -41,7 +41,7 @@ "@graphql-mesh/transport-common": "^0.7.11", "@graphql-mesh/types": "^0.102.10", "@graphql-mesh/utils": "^0.102.10", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/utils": "^10.5.5", "graphql-fields": "^2.0.3", "mysql": "^2.18.1", diff --git a/packages/transports/neo4j/package.json b/packages/transports/neo4j/package.json index e07930177393d..a8e2300c1bc3e 100644 --- a/packages/transports/neo4j/package.json +++ b/packages/transports/neo4j/package.json @@ -40,7 +40,7 @@ "@graphql-mesh/transport-common": "^0.7.11", "@graphql-mesh/types": "^0.102.10", "@graphql-mesh/utils": "^0.102.10", - "@graphql-tools/delegate": "^10.0.27", + "@graphql-tools/delegate": "^10.0.28", "@graphql-tools/utils": "^10.5.5", "@neo4j/graphql": "^5.0.0", "graphql-scalars": "^1.22.4", diff --git a/patches/@graphql-hive+gateway+1.4.1.patch b/patches/@graphql-hive+gateway+1.4.1.patch new file mode 100644 index 0000000000000..87d22227574b8 --- /dev/null +++ b/patches/@graphql-hive+gateway+1.4.1.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@graphql-hive/gateway/dist/cli-CPBzYl_Z.js b/node_modules/@graphql-hive/gateway/dist/cli-CPBzYl_Z.js +index 3614ea5..f353703 100644 +--- a/node_modules/@graphql-hive/gateway/dist/cli-CPBzYl_Z.js ++++ b/node_modules/@graphql-hive/gateway/dist/cli-CPBzYl_Z.js +@@ -22,7 +22,7 @@ const defaultConfigExtensions = [ + ".mjs", + ".cjs" + ]; +-const defaultConfigFileName = "gateway.config"; ++const defaultConfigFileName = "mesh.config"; + function createDefaultConfigPaths(configFileName) { + return defaultConfigExtensions.map((ext) => `${configFileName}${ext}`); + } diff --git a/website/src/pages/v1/source-handlers/grpc.mdx b/website/src/pages/v1/source-handlers/grpc.mdx index 6f90841ec5365..aecbd2a1b4c46 100644 --- a/website/src/pages/v1/source-handlers/grpc.mdx +++ b/website/src/pages/v1/source-handlers/grpc.mdx @@ -23,13 +23,13 @@ npm i @omnigraph/grpc Then you can use it in your Mesh configuration: ```ts filename="mesh.config.ts" -import loadGRPCSubgraph from '@omnigraph/grpc' +import loadGrpcSubgraph from '@omnigraph/grpc' import { defineConfig } from '@graphql-mesh/compose-cli' export const composeConfig = defineConfig({ subgraphs: [ { - sourceHandler: loadGRPCSubgraph('MyGrpcApi', { + sourceHandler: loadGrpcSubgraph('MyGrpcApi', { // gRPC Endpoint endpoint: 'localhost:50051', // Path to the proto file @@ -74,12 +74,12 @@ If you have configured reflection in your gRPC server, you don't need to provide ```ts filename="mesh.config.ts" import { defineConfig } from '@graphql-mesh/compose-cli' -import loadGRPCSubgraph from '@omnigraph/grpc' +import loadGrpcSubgraph from '@omnigraph/grpc' export const composeConfig = defineConfig({ subgraphs: [ { - sourceHandler: loadGRPCSubgraph('MyGrpcApi', { + sourceHandler: loadGrpcSubgraph('MyGrpcApi', { endpoint: 'localhost:50051' }) } @@ -93,12 +93,12 @@ Here you can use `metaData` field to pass some custom metadata from the context. ```ts filename="mesh.config.ts" import { defineConfig } from '@graphql-mesh/compose-cli' -import loadGRPCSubgraph from '@omnigraph/grpc' +import loadGrpcSubgraph from '@omnigraph/grpc' export const composeConfig = defineConfig({ subgraphs: [ { - sourceHandler: loadGRPCSubgraph('MyGrpcApi', { + sourceHandler: loadGrpcSubgraph('MyGrpcApi', { endpoint: 'localhost:50051', metaData: { authorization: "Bearer {context.headers['x-my-token']}", diff --git a/yarn.lock b/yarn.lock index ccd0a25bf0e96..8bf57a9054b52 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1180,27 +1180,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.8.3": - version: 7.25.9 - resolution: "@babel/code-frame@npm:7.25.9" - dependencies: - "@babel/highlight": "npm:^7.25.9" - picocolors: "npm:^1.0.0" - checksum: 10c0/88562eba0eeb5960b7004e108790aa00183d90cbbe70ce10dad01c2c48141d2ef54d6dcd0c678cc1e456de770ffeb68e28559f4d222c01a110c79aea8733074b - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/code-frame@npm:7.25.7" - dependencies: - "@babel/highlight": "npm:^7.25.7" - picocolors: "npm:^1.0.0" - checksum: 10c0/14825c298bdec914caf3d24d1383b6d4cd6b030714686004992f4fc251831ecf432236652896f99d5d341f17170ae9a07b58d8d7b15aa0df8cfa1c5a7d5474bc - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.26.0": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.0, @babel/code-frame@npm:^7.8.3": version: 7.26.0 resolution: "@babel/code-frame@npm:7.26.0" dependencies: @@ -1211,21 +1191,14 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/compat-data@npm:7.25.9" - checksum: 10c0/8d9fc2074311ce61aaf5bccf740a808644d19d4859caf5fa46d8a7186a1ee0b0d8cbbc23f9371f8b397e84a885bdeab58d5f22d6799ddde55973252aac351a27 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.26.0": +"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.25.9, @babel/compat-data@npm:^7.26.0": version: 7.26.0 resolution: "@babel/compat-data@npm:7.26.0" checksum: 10c0/6325c9151a3c9b0a3a807e854a26255ef66d989bff331475a935af9bb18f160e0fffe6aed550e4e96b63f91efcd874bfbaab2a1f4a2f8d25645d712a0de590fb languageName: node linkType: hard -"@babel/core@npm:7.26.0": +"@babel/core@npm:7.26.0, @babel/core@npm:^7.1.0, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.14.0, @babel/core@npm:^7.16.0, @babel/core@npm:^7.22.9, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.0, @babel/core@npm:^7.25.2, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": version: 7.26.0 resolution: "@babel/core@npm:7.26.0" dependencies: @@ -1248,29 +1221,6 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.14.0, @babel/core@npm:^7.16.0, @babel/core@npm:^7.22.9, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.0, @babel/core@npm:^7.25.2, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": - version: 7.25.9 - resolution: "@babel/core@npm:7.25.9" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.25.9" - "@babel/generator": "npm:^7.25.9" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helpers": "npm:^7.25.9" - "@babel/parser": "npm:^7.25.9" - "@babel/template": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10c0/40d3064ebe906f65ed4153a0f4d75c679a19e4d71e425035b7bbe2d292a9167274f1a0d908d4d6c8f484fcddeb10bd91e0c7878fdb3dfad1bb00f6a319ce431d - languageName: node - linkType: hard - "@babel/eslint-parser@npm:^7.16.3": version: 7.25.8 resolution: "@babel/eslint-parser@npm:7.25.8" @@ -1285,31 +1235,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.14.0, @babel/generator@npm:^7.18.13, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.25.9, @babel/generator@npm:^7.7.2": - version: 7.25.9 - resolution: "@babel/generator@npm:7.25.9" - dependencies: - "@babel/types": "npm:^7.25.9" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^3.0.2" - checksum: 10c0/fca49a1440ac550bb835a73c0e8314849cd493a468a5431ca7f9dbb3d3443e3a1a6dcba2426752e8a97cc2feed4a3b7a0c639e1c45871c4a9dd0c994f08dd25a - languageName: node - linkType: hard - -"@babel/generator@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/generator@npm:7.25.7" - dependencies: - "@babel/types": "npm:^7.25.7" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^3.0.2" - checksum: 10c0/c03a26c79864d60d04ce36b649c3fa0d6fd7b2bf6a22e22854a0457aa09206508392dd73ee40e7bc8d50b3602f9ff068afa47770cda091d332e7db1ca382ee96 - languageName: node - linkType: hard - -"@babel/generator@npm:^7.26.0": +"@babel/generator@npm:^7.14.0, @babel/generator@npm:^7.18.13, @babel/generator@npm:^7.23.6, @babel/generator@npm:^7.25.9, @babel/generator@npm:^7.26.0, @babel/generator@npm:^7.7.2": version: 7.26.0 resolution: "@babel/generator@npm:7.26.0" dependencies: @@ -1419,35 +1345,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/helper-module-transforms@npm:7.25.7" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.7" - "@babel/helper-simple-access": "npm:^7.25.7" - "@babel/helper-validator-identifier": "npm:^7.25.7" - "@babel/traverse": "npm:^7.25.7" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/f37fa7d1d4df21690535b278468cbd5faf0133a3080f282000cfa4f3ffc9462a1458f866b04b6a2f2d1eec4691236cba9a867da61270dab3ab19846e62f05090 - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-module-transforms@npm:7.25.9" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.9" - "@babel/helper-simple-access": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/cd005e7585806845d79c5c0ca9e8926f186b430b0a558dad08a3611365eaad3ac587672b0d903530117dec454f48b6bdc3d164b19ea1b71ca1b4eb3be7b452ef - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.26.0": +"@babel/helper-module-transforms@npm:^7.25.9, @babel/helper-module-transforms@npm:^7.26.0": version: 7.26.0 resolution: "@babel/helper-module-transforms@npm:7.26.0" dependencies: @@ -1469,14 +1367,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.25.7, @babel/helper-plugin-utils@npm:^7.8.0": - version: 7.25.7 - resolution: "@babel/helper-plugin-utils@npm:7.25.7" - checksum: 10c0/241f8cf3c5b7700e91cab7cfe5b432a3c710ae3cd5bb96dc554da536a6d25f5b9f000cc0c0917501ceb4f76ba92599ee3beb25e10adaf96be59f8df89a842faf - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.25.9": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.25.7, @babel/helper-plugin-utils@npm:^7.25.9, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.25.9 resolution: "@babel/helper-plugin-utils@npm:7.25.9" checksum: 10c0/483066a1ba36ff16c0116cd24f93de05de746a603a777cd695ac7a1b034928a65a4ecb35f255761ca56626435d7abdb73219eba196f9aa83b6c3c3169325599d @@ -1509,16 +1400,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/helper-simple-access@npm:7.25.7" - dependencies: - "@babel/traverse": "npm:^7.25.7" - "@babel/types": "npm:^7.25.7" - checksum: 10c0/eed1b499bfb4f613c18debd61517e3de77b6da2727ca025aa05ac81599e0269f1dddb5237db04e8bb598115d015874752e0a7f11ff38672d74a4976097417059 - languageName: node - linkType: hard - "@babel/helper-simple-access@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-simple-access@npm:7.25.9" @@ -1539,23 +1420,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.7" - dependencies: - "@babel/traverse": "npm:^7.25.7" - "@babel/types": "npm:^7.25.7" - checksum: 10c0/5804adb893849a9d8cfb548e3812566a81d95cb0c9a10d66b52912d13f488e577c33063bf19bc06ac70e6333162a7370d67ba1a1c3544d37fb50d5f4a00db4de - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/helper-string-parser@npm:7.25.7" - checksum: 10c0/73ef2ceb81f8294678a0afe8ab0103729c0370cac2e830e0d5128b03be5f6a2635838af31d391d763e3c5a4460ed96f42fd7c9b552130670d525be665913bc4c - languageName: node - linkType: hard - "@babel/helper-string-parser@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-string-parser@npm:7.25.9" @@ -1563,13 +1427,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/helper-validator-identifier@npm:7.25.7" - checksum: 10c0/07438e5bf01ab2882a15027fdf39ac3b0ba1b251774a5130917907014684e2f70fef8fd620137ca062c4c4eedc388508d2ea7a3a7d9936a32785f4fe116c68c0 - languageName: node - linkType: hard - "@babel/helper-validator-identifier@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-validator-identifier@npm:7.25.9" @@ -1595,16 +1452,6 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helpers@npm:7.25.9" - dependencies: - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/4354fbf050291937d0f127f6f927a0c471b604524e0767516fefb91dc36427f25904dd0d2b2b3bbc66bce1894c680cc37eac9ab46970d70f24bf3e53375612de - languageName: node - linkType: hard - "@babel/helpers@npm:^7.26.0": version: 7.26.0 resolution: "@babel/helpers@npm:7.26.0" @@ -1615,53 +1462,7 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/highlight@npm:7.25.7" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.7" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/1f5894fdb0a0af6101fb2822369b2eeeae32cbeae2ef73ff73fc6a0a4a20471565cd9cfa589f54ed69df66adeca7c57266031ca9134b7bd244d023a488d419aa - languageName: node - linkType: hard - -"@babel/highlight@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/highlight@npm:7.25.9" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.9" - chalk: "npm:^2.4.2" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/ae0ed93c151b85a07df42936117fa593ce91563a22dfc8944a90ae7088c9679645c33e00dcd20b081c1979665d65f986241172dae1fc9e5922692fc3ff685a49 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.8, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/parser@npm:7.25.9" - dependencies: - "@babel/types": "npm:^7.25.9" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/143faff8a72331be5ed94080e0f4645cbeea814fb488cd9210154083735f67cb66fde32f6a4a80efd6c4cdf12c6f8b50995a465846093c7f65c5da8d7829627c - languageName: node - linkType: hard - -"@babel/parser@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/parser@npm:7.25.7" - dependencies: - "@babel/types": "npm:^7.25.7" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/b771469bb6b636c18a8d642b9df3c73913c3860a979591e1a29a98659efd38b81d3e393047b5251fe382d4c82c681c12da9ce91c98d69316d2604d155a214bcf - languageName: node - linkType: hard - -"@babel/parser@npm:^7.26.0": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.8, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0": version: 7.26.0 resolution: "@babel/parser@npm:7.26.0" dependencies: @@ -1920,18 +1721,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-assertions@npm:^7.20.0, @babel/plugin-syntax-import-assertions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f5a022b8a7f3585cf1586535224b06ae380983d3c14f7127b82792ef50cd8194047080540c8abec7aa8f8bfe7d774d71a1ee91f4fd3fa0277f7ffe2d3c6c4977 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.26.0": +"@babel/plugin-syntax-import-assertions@npm:^7.20.0, @babel/plugin-syntax-import-assertions@npm:^7.26.0": version: 7.26.0 resolution: "@babel/plugin-syntax-import-assertions@npm:7.26.0" dependencies: @@ -1942,18 +1732,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-attributes@npm:^7.24.7, @babel/plugin-syntax-import-attributes@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/bbdf97ba088c3d482492f6c3376422752b1723ce32e3ac11b000faf3c942d68e418c8a911431cb05d5e300d008cc37cd5518e89807a5813c2ac8fdd82d171f8d - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-attributes@npm:^7.26.0": +"@babel/plugin-syntax-import-attributes@npm:^7.24.7, @babel/plugin-syntax-import-attributes@npm:^7.26.0": version: 7.26.0 resolution: "@babel/plugin-syntax-import-attributes@npm:7.26.0" dependencies: @@ -1986,18 +1765,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.0.0, @babel/plugin-syntax-jsx@npm:^7.25.7, @babel/plugin-syntax-jsx@npm:^7.7.2": - version: 7.25.7 - resolution: "@babel/plugin-syntax-jsx@npm:7.25.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/17db499c31fcfaa94d5408726d943955d51d478353d1e2dd84eda6024f7e3d104b9456a77f8aabfae0db7f4dc32f810d08357112f7fcbe305e7c9fcf5b3cac13 - languageName: node - linkType: hard - -"@babel/plugin-syntax-jsx@npm:^7.25.9": +"@babel/plugin-syntax-jsx@npm:^7.0.0, @babel/plugin-syntax-jsx@npm:^7.25.7, @babel/plugin-syntax-jsx@npm:^7.25.9, @babel/plugin-syntax-jsx@npm:^7.7.2": version: 7.25.9 resolution: "@babel/plugin-syntax-jsx@npm:7.25.9" dependencies: @@ -2096,17 +1864,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/plugin-syntax-typescript@npm:7.25.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/ed51fd81a5cf571a89fc4cf4c0e3b0b91285c367237374c133d2e5e718f3963cfa61b81997df39220a8837dc99f9e9a8ab7701d259c09fae379e4843d9db60c2 - languageName: node - linkType: hard - "@babel/plugin-syntax-typescript@npm:^7.25.9, @babel/plugin-syntax-typescript@npm:^7.7.2": version: 7.25.9 resolution: "@babel/plugin-syntax-typescript@npm:7.25.9" @@ -2201,18 +1958,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-static-block@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-class-static-block@npm:7.25.9" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10c0/696a3a8acde79d6fee4f685ee1353bf483c4cd50a38e586a1a044268df72d87f9b1a3b7c473def6cde836aa69931fd5a75560bb9ee3a635ebde8911575ed49ca - languageName: node - linkType: hard - "@babel/plugin-transform-class-static-block@npm:^7.26.0": version: 7.26.0 resolution: "@babel/plugin-transform-class-static-block@npm:7.26.0" @@ -2439,19 +2184,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.25.7" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.7" - "@babel/helper-plugin-utils": "npm:^7.25.7" - "@babel/helper-simple-access": "npm:^7.25.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2f1c945fc3c9b690b0ddcf2c80156b2e4fbf2cf15aac43ac8fe6e4b34125869528839a53d07c564e62e4aed394ebdc1d2c3b796b547374455522581c11b7599c - languageName: node - linkType: hard - "@babel/plugin-transform-modules-systemjs@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.9" @@ -2807,21 +2539,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/plugin-transform-typescript@npm:7.25.7" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.7" - "@babel/helper-create-class-features-plugin": "npm:^7.25.7" - "@babel/helper-plugin-utils": "npm:^7.25.7" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.7" - "@babel/plugin-syntax-typescript": "npm:^7.25.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/5fa839b9560221698edff5e00b5cccc658c7875efaa7971c66d478f5b026770f12dd47b1be024463a44f9e29b4e14e8ddddbf4a2b324b0b94f58370dd5ae7195 - languageName: node - linkType: hard - "@babel/plugin-transform-typescript@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-typescript@npm:7.25.9" @@ -2884,7 +2601,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:7.26.0": +"@babel/preset-env@npm:7.26.0, @babel/preset-env@npm:^7.11.0, @babel/preset-env@npm:^7.12.1, @babel/preset-env@npm:^7.16.4": version: 7.26.0 resolution: "@babel/preset-env@npm:7.26.0" dependencies: @@ -2963,84 +2680,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-env@npm:^7.11.0, @babel/preset-env@npm:^7.12.1, @babel/preset-env@npm:^7.16.4": - version: 7.25.9 - resolution: "@babel/preset-env@npm:7.25.9" - dependencies: - "@babel/compat-data": "npm:^7.25.9" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^7.25.9" - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^7.25.9" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.25.9" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.25.9" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.25.9" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-import-assertions": "npm:^7.25.9" - "@babel/plugin-syntax-import-attributes": "npm:^7.25.9" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.25.9" - "@babel/plugin-transform-async-generator-functions": "npm:^7.25.9" - "@babel/plugin-transform-async-to-generator": "npm:^7.25.9" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.25.9" - "@babel/plugin-transform-block-scoping": "npm:^7.25.9" - "@babel/plugin-transform-class-properties": "npm:^7.25.9" - "@babel/plugin-transform-class-static-block": "npm:^7.25.9" - "@babel/plugin-transform-classes": "npm:^7.25.9" - "@babel/plugin-transform-computed-properties": "npm:^7.25.9" - "@babel/plugin-transform-destructuring": "npm:^7.25.9" - "@babel/plugin-transform-dotall-regex": "npm:^7.25.9" - "@babel/plugin-transform-duplicate-keys": "npm:^7.25.9" - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^7.25.9" - "@babel/plugin-transform-dynamic-import": "npm:^7.25.9" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.25.9" - "@babel/plugin-transform-export-namespace-from": "npm:^7.25.9" - "@babel/plugin-transform-for-of": "npm:^7.25.9" - "@babel/plugin-transform-function-name": "npm:^7.25.9" - "@babel/plugin-transform-json-strings": "npm:^7.25.9" - "@babel/plugin-transform-literals": "npm:^7.25.9" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.25.9" - "@babel/plugin-transform-member-expression-literals": "npm:^7.25.9" - "@babel/plugin-transform-modules-amd": "npm:^7.25.9" - "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" - "@babel/plugin-transform-modules-systemjs": "npm:^7.25.9" - "@babel/plugin-transform-modules-umd": "npm:^7.25.9" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.25.9" - "@babel/plugin-transform-new-target": "npm:^7.25.9" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.25.9" - "@babel/plugin-transform-numeric-separator": "npm:^7.25.9" - "@babel/plugin-transform-object-rest-spread": "npm:^7.25.9" - "@babel/plugin-transform-object-super": "npm:^7.25.9" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.25.9" - "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" - "@babel/plugin-transform-parameters": "npm:^7.25.9" - "@babel/plugin-transform-private-methods": "npm:^7.25.9" - "@babel/plugin-transform-private-property-in-object": "npm:^7.25.9" - "@babel/plugin-transform-property-literals": "npm:^7.25.9" - "@babel/plugin-transform-regenerator": "npm:^7.25.9" - "@babel/plugin-transform-reserved-words": "npm:^7.25.9" - "@babel/plugin-transform-shorthand-properties": "npm:^7.25.9" - "@babel/plugin-transform-spread": "npm:^7.25.9" - "@babel/plugin-transform-sticky-regex": "npm:^7.25.9" - "@babel/plugin-transform-template-literals": "npm:^7.25.9" - "@babel/plugin-transform-typeof-symbol": "npm:^7.25.9" - "@babel/plugin-transform-unicode-escapes": "npm:^7.25.9" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.25.9" - "@babel/plugin-transform-unicode-regex": "npm:^7.25.9" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.25.9" - "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.6" - babel-plugin-polyfill-regenerator: "npm:^0.6.1" - core-js-compat: "npm:^3.38.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/b8b391e3fe69918a2a4f4366034113bd6f57c9748974dbe1b807a728bc41434f1e003cb4204ca63a2a01cbb7c05ba96036261b64756243374374353931d346e6 - languageName: node - linkType: hard - "@babel/preset-modules@npm:0.1.6-no-external-plugins": version: 0.1.6-no-external-plugins resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" @@ -3070,7 +2709,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:7.26.0": +"@babel/preset-typescript@npm:7.26.0, @babel/preset-typescript@npm:^7.16.0": version: 7.26.0 resolution: "@babel/preset-typescript@npm:7.26.0" dependencies: @@ -3085,21 +2724,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.16.0": - version: 7.25.7 - resolution: "@babel/preset-typescript@npm:7.25.7" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.7" - "@babel/helper-validator-option": "npm:^7.25.7" - "@babel/plugin-syntax-jsx": "npm:^7.25.7" - "@babel/plugin-transform-modules-commonjs": "npm:^7.25.7" - "@babel/plugin-transform-typescript": "npm:^7.25.7" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8dc1258e3c5230bbe42ff9811f08924509238e6bd32fa0b7b0c0a6c5e1419512a8e1f733e1b114454d367b7c164beca2cf33acf2ed9e0d99be010c1c5cdbef0c - languageName: node - linkType: hard - "@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4": version: 7.25.7 resolution: "@babel/runtime@npm:7.25.7" @@ -3120,17 +2744,6 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/template@npm:7.25.7" - dependencies: - "@babel/code-frame": "npm:^7.25.7" - "@babel/parser": "npm:^7.25.7" - "@babel/types": "npm:^7.25.7" - checksum: 10c0/8ae9e36e4330ee83d4832531d1d9bec7dc2ef6a2a8afa1ef1229506fd60667abcb17f306d1c3d7e582251270597022990c845d5d69e7add70a5aea66720decb9 - languageName: node - linkType: hard - "@babel/traverse@npm:^7.14.0, @babel/traverse@npm:^7.16.8, @babel/traverse@npm:^7.24.0, @babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.7.2": version: 7.25.9 resolution: "@babel/traverse@npm:7.25.9" @@ -3146,54 +2759,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/traverse@npm:7.25.7" - dependencies: - "@babel/code-frame": "npm:^7.25.7" - "@babel/generator": "npm:^7.25.7" - "@babel/parser": "npm:^7.25.7" - "@babel/template": "npm:^7.25.7" - "@babel/types": "npm:^7.25.7" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/75d73e52c507a7a7a4c7971d6bf4f8f26fdd094e0d3a0193d77edf6a5efa36fc3db91ec5cc48e8b94e6eb5d5ad21af0a1040e71309172851209415fd105efb1a - languageName: node - linkType: hard - -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.6, @babel/types@npm:^7.16.8, @babel/types@npm:^7.18.13, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": - version: 7.25.8 - resolution: "@babel/types@npm:7.25.8" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.7" - "@babel/helper-validator-identifier": "npm:^7.25.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/55ca2d6df6426c98db2769ce884ce5e9de83a512ea2dd7bcf56c811984dc14351cacf42932a723630c5afcff2455809323decd645820762182f10b7b5252b59f - languageName: node - linkType: hard - -"@babel/types@npm:^7.25.7": - version: 7.25.7 - resolution: "@babel/types@npm:7.25.7" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.7" - "@babel/helper-validator-identifier": "npm:^7.25.7" - to-fast-properties: "npm:^2.0.0" - checksum: 10c0/e03e1e2e08600fa1e8eb90632ac9c253dd748176c8d670d85f85b0dc83a0573b26ae748a1cbcb81f401903a3d95f43c3f4f8d516a5ed779929db27de56289633 - languageName: node - linkType: hard - -"@babel/types@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/types@npm:7.25.9" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/33890d08bcb06b26a3a60e4c6c996cbdf2b8d8a3c212664de659c2775f80b002c5f2bceedaa309c384ff5e99bd579794fe6a7e41de07df70246f43c55016d349 - languageName: node - linkType: hard - -"@babel/types@npm:^7.26.0": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.6, @babel/types@npm:^7.16.8, @babel/types@npm:^7.18.13, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.0, @babel/types@npm:^7.25.7, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": version: 7.26.0 resolution: "@babel/types@npm:7.26.0" dependencies: @@ -3965,7 +3531,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/auto-type-merging@workspace:e2e/auto-type-merging" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" graphql-yoga: "npm:^5.7.0" languageName: unknown @@ -3975,7 +3541,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/cjs-project@workspace:e2e/cjs-project" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -3984,7 +3550,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/compose-to-output@workspace:e2e/compose-to-output" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -3993,7 +3559,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/esm-config-in-cjs-project@workspace:e2e/esm-config-in-cjs-project" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -4002,7 +3568,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/esm-project@workspace:e2e/esm-project" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -4011,7 +3577,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/extra-fields@workspace:e2e/extra-fields" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" graphql-yoga: "npm:5.7.0" languageName: unknown @@ -4023,7 +3589,7 @@ __metadata: dependencies: "@apollo/server": "npm:^4.10.3" "@apollo/subgraph": "npm:^2.7.2" - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" languageName: unknown linkType: soft @@ -4034,7 +3600,7 @@ __metadata: dependencies: "@apollo/server": "npm:^4.10.3" "@apollo/subgraph": "npm:^2.7.2" - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" languageName: unknown linkType: soft @@ -4044,7 +3610,7 @@ __metadata: dependencies: "@apollo/server": "npm:^4.10.3" "@apollo/subgraph": "npm:^2.7.2" - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" fets: "npm:^0.8.1" languageName: unknown linkType: soft @@ -4055,7 +3621,7 @@ __metadata: dependencies: "@apollo/server": "npm:^4.10.3" "@apollo/subgraph": "npm:^2.7.2" - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@repeaterjs/repeater": "npm:^3.0.6" "@types/express": "npm:^5.0.0" "@types/ws": "npm:^8" @@ -4070,17 +3636,30 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/file-upload@workspace:e2e/file-upload" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-tools/schema": "npm:^10.0.6" graphql: "npm:16.9.0" languageName: unknown linkType: soft +"@e2e/grpc@workspace:e2e/grpc-example": + version: 0.0.0-use.local + resolution: "@e2e/grpc@workspace:e2e/grpc-example" + dependencies: + "@graphql-hive/gateway": "npm:^1.4.1" + "@graphql-mesh/compose-cli": "workspace:*" + "@grpc/grpc-js": "npm:^1.12.2" + "@grpc/proto-loader": "npm:^0.7.13" + "@omnigraph/grpc": "workspace:*" + graphql: "npm:16.9.0" + languageName: unknown + linkType: soft + "@e2e/hoist-and-prefix-transform@workspace:e2e/hoist-and-prefix-transform": version: 0.0.0-use.local resolution: "@e2e/hoist-and-prefix-transform@workspace:e2e/hoist-and-prefix-transform" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-tools/schema": "npm:^10.0.6" graphql: "npm:16.9.0" languageName: unknown @@ -4090,7 +3669,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/js-config@workspace:e2e/js-config" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -4099,7 +3678,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/json-schema-subscriptions@workspace:e2e/json-schema-subscriptions" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" fets: "npm:^0.8.0" graphql: "npm:16.9.0" graphql-sse: "npm:^2.5.3" @@ -4110,7 +3689,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/logs-to-stderr-results-to-stdout@workspace:e2e/logs-to-stderr-results-to-stdout" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -4119,7 +3698,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/manual-transport-def@workspace:e2e/manual-transport-def" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" fets: "npm:0.8.3" graphql: "npm:16.9.0" languageName: unknown @@ -4129,7 +3708,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/mysql-employees@workspace:e2e/mysql-employees" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" languageName: unknown linkType: soft @@ -4138,7 +3717,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/mysql-rfam@workspace:e2e/mysql-rfam" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -4147,7 +3726,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/neo4j-example@workspace:e2e/neo4j-example" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" languageName: unknown linkType: soft @@ -4156,7 +3735,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/odata-trippin-example@workspace:e2e/odata-trippin" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" languageName: unknown linkType: soft @@ -4165,7 +3744,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/openapi-additional-resolvers@workspace:e2e/openapi-additional-resolvers" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" moment: "npm:2.30.1" languageName: unknown @@ -4175,7 +3754,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/openapi-arg-rename@workspace:e2e/openapi-arg-rename" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" moment: "npm:2.30.1" languageName: unknown @@ -4185,7 +3764,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/openapi-javascript-wiki@workspace:e2e/openapi-javascript-wiki" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" moment: "npm:2.30.1" languageName: unknown @@ -4195,7 +3774,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/openapi-min-length@workspace:e2e/openapi-min-length" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" moment: "npm:2.30.1" languageName: unknown @@ -4205,7 +3784,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/openapi-naming-convention@workspace:e2e/openapi-naming-convention" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" moment: "npm:2.30.1" languageName: unknown @@ -4215,7 +3794,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/openapi-prune@workspace:e2e/openapi-prune" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" moment: "npm:2.30.1" languageName: unknown @@ -4225,7 +3804,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/openapi-subscriptions@workspace:e2e/openapi-subscriptions" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" fets: "npm:^0.8.0" graphql: "npm:16.9.0" graphql-sse: "npm:^2.5.3" @@ -4239,7 +3818,7 @@ __metadata: dependencies: "@apollo/server": "npm:^4.10.3" "@apollo/subgraph": "npm:^2.7.2" - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.8.1" graphql-yoga: "npm:^5.7.0" languageName: unknown @@ -4249,7 +3828,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/programmatic-batching-example@workspace:e2e/programmatic-batching" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" fets: "npm:^0.8.0" graphql: "npm:16.9.0" languageName: unknown @@ -4259,7 +3838,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/soap-demo@workspace:e2e/soap-demo" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" languageName: unknown linkType: soft @@ -4268,7 +3847,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/sqlite-chinook@workspace:e2e/sqlite-chinook" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" languageName: unknown linkType: soft @@ -4277,7 +3856,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/supergraph-url@workspace:e2e/supergraph-url" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" languageName: unknown linkType: soft @@ -4289,7 +3868,7 @@ __metadata: "@creditkarma/thrift-server-core": "npm:^1.0.4" "@creditkarma/thrift-server-express": "npm:^1.0.4" "@creditkarma/thrift-typescript": "npm:^3.7.6" - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@omnigraph/thrift": "npm:^0.7.12" express: "npm:^4.18.2" graphql: "npm:^16.9.0" @@ -4301,7 +3880,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/top-level-await@workspace:e2e/top-level-await" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:16.9.0" languageName: unknown linkType: soft @@ -4310,7 +3889,7 @@ __metadata: version: 0.0.0-use.local resolution: "@e2e/type-merging-batching@workspace:e2e/type-merging-batching" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" graphql: "npm:^16.9.0" graphql-yoga: "npm:^5.7.0" languageName: unknown @@ -4321,7 +3900,7 @@ __metadata: resolution: "@e2e/utils@workspace:e2e/utils" dependencies: "@apollo/gateway": "npm:^2.8.3" - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@types/dockerode": "npm:^3.3.28" dockerode: "npm:^4.0.2" glob: "npm:^11.0.0" @@ -4351,7 +3930,7 @@ __metadata: languageName: node linkType: hard -"@envelop/core@npm:5.0.2, @envelop/core@npm:^5.0.0, @envelop/core@npm:^5.0.1": +"@envelop/core@npm:5.0.2, @envelop/core@npm:^5.0.0, @envelop/core@npm:^5.0.1, @envelop/core@npm:^5.0.2": version: 5.0.2 resolution: "@envelop/core@npm:5.0.2" dependencies: @@ -4841,9 +4420,9 @@ __metadata: resolution: "@examples-v1-next/auth0@workspace:examples/v1-next/auth0" dependencies: "@envelop/auth0": "npm:^6.0.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/compose-cli": "npm:^1.1.4" "@graphql-mesh/plugin-operation-field-permissions": "npm:^0.102.10" - "@graphql-mesh/serve-cli": "npm:^1.4.0" "@omnigraph/json-schema": "npm:^0.107.4" graphql: "npm:16.9.0" jest: "npm:29.7.0" @@ -4854,11 +4433,11 @@ __metadata: version: 0.0.0-use.local resolution: "@examples-v1-next/cfw-breweries@workspace:examples/v1-next/integrations/cfw-breweries" dependencies: + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/cache-cfw-kv": "npm:^0.102.10" "@graphql-mesh/cache-localforage": "npm:^0.102.10" "@graphql-mesh/compose-cli": "npm:^1.1.4" "@graphql-mesh/plugin-response-cache": "npm:^0.102.10" - "@graphql-mesh/serve-runtime": "npm:^1.2.4" "@omnigraph/json-schema": "npm:^0.107.4" graphql: "npm:16.9.0" wrangler: "npm:3.83.0" @@ -4870,10 +4449,10 @@ __metadata: resolution: "@examples-v1-next/cfw-spacex@workspace:examples/v1-next/integrations/cfw-spacex" dependencies: "@envelop/depth-limit": "npm:^4.0.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/cache-cfw-kv": "npm:^0.102.10" "@graphql-mesh/plugin-rate-limit": "npm:^0.102.10" "@graphql-mesh/plugin-response-cache": "npm:^0.102.10" - "@graphql-mesh/serve-runtime": "npm:^1.2.4" graphql: "npm:16.9.0" wrangler: "npm:3.83.0" languageName: unknown @@ -4883,8 +4462,8 @@ __metadata: version: 0.0.0-use.local resolution: "@examples-v1-next/fastify@workspace:examples/v1-next/integrations/fastify" dependencies: + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/compose-cli": "npm:^1.1.4" - "@graphql-mesh/serve-runtime": "npm:^1.2.4" "@omnigraph/openapi": "npm:^0.107.4" fastify: "npm:^5.0.0" graphql: "npm:16.9.0" @@ -4899,8 +4478,8 @@ __metadata: resolution: "@examples-v1-next/gcp-functions@workspace:examples/v1-next/integrations/gcp-functions" dependencies: "@google-cloud/functions-framework": "npm:^3.3.0" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/compose-cli": "npm:^1.1.4" - "@graphql-mesh/serve-runtime": "npm:^1.2.4" "@omnigraph/json-schema": "npm:^0.107.4" "@types/node": "npm:^22.0.0" graphql: "npm:^16.9.0" @@ -4912,7 +4491,7 @@ __metadata: version: 0.0.0-use.local resolution: "@examples-v1-next/hive-example-gateway@workspace:examples/v1-next/hive-example/gateway" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-hive/gateway": "npm:^1.4.1" dotenv: "npm:^16.4.5" graphql: "npm:16.9.0" languageName: unknown @@ -4950,8 +4529,8 @@ __metadata: version: 0.0.0-use.local resolution: "@examples-v1-next/json-schema-reddit@workspace:examples/v1-next/json-schema-reddit" dependencies: + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/compose-cli": "workspace:*" - "@graphql-mesh/serve-cli": "npm:^1.4.0" "@omnigraph/json-schema": "workspace:*" graphql: "npm:16.9.0" languageName: unknown @@ -4961,9 +4540,9 @@ __metadata: version: 0.0.0-use.local resolution: "@examples-v1-next/openapi-location-weather@workspace:examples/v1-next/openapi-location-weather" dependencies: + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/cache-localforage": "npm:^0.102.10" "@graphql-mesh/compose-cli": "npm:^1.1.4" - "@graphql-mesh/serve-cli": "npm:^1.4.0" "@omnigraph/openapi": "npm:^0.107.4" graphql: "npm:^16.9.0" languageName: unknown @@ -4973,8 +4552,8 @@ __metadata: version: 0.0.0-use.local resolution: "@examples-v1-next/openapi-youtrack@workspace:examples/v1-next/openapi-youtrack" dependencies: + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/compose-cli": "npm:^1.1.4" - "@graphql-mesh/serve-cli": "npm:^1.4.0" "@omnigraph/openapi": "npm:^0.107.4" graphql: "npm:^16.9.0" languageName: unknown @@ -4984,8 +4563,7 @@ __metadata: version: 0.0.0-use.local resolution: "@examples-v1-next/openwhisk-example@workspace:examples/v1-next/integrations/openwhisk-example" dependencies: - "@graphql-mesh/serve-cli": "npm:^1.4.0" - "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-hive/gateway": "npm:^1.4.1" esbuild: "npm:^0.24.0" graphql: "npm:16.9.0" typescript: "npm:^5.4.2" @@ -6033,23 +5611,7 @@ __metadata: languageName: node linkType: hard -"@graphql-codegen/plugin-helpers@npm:^5.0.3, @graphql-codegen/plugin-helpers@npm:^5.0.4": - version: 5.0.4 - resolution: "@graphql-codegen/plugin-helpers@npm:5.0.4" - dependencies: - "@graphql-tools/utils": "npm:^10.0.0" - change-case-all: "npm:1.0.15" - common-tags: "npm:1.8.2" - import-from: "npm:4.0.0" - lodash: "npm:~4.17.0" - tslib: "npm:~2.6.0" - peerDependencies: - graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - checksum: 10c0/e1d7af8af8cfd5d8baa4fbf099fbe14ee45d43a2e66af38eb901348163e073a392e53cdd58aad27acf32d14da5b6a7bf06fe1daa793d99e462457f80025dec97 - languageName: node - linkType: hard - -"@graphql-codegen/plugin-helpers@npm:^5.1.0": +"@graphql-codegen/plugin-helpers@npm:^5.0.3, @graphql-codegen/plugin-helpers@npm:^5.0.4, @graphql-codegen/plugin-helpers@npm:^5.1.0": version: 5.1.0 resolution: "@graphql-codegen/plugin-helpers@npm:5.1.0" dependencies: @@ -6174,7 +5736,7 @@ __metadata: languageName: node linkType: hard -"@graphql-codegen/visitor-plugin-common@npm:5.4.0, @graphql-codegen/visitor-plugin-common@npm:^5.4.0": +"@graphql-codegen/visitor-plugin-common@npm:5.4.0": version: 5.4.0 resolution: "@graphql-codegen/visitor-plugin-common@npm:5.4.0" dependencies: @@ -6194,7 +5756,7 @@ __metadata: languageName: node linkType: hard -"@graphql-codegen/visitor-plugin-common@npm:5.5.0": +"@graphql-codegen/visitor-plugin-common@npm:5.5.0, @graphql-codegen/visitor-plugin-common@npm:^5.4.0": version: 5.5.0 resolution: "@graphql-codegen/visitor-plugin-common@npm:5.5.0" dependencies: @@ -6259,6 +5821,116 @@ __metadata: languageName: node linkType: hard +"@graphql-hive/gateway-runtime@npm:1.0.0": + version: 1.0.0 + resolution: "@graphql-hive/gateway-runtime@npm:1.0.0" + dependencies: + "@envelop/core": "npm:^5.0.0" + "@envelop/disable-introspection": "npm:^6.0.0" + "@envelop/generic-auth": "npm:^8.0.0" + "@graphql-hive/core": "npm:^0.8.1" + "@graphql-mesh/cross-helpers": "npm:^0.4.6" + "@graphql-mesh/fusion-runtime": "npm:^0.9.0" + "@graphql-mesh/hmac-upstream-signature": "npm:^1.1.0" + "@graphql-mesh/plugin-hive": "npm:^0.102.8" + "@graphql-mesh/plugin-response-cache": "npm:^0.102.6" + "@graphql-mesh/store": "npm:^0.102.10" + "@graphql-mesh/transport-common": "npm:^0.7.7" + "@graphql-mesh/transport-http": "npm:^0.6.7" + "@graphql-mesh/types": "npm:^0.102.10" + "@graphql-mesh/utils": "npm:^0.102.10" + "@graphql-tools/batch-delegate": "npm:^9.0.3" + "@graphql-tools/delegate": "npm:^10.0.21" + "@graphql-tools/executor-http": "npm:^1.1.5" + "@graphql-tools/federation": "npm:^2.2.10" + "@graphql-tools/stitch": "npm:^9.2.10" + "@graphql-tools/utils": "npm:^10.5.3" + "@graphql-tools/wrap": "npm:^10.0.5" + "@graphql-yoga/plugin-apollo-usage-report": "npm:^0.1.0" + "@graphql-yoga/plugin-csrf-prevention": "npm:^3.7.0" + "@graphql-yoga/plugin-defer-stream": "npm:^3.7.0" + "@graphql-yoga/plugin-persisted-operations": "npm:^3.7.0" + "@types/node": "npm:^22.7.5" + "@whatwg-node/disposablestack": "npm:^0.0.5" + "@whatwg-node/server": "npm:^0.9.46" + graphql-yoga: "npm:^5.7.0" + tslib: "npm:^2.8.0" + peerDependencies: + "@parcel/watcher": ^2.1.0 + graphql: ^15.9.0 || ^16.9.0 + peerDependenciesMeta: + "@parcel/watcher": + optional: true + checksum: 10c0/ba05dc54548e64a0fd05d828b366cb09483418ea90ca9cafa28e1305bc8b60317a3bb27fe24c13e452bf045b4549ba9e95b60a255427a6bdc387b6735d4f6728 + languageName: node + linkType: hard + +"@graphql-hive/gateway@npm:1.4.0": + version: 1.4.0 + resolution: "@graphql-hive/gateway@npm:1.4.0" + dependencies: + "@graphql-mesh/serve-cli": "npm:^1.4.0" + "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-mesh/utils": "npm:^0.102.10" + peerDependencies: + "@parcel/watcher": ^2.1.0 + graphql: "*" + peerDependenciesMeta: + "@parcel/watcher": + optional: true + bin: + hive-gateway: esm/bin.js + checksum: 10c0/6d6c2086eacad33567fd87a54e3c90164399f705972ae8f3b016c4fcebbfc8f1a2c15c1bd4318fb010ebc405aea3e74a5c1387ac322d18b9e5b62c42cd67e73d + languageName: node + linkType: hard + +"@graphql-hive/gateway@npm:^1.4.1": + version: 1.4.1 + resolution: "@graphql-hive/gateway@npm:1.4.1" + dependencies: + "@commander-js/extra-typings": "npm:^12.1.0" + "@envelop/core": "npm:^5.0.2" + "@graphql-hive/gateway-runtime": "npm:1.0.0" + "@graphql-mesh/cache-cfw-kv": "npm:^0.102.6" + "@graphql-mesh/cache-localforage": "npm:^0.102.6" + "@graphql-mesh/cache-redis": "npm:^0.102.6" + "@graphql-mesh/cross-helpers": "npm:^0.4.6" + "@graphql-mesh/hmac-upstream-signature": "npm:^1.1.0" + "@graphql-mesh/include": "npm:^0.2.2" + "@graphql-mesh/plugin-deduplicate-request": "npm:^0.102.6" + "@graphql-mesh/plugin-http-cache": "npm:^0.102.6" + "@graphql-mesh/plugin-jit": "npm:^0.0.4" + "@graphql-mesh/plugin-jwt-auth": "npm:^1.1.0" + "@graphql-mesh/plugin-mock": "npm:^0.102.7" + "@graphql-mesh/plugin-opentelemetry": "npm:^1.1.0" + "@graphql-mesh/plugin-prometheus": "npm:^1.1.0" + "@graphql-mesh/plugin-rate-limit": "npm:^0.102.6" + "@graphql-mesh/plugin-snapshot": "npm:^0.102.6" + "@graphql-mesh/store": "npm:^0.102.10" + "@graphql-mesh/transport-http-callback": "npm:^0.5.2" + "@graphql-mesh/transport-ws": "npm:^0.4.0" + "@graphql-mesh/types": "npm:^0.102.10" + "@graphql-mesh/utils": "npm:^0.102.10" + "@graphql-tools/utils": "npm:^10.5.3" + commander: "npm:^12.0.0" + dotenv: "npm:^16.3.1" + graphql-ws: "npm:^5.16.0" + graphql-yoga: "npm:^5.7.0" + parse-duration: "npm:^1.1.0" + tslib: "npm:^2.8.0" + ws: "npm:^8.18.0" + peerDependencies: + "@parcel/watcher": ^2.1.0 + graphql: ^15.9.0 || ^16.9.0 + peerDependenciesMeta: + "@parcel/watcher": + optional: true + bin: + hive-gateway: ./dist/bin.js + checksum: 10c0/18d25198cf846a0d080e979af4ff69f97e0e93100edd65a675d2f6ed765dd05ac3e03545d7d0e11a5c39511d53670d2b872df3b07ff66ef7f829561fa96de41c + languageName: node + linkType: hard + "@graphql-hive/yoga@npm:^0.38.1": version: 0.38.2 resolution: "@graphql-hive/yoga@npm:0.38.2" @@ -6313,7 +5985,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/cache-cfw-kv@npm:0.102.10, @graphql-mesh/cache-cfw-kv@npm:^0.102.10, @graphql-mesh/cache-cfw-kv@workspace:packages/cache/cfw-kv": +"@graphql-mesh/cache-cfw-kv@npm:0.102.10, @graphql-mesh/cache-cfw-kv@npm:^0.102.10, @graphql-mesh/cache-cfw-kv@npm:^0.102.6, @graphql-mesh/cache-cfw-kv@workspace:packages/cache/cfw-kv": version: 0.0.0-use.local resolution: "@graphql-mesh/cache-cfw-kv@workspace:packages/cache/cfw-kv" dependencies: @@ -6340,7 +6012,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/cache-localforage@npm:0.102.10, @graphql-mesh/cache-localforage@npm:^0.102.10, @graphql-mesh/cache-localforage@workspace:packages/cache/localforage": +"@graphql-mesh/cache-localforage@npm:0.102.10, @graphql-mesh/cache-localforage@npm:^0.102.10, @graphql-mesh/cache-localforage@npm:^0.102.6, @graphql-mesh/cache-localforage@workspace:packages/cache/localforage": version: 0.0.0-use.local resolution: "@graphql-mesh/cache-localforage@workspace:packages/cache/localforage" dependencies: @@ -6353,7 +6025,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/cache-redis@npm:^0.102.10, @graphql-mesh/cache-redis@workspace:packages/cache/redis": +"@graphql-mesh/cache-redis@npm:^0.102.10, @graphql-mesh/cache-redis@npm:^0.102.6, @graphql-mesh/cache-redis@workspace:packages/cache/redis": version: 0.0.0-use.local resolution: "@graphql-mesh/cache-redis@workspace:packages/cache/redis" dependencies: @@ -6477,7 +6149,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/cross-helpers@npm:0.4.7, @graphql-mesh/cross-helpers@npm:^0.4.7, @graphql-mesh/cross-helpers@workspace:packages/cross-helpers": +"@graphql-mesh/cross-helpers@npm:0.4.7, @graphql-mesh/cross-helpers@npm:^0.4.6, @graphql-mesh/cross-helpers@npm:^0.4.7, @graphql-mesh/cross-helpers@workspace:packages/cross-helpers": version: 0.0.0-use.local resolution: "@graphql-mesh/cross-helpers@workspace:packages/cross-helpers" dependencies: @@ -6492,10 +6164,10 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/fusion-composition@workspace:packages/fusion/composition" dependencies: - "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/utils": "npm:^0.102.10" "@graphql-tools/schema": "npm:^10.0.5" - "@graphql-tools/stitching-directives": "npm:^3.1.8" + "@graphql-tools/stitching-directives": "npm:^3.1.9" "@graphql-tools/utils": "npm:^10.5.5" "@theguild/federation-composition": "npm:^0.14.0" "@types/minimatch": "npm:5.1.2" @@ -6511,7 +6183,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/fusion-runtime@npm:^0.9.6, @graphql-mesh/fusion-runtime@workspace:packages/fusion/runtime": +"@graphql-mesh/fusion-runtime@npm:^0.9.0, @graphql-mesh/fusion-runtime@npm:^0.9.6, @graphql-mesh/fusion-runtime@workspace:packages/fusion/runtime": version: 0.0.0-use.local resolution: "@graphql-mesh/fusion-runtime@workspace:packages/fusion/runtime" dependencies: @@ -6521,14 +6193,14 @@ __metadata: "@graphql-mesh/transport-common": "npm:^0.7.11" "@graphql-mesh/types": "npm:^0.102.10" "@graphql-mesh/utils": "npm:^0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/executor": "npm:^1.3.2" - "@graphql-tools/federation": "npm:^2.2.19" + "@graphql-tools/federation": "npm:^2.2.21" "@graphql-tools/merge": "npm:^9.0.8" - "@graphql-tools/stitch": "npm:^9.2.15" - "@graphql-tools/stitching-directives": "npm:^3.1.8" + "@graphql-tools/stitch": "npm:^9.2.17" + "@graphql-tools/stitching-directives": "npm:^3.1.9" "@graphql-tools/utils": "npm:^10.5.5" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" "@whatwg-node/disposablestack": "npm:^0.0.5" change-case: "npm:^4.1.2" graphql-yoga: "npm:^5.7.0" @@ -6543,9 +6215,9 @@ __metadata: resolution: "@graphql-mesh/graphql@workspace:packages/legacy/handlers/graphql" dependencies: "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" - "@graphql-tools/federation": "npm:^2.2.19" - "@graphql-tools/url-loader": "npm:^8.0.8" + "@graphql-tools/delegate": "npm:^10.0.28" + "@graphql-tools/federation": "npm:^2.2.21" + "@graphql-tools/url-loader": "npm:^8.0.9" lodash.get: "npm:^4.4.2" peerDependencies: "@graphql-mesh/cross-helpers": ^0.4.7 @@ -6562,35 +6234,22 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/grpc@workspace:packages/legacy/handlers/grpc" dependencies: - "@ardatan/grpc-reflection-js": "npm:^0.0.2" - "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-mesh/transport-common": "npm:^0.7.11" - "@grpc/grpc-js": "npm:^1.1.7" - "@grpc/proto-loader": "npm:^0.7.8" - "@types/lodash.has": "npm:4.5.9" - globby: "npm:^11.1.0" - graphql-compose: "npm:^9.0.11" - graphql-scalars: "npm:^1.22.4" - lodash.get: "npm:^4.4.2" - lodash.has: "npm:^4.5.2" - long: "npm:4.0.0" - protobufjs: "npm:^7.2.5" + "@graphql-mesh/transport-grpc": "npm:^0.0.0" + "@omnigraph/grpc": "npm:^0.0.0" peerDependencies: - "@graphql-mesh/cross-helpers": ^0.4.7 "@graphql-mesh/store": ^0.102.10 "@graphql-mesh/types": ^0.102.10 "@graphql-mesh/utils": ^0.102.10 - "@graphql-tools/utils": ^10.5.5 graphql: "*" tslib: ^2.4.0 languageName: unknown linkType: soft -"@graphql-mesh/hmac-upstream-signature@npm:^1.2.4, @graphql-mesh/hmac-upstream-signature@workspace:packages/plugins/hmac-upstream-signature": +"@graphql-mesh/hmac-upstream-signature@npm:^1.1.0, @graphql-mesh/hmac-upstream-signature@npm:^1.2.4, @graphql-mesh/hmac-upstream-signature@workspace:packages/plugins/hmac-upstream-signature": version: 0.0.0-use.local resolution: "@graphql-mesh/hmac-upstream-signature@workspace:packages/plugins/hmac-upstream-signature" dependencies: - "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/transport-common": "npm:^0.7.11" graphql-yoga: "npm:^5.7.0" json-stable-stringify: "npm:^1.1.1" @@ -6676,7 +6335,7 @@ __metadata: dependencies: "@apollo/gateway": "npm:^2.4.1" "@graphql-tools/schema": "npm:^10.0.5" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" peerDependencies: "@graphql-mesh/cross-helpers": ^0.4.7 "@graphql-mesh/store": ^0.102.10 @@ -6693,9 +6352,9 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/merger-stitching@workspace:packages/legacy/mergers/stitching" dependencies: - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/schema": "npm:^10.0.5" - "@graphql-tools/stitch": "npm:^9.2.15" + "@graphql-tools/stitch": "npm:^9.2.17" peerDependencies: "@graphql-mesh/store": ^0.102.10 "@graphql-mesh/types": ^0.102.10 @@ -6802,7 +6461,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-deduplicate-request@npm:^0.102.10, @graphql-mesh/plugin-deduplicate-request@workspace:packages/plugins/deduplicate-request": +"@graphql-mesh/plugin-deduplicate-request@npm:^0.102.10, @graphql-mesh/plugin-deduplicate-request@npm:^0.102.6, @graphql-mesh/plugin-deduplicate-request@workspace:packages/plugins/deduplicate-request": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-deduplicate-request@workspace:packages/plugins/deduplicate-request" dependencies: @@ -6815,7 +6474,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-hive@npm:0.102.12, @graphql-mesh/plugin-hive@npm:^0.102.12, @graphql-mesh/plugin-hive@workspace:packages/plugins/hive": +"@graphql-mesh/plugin-hive@npm:0.102.12, @graphql-mesh/plugin-hive@npm:^0.102.12, @graphql-mesh/plugin-hive@npm:^0.102.8, @graphql-mesh/plugin-hive@workspace:packages/plugins/hive": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-hive@workspace:packages/plugins/hive" dependencies: @@ -6831,7 +6490,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-http-cache@npm:^0.102.10, @graphql-mesh/plugin-http-cache@workspace:packages/plugins/http-cache": +"@graphql-mesh/plugin-http-cache@npm:^0.102.10, @graphql-mesh/plugin-http-cache@npm:^0.102.6, @graphql-mesh/plugin-http-cache@workspace:packages/plugins/http-cache": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-http-cache@workspace:packages/plugins/http-cache" dependencies: @@ -6864,7 +6523,7 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-jit@workspace:packages/plugins/jit" dependencies: - "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-hive/gateway": "npm:^1.4.1" graphql-jit: "npm:^0.8.7" peerDependencies: "@envelop/core": ^5.0.2 @@ -6875,12 +6534,12 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-jwt-auth@npm:^1.2.4, @graphql-mesh/plugin-jwt-auth@workspace:packages/plugins/jwt-auth": +"@graphql-mesh/plugin-jwt-auth@npm:^1.1.0, @graphql-mesh/plugin-jwt-auth@npm:^1.2.4, @graphql-mesh/plugin-jwt-auth@workspace:packages/plugins/jwt-auth": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-jwt-auth@workspace:packages/plugins/jwt-auth" dependencies: "@envelop/generic-auth": "npm:8.0.0" - "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-yoga/plugin-jwt": "npm:^3.0.2" graphql-yoga: "npm:^5.7.0" jsonwebtoken: "npm:9.0.2" @@ -6909,7 +6568,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-mock@npm:0.102.11, @graphql-mesh/plugin-mock@npm:^0.102.11, @graphql-mesh/plugin-mock@workspace:packages/plugins/mock": +"@graphql-mesh/plugin-mock@npm:0.102.11, @graphql-mesh/plugin-mock@npm:^0.102.11, @graphql-mesh/plugin-mock@npm:^0.102.7, @graphql-mesh/plugin-mock@workspace:packages/plugins/mock": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-mock@workspace:packages/plugins/mock" dependencies: @@ -6953,11 +6612,11 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-opentelemetry@npm:^1.3.4, @graphql-mesh/plugin-opentelemetry@workspace:packages/plugins/opentelemetry": +"@graphql-mesh/plugin-opentelemetry@npm:^1.1.0, @graphql-mesh/plugin-opentelemetry@npm:^1.3.4, @graphql-mesh/plugin-opentelemetry@workspace:packages/plugins/opentelemetry": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-opentelemetry@workspace:packages/plugins/opentelemetry" dependencies: - "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-mesh/transport-common": "npm:^0.7.11" "@graphql-tools/utils": "npm:^10.5.5" "@opentelemetry/api": "npm:^1.9.0" @@ -6998,7 +6657,7 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-operation-headers@workspace:packages/plugins/operation-headers" peerDependencies: - "@graphql-mesh/serve-runtime": ^1.2.4 + "@graphql-hive/gateway": ^1.4.1 "@graphql-mesh/types": ^0.102.10 "@graphql-mesh/utils": ^0.102.10 graphql: "*" @@ -7006,11 +6665,11 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-prometheus@npm:^1.2.4, @graphql-mesh/plugin-prometheus@workspace:packages/plugins/prometheus": +"@graphql-mesh/plugin-prometheus@npm:^1.1.0, @graphql-mesh/plugin-prometheus@npm:^1.2.4, @graphql-mesh/plugin-prometheus@workspace:packages/plugins/prometheus": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-prometheus@workspace:packages/plugins/prometheus" dependencies: - "@graphql-mesh/serve-runtime": "npm:^1.2.4" + "@graphql-hive/gateway": "npm:^1.4.1" "@graphql-yoga/plugin-prometheus": "npm:^6.1.0" prom-client: "npm:15.1.3" peerDependencies: @@ -7023,7 +6682,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-rate-limit@npm:0.102.10, @graphql-mesh/plugin-rate-limit@npm:^0.102.10, @graphql-mesh/plugin-rate-limit@workspace:packages/plugins/rate-limit": +"@graphql-mesh/plugin-rate-limit@npm:0.102.10, @graphql-mesh/plugin-rate-limit@npm:^0.102.10, @graphql-mesh/plugin-rate-limit@npm:^0.102.6, @graphql-mesh/plugin-rate-limit@workspace:packages/plugins/rate-limit": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-rate-limit@workspace:packages/plugins/rate-limit" dependencies: @@ -7041,7 +6700,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-response-cache@npm:0.102.10, @graphql-mesh/plugin-response-cache@npm:^0.102.10, @graphql-mesh/plugin-response-cache@workspace:packages/plugins/response-cache": +"@graphql-mesh/plugin-response-cache@npm:0.102.10, @graphql-mesh/plugin-response-cache@npm:^0.102.10, @graphql-mesh/plugin-response-cache@npm:^0.102.6, @graphql-mesh/plugin-response-cache@workspace:packages/plugins/response-cache": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-response-cache@workspace:packages/plugins/response-cache" dependencies: @@ -7059,7 +6718,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/plugin-snapshot@npm:0.102.10, @graphql-mesh/plugin-snapshot@npm:^0.102.10, @graphql-mesh/plugin-snapshot@workspace:packages/plugins/snapshot": +"@graphql-mesh/plugin-snapshot@npm:0.102.10, @graphql-mesh/plugin-snapshot@npm:^0.102.10, @graphql-mesh/plugin-snapshot@npm:^0.102.6, @graphql-mesh/plugin-snapshot@workspace:packages/plugins/snapshot": version: 0.0.0-use.local resolution: "@graphql-mesh/plugin-snapshot@workspace:packages/plugins/snapshot" dependencies: @@ -7095,7 +6754,7 @@ __metadata: resolution: "@graphql-mesh/postgraphile@workspace:packages/legacy/handlers/postgraphile" dependencies: "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" pg: "npm:^8.6.0" postgraphile: "npm:^4.13.0" postgraphile-core: "npm:^4.13.0" @@ -7132,10 +6791,10 @@ __metadata: "@envelop/graphql-jit": "npm:^8.0.0" "@graphql-mesh/string-interpolation": "npm:^0.5.6" "@graphql-tools/batch-delegate": "npm:^9.0.9" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/executor": "npm:^1.3.2" "@graphql-tools/schema": "npm:10.0.7" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" "@whatwg-node/fetch": "npm:^0.9.0" graphql-jit: "npm:^0.8.7" peerDependencies: @@ -7148,7 +6807,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/serve-cli@npm:1.4.0, @graphql-mesh/serve-cli@npm:^1.4.0": +"@graphql-mesh/serve-cli@npm:^1.4.0": version: 1.4.0 resolution: "@graphql-mesh/serve-cli@npm:1.4.0" dependencies: @@ -7278,8 +6937,8 @@ __metadata: resolution: "@graphql-mesh/supergraph@workspace:packages/legacy/handlers/supergraph" dependencies: "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/federation": "npm:^2.2.19" - "@graphql-tools/url-loader": "npm:^8.0.8" + "@graphql-tools/federation": "npm:^2.2.21" + "@graphql-tools/url-loader": "npm:^8.0.9" "@graphql-tools/utils": "npm:^10.5.5" lodash.get: "npm:^4.4.2" peerDependencies: @@ -7333,9 +6992,9 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/transform-encapsulate@workspace:packages/legacy/transforms/encapsulate" dependencies: - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/schema": "npm:10.0.7" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" peerDependencies: "@graphql-mesh/types": ^0.102.10 "@graphql-mesh/utils": ^0.102.10 @@ -7369,8 +7028,8 @@ __metadata: dependencies: "@apollo/subgraph": "npm:^2.4.1" "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" - "@graphql-tools/stitching-directives": "npm:^3.1.8" + "@graphql-tools/delegate": "npm:^10.0.28" + "@graphql-tools/stitching-directives": "npm:^3.1.9" dset: "npm:^3.1.2" graphql-transform-federation: "npm:^2.2.0" peerDependencies: @@ -7386,8 +7045,8 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/transform-filter-schema@workspace:packages/legacy/transforms/filter-schema" dependencies: - "@graphql-tools/delegate": "npm:^10.0.27" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/delegate": "npm:^10.0.28" + "@graphql-tools/wrap": "npm:^10.0.12" "@types/minimatch": "npm:5.1.2" minimatch: "npm:^10.0.0" peerDependencies: @@ -7406,7 +7065,7 @@ __metadata: "@graphql-hive/core": "npm:^0.8.1" "@graphql-hive/yoga": "npm:^0.38.1" "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" peerDependencies: "@graphql-mesh/cross-helpers": ^0.4.7 "@graphql-mesh/types": ^0.102.10 @@ -7421,8 +7080,8 @@ __metadata: resolution: "@graphql-mesh/transform-hoist-field@workspace:packages/legacy/transforms/hoist-field" dependencies: "@graphql-mesh/cache-localforage": "npm:0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/delegate": "npm:^10.0.28" + "@graphql-tools/wrap": "npm:^10.0.12" peerDependencies: "@graphql-mesh/types": ^0.102.10 "@graphql-mesh/utils": ^0.102.10 @@ -7436,9 +7095,9 @@ __metadata: resolution: "@graphql-mesh/transform-naming-convention@workspace:packages/legacy/transforms/naming-convention" dependencies: "@graphql-mesh/cache-localforage": "npm:^0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/schema": "npm:10.0.7" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" change-case: "npm:^4.1.2" graphql-scalars: "npm:^1.22.4" lower-case: "npm:^2.0.2" @@ -7457,9 +7116,9 @@ __metadata: resolution: "@graphql-mesh/transform-prefix@workspace:packages/legacy/transforms/prefix" dependencies: "@graphql-mesh/cache-localforage": "npm:0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/schema": "npm:10.0.7" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" graphql-scalars: "npm:^1.22.4" peerDependencies: "@graphql-mesh/types": ^0.102.10 @@ -7505,9 +7164,9 @@ __metadata: resolution: "@graphql-mesh/transform-rename@workspace:packages/legacy/transforms/rename" dependencies: "@graphql-mesh/cache-localforage": "npm:0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/schema": "npm:10.0.7" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" graphql-scalars: "npm:^1.22.4" peerDependencies: "@graphql-mesh/types": ^0.102.10 @@ -7568,8 +7227,8 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/transform-type-merging@workspace:packages/legacy/transforms/type-merging" dependencies: - "@graphql-tools/delegate": "npm:^10.0.27" - "@graphql-tools/stitching-directives": "npm:^3.1.8" + "@graphql-tools/delegate": "npm:^10.0.28" + "@graphql-tools/stitching-directives": "npm:^3.1.9" peerDependencies: "@graphql-mesh/types": ^0.102.10 "@graphql-mesh/utils": ^0.102.10 @@ -7578,12 +7237,12 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/transport-common@npm:^0.7.11, @graphql-mesh/transport-common@workspace:packages/transports/common": +"@graphql-mesh/transport-common@npm:^0.7.11, @graphql-mesh/transport-common@npm:^0.7.7, @graphql-mesh/transport-common@workspace:packages/transports/common": version: 0.0.0-use.local resolution: "@graphql-mesh/transport-common@workspace:packages/transports/common" dependencies: "@envelop/core": "npm:^5.0.1" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/utils": "npm:^10.5.5" peerDependencies: "@graphql-mesh/types": ^0.102.10 @@ -7592,6 +7251,28 @@ __metadata: languageName: unknown linkType: soft +"@graphql-mesh/transport-grpc@npm:^0.0.0, @graphql-mesh/transport-grpc@workspace:packages/transports/grpc": + version: 0.0.0-use.local + resolution: "@graphql-mesh/transport-grpc@workspace:packages/transports/grpc" + dependencies: + "@graphql-mesh/cross-helpers": "npm:^0.4.7" + "@graphql-mesh/string-interpolation": "npm:^0.5.6" + "@graphql-mesh/transport-common": "npm:^0.7.11" + "@grpc/grpc-js": "npm:^1.1.7" + "@grpc/proto-loader": "npm:^0.7.8" + "@whatwg-node/disposablestack": "npm:^0.0.5" + graphql-scalars: "npm:^1.22.4" + lodash.get: "npm:^4.4.2" + protobufjs: "npm:^7.2.5" + peerDependencies: + "@graphql-mesh/types": ^0.102.10 + "@graphql-mesh/utils": ^0.102.10 + "@graphql-tools/utils": ^10.5.5 + graphql: "*" + tslib: ^2.4.0 + languageName: unknown + linkType: soft + "@graphql-mesh/transport-http-callback@npm:^0.5.2, @graphql-mesh/transport-http-callback@workspace:packages/transports/http-callback": version: 0.0.0-use.local resolution: "@graphql-mesh/transport-http-callback@workspace:packages/transports/http-callback" @@ -7610,7 +7291,7 @@ __metadata: languageName: unknown linkType: soft -"@graphql-mesh/transport-http@npm:^0.6.12, @graphql-mesh/transport-http@workspace:packages/transports/http": +"@graphql-mesh/transport-http@npm:^0.6.12, @graphql-mesh/transport-http@npm:^0.6.7, @graphql-mesh/transport-http@workspace:packages/transports/http": version: 0.0.0-use.local resolution: "@graphql-mesh/transport-http@workspace:packages/transports/http" dependencies: @@ -7638,7 +7319,7 @@ __metadata: "@graphql-mesh/transport-common": "npm:^0.7.11" "@graphql-mesh/types": "npm:^0.102.10" "@graphql-mesh/utils": "npm:^0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/utils": "npm:^10.5.5" graphql-fields: "npm:^2.0.3" mysql: "npm:^2.18.1" @@ -7657,7 +7338,7 @@ __metadata: "@graphql-mesh/transport-common": "npm:^0.7.11" "@graphql-mesh/types": "npm:^0.102.10" "@graphql-mesh/utils": "npm:^0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/utils": "npm:^10.5.5" "@neo4j/graphql": "npm:^5.0.0" graphql-scalars: "npm:^1.22.4" @@ -7787,8 +7468,8 @@ __metadata: version: 0.0.0-use.local resolution: "@graphql-mesh/types@workspace:packages/legacy/types" dependencies: - "@graphql-tools/batch-delegate": "npm:^9.0.9" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/batch-delegate": "npm:^9.0.10" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-typed-document-node/core": "npm:^3.2.0" peerDependencies: "@graphql-mesh/store": ^0.102.10 @@ -7820,7 +7501,7 @@ __metadata: dependencies: "@apollo/server": "npm:4.11.2" "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@types/js-yaml": "npm:4.0.9" "@types/lodash.topath": "npm:4.5.9" "@types/object-hash": "npm:3.0.6" @@ -7854,18 +7535,18 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/batch-delegate@npm:^9.0.9": - version: 9.0.9 - resolution: "@graphql-tools/batch-delegate@npm:9.0.9" +"@graphql-tools/batch-delegate@npm:^9.0.10, @graphql-tools/batch-delegate@npm:^9.0.3, @graphql-tools/batch-delegate@npm:^9.0.9": + version: 9.0.10 + resolution: "@graphql-tools/batch-delegate@npm:9.0.10" dependencies: - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/utils": "npm:^10.5.5" dataloader: "npm:2.2.2" tslib: "npm:^2.4.0" value-or-promise: "npm:^1.0.12" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/997291d3c6d34c913daab8ac029e054ebe4884cfbcf262b9a4ea4ad2d07dde4dcf157fab3fd5ea5547b6d848bde92ba939e7def2eee7bef02d62d0451a83bcba + checksum: 10c0/3a14a574671f9d0ff1185f85462d1440cefc9b8f09442be29b6616ff54d2caedd23a66323fc6cad1b63a9261bb752a17b766db3db9ca5b732a508f671e3aadfa languageName: node linkType: hard @@ -7927,26 +7608,9 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/delegate@npm:^10.0.26": - version: 10.0.26 - resolution: "@graphql-tools/delegate@npm:10.0.26" - dependencies: - "@graphql-tools/batch-execute": "npm:^9.0.5" - "@graphql-tools/executor": "npm:^1.3.2" - "@graphql-tools/schema": "npm:^10.0.7" - "@graphql-tools/utils": "npm:^10.5.5" - "@repeaterjs/repeater": "npm:^3.0.6" - dataloader: "npm:^2.2.2" - tslib: "npm:^2.5.0" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/16c6307389248ba16dd41a341b72cf4d8bbbb268a32357b79d26359a79e88af608eb997bce2bc7c305790fed9e70bae0a6ce58cd8518d876bf072b551c2d2c5d - languageName: node - linkType: hard - -"@graphql-tools/delegate@npm:^10.0.27": - version: 10.0.27 - resolution: "@graphql-tools/delegate@npm:10.0.27" +"@graphql-tools/delegate@npm:^10.0.21, @graphql-tools/delegate@npm:^10.0.27, @graphql-tools/delegate@npm:^10.0.28": + version: 10.0.28 + resolution: "@graphql-tools/delegate@npm:10.0.28" dependencies: "@graphql-tools/batch-execute": "npm:^9.0.5" "@graphql-tools/executor": "npm:^1.3.2" @@ -7954,10 +7618,11 @@ __metadata: "@graphql-tools/utils": "npm:^10.5.5" "@repeaterjs/repeater": "npm:^3.0.6" dataloader: "npm:^2.2.2" + dset: "npm:^3.1.2" tslib: "npm:^2.5.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/14a8ceda35eb834ad94a79a82c6e13235df6100934b3602046cc0d148b8d2604ef3124e4157d8d7a905123b0a09fd23b3695bd9fe9a7b30f64076c7b8b0708ca + checksum: 10c0/4447cc8df1a05e80831ddd7a433088a622c14ecfcebee65830fb7903b3590277351f2d255d421e8342c099dbca1fe9ccfbcdb2d7cb12ff7ce521f03c8bb3f4a0 languageName: node linkType: hard @@ -8052,18 +7717,18 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/federation@npm:^2.2.19": - version: 2.2.19 - resolution: "@graphql-tools/federation@npm:2.2.19" +"@graphql-tools/federation@npm:^2.2.10, @graphql-tools/federation@npm:^2.2.19, @graphql-tools/federation@npm:^2.2.21": + version: 2.2.21 + resolution: "@graphql-tools/federation@npm:2.2.21" dependencies: "@apollo/client": "npm:~3.2.5 || ~3.3.0 || ~3.4.0 || ~3.5.0 || ~3.6.0 || ~3.7.0 || ~3.8.0 || ~3.9.0 || ~3.10.0 || ~3.11.0" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/executor-http": "npm:^1.1.7" "@graphql-tools/merge": "npm:^9.0.8" "@graphql-tools/schema": "npm:^10.0.7" - "@graphql-tools/stitch": "npm:^9.2.16" + "@graphql-tools/stitch": "npm:^9.2.17" "@graphql-tools/utils": "npm:^10.5.5" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" "@whatwg-node/fetch": "npm:^0.9.17" tslib: "npm:^2.4.0" value-or-promise: "npm:^1.0.12" @@ -8072,7 +7737,7 @@ __metadata: dependenciesMeta: "@apollo/client": optional: true - checksum: 10c0/15370f84839bcc1c955ea15b853cccb3dd3ee1ae3d87064cc2a6788a8d0747ba66b8bd5b9b4cd07e5c4038e4ed2c153c00c75ad957b06b2f856d2dbd002d1f4b + checksum: 10c0/3eb7343659bcbd7e2d11e57d4ee03a16955856b8d18d62dec2099a9d7b3daa9fa2fadf85c1bd0ead24c0246bd6e9c43648e2d90a2450694f85f90dd12c7dab98 languageName: node linkType: hard @@ -8459,35 +8124,35 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/stitch@npm:^9.2.15, @graphql-tools/stitch@npm:^9.2.16": - version: 9.2.16 - resolution: "@graphql-tools/stitch@npm:9.2.16" +"@graphql-tools/stitch@npm:^9.2.10, @graphql-tools/stitch@npm:^9.2.15, @graphql-tools/stitch@npm:^9.2.17": + version: 9.2.17 + resolution: "@graphql-tools/stitch@npm:9.2.17" dependencies: - "@graphql-tools/batch-delegate": "npm:^9.0.9" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/batch-delegate": "npm:^9.0.10" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/executor": "npm:^1.3.2" "@graphql-tools/merge": "npm:^9.0.8" "@graphql-tools/schema": "npm:^10.0.7" "@graphql-tools/utils": "npm:^10.5.5" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" tslib: "npm:^2.4.0" value-or-promise: "npm:^1.0.11" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/2839d06040b86db19162287e84969f9473d3441b09ea244009236a064df3e47f58c162b8996a3ee1245e58b741e6446e45ff1a6b9f29519066e87fdc284b5897 + checksum: 10c0/7cc6622c6570fd013915507d50cdf5cf72381f099b21e03c5b89fe3ad56b729689533b1748c918c6ed20b24266cba753104c30e59a189d13605ec2a517ef5dc4 languageName: node linkType: hard -"@graphql-tools/stitching-directives@npm:^3.1.8": - version: 3.1.8 - resolution: "@graphql-tools/stitching-directives@npm:3.1.8" +"@graphql-tools/stitching-directives@npm:^3.1.9": + version: 3.1.9 + resolution: "@graphql-tools/stitching-directives@npm:3.1.9" dependencies: - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/utils": "npm:^10.5.5" tslib: "npm:^2.4.0" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/5f22140cc94ebbaf75d9b4060263aa2bb719a1e892bcf8fc855ecc56ebe573f6706ae5c3f9c690113a446b7613073773ca60376bc665cf69e55d5a99324b8578 + checksum: 10c0/fa13506ba5e22dde1186ca5b9eee010560d0950c9b2121959fc9163cd76f7b0aaae9783f7344c011c398aa90b53641ad8c2768d4d1ad9d900c281d4fd9194444 languageName: node linkType: hard @@ -8510,40 +8175,17 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/url-loader@npm:^8.0.0, @graphql-tools/url-loader@npm:^8.0.7, @graphql-tools/url-loader@npm:~8.0.0": - version: 8.0.7 - resolution: "@graphql-tools/url-loader@npm:8.0.7" - dependencies: - "@ardatan/sync-fetch": "npm:^0.0.1" - "@graphql-tools/delegate": "npm:^10.0.26" - "@graphql-tools/executor-graphql-ws": "npm:^1.3.1" - "@graphql-tools/executor-http": "npm:^1.1.7" - "@graphql-tools/executor-legacy-ws": "npm:^1.1.1" - "@graphql-tools/utils": "npm:^10.5.5" - "@graphql-tools/wrap": "npm:^10.0.10" - "@types/ws": "npm:^8.0.0" - "@whatwg-node/fetch": "npm:^0.9.0" - isomorphic-ws: "npm:^5.0.0" - tslib: "npm:^2.4.0" - value-or-promise: "npm:^1.0.11" - ws: "npm:^8.17.1" - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/27e0a10793c9f404ee8593a853a89aa1e897396c98b87e72b9d1047a9d153379a920646951418af573c9f289165dcf29152e02d46a84f47226e149cfbedb88dd - languageName: node - linkType: hard - -"@graphql-tools/url-loader@npm:^8.0.8": - version: 8.0.8 - resolution: "@graphql-tools/url-loader@npm:8.0.8" +"@graphql-tools/url-loader@npm:^8.0.0, @graphql-tools/url-loader@npm:^8.0.7, @graphql-tools/url-loader@npm:^8.0.9, @graphql-tools/url-loader@npm:~8.0.0": + version: 8.0.9 + resolution: "@graphql-tools/url-loader@npm:8.0.9" dependencies: "@ardatan/sync-fetch": "npm:^0.0.1" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/executor-graphql-ws": "npm:^1.3.1" "@graphql-tools/executor-http": "npm:^1.1.7" "@graphql-tools/executor-legacy-ws": "npm:^1.1.1" "@graphql-tools/utils": "npm:^10.5.5" - "@graphql-tools/wrap": "npm:^10.0.11" + "@graphql-tools/wrap": "npm:^10.0.12" "@types/ws": "npm:^8.0.0" "@whatwg-node/fetch": "npm:^0.9.0" isomorphic-ws: "npm:^5.0.0" @@ -8552,7 +8194,7 @@ __metadata: ws: "npm:^8.17.1" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/9214aa0c77bc0bf44811135e5c0a014e06e0d3cd0a4ed89d00789cf006c93dd8d14a3c0a5f61d17c5811d785e9ab87364c903cfc6777ba4ce082430dbd969577 + checksum: 10c0/473a4e64b2ee47350b4dba79caa548e0fb3ba3da02601d5f3aa945c08d289929fcfd8d2a888746ade218dee8b222a4672daa391fc22575f42604cab2c9a72460 languageName: node linkType: hard @@ -8570,7 +8212,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/utils@npm:10.5.5, @graphql-tools/utils@npm:^10.0.0, @graphql-tools/utils@npm:^10.0.3, @graphql-tools/utils@npm:^10.3.2, @graphql-tools/utils@npm:^10.5.1, @graphql-tools/utils@npm:^10.5.4, @graphql-tools/utils@npm:^10.5.5": +"@graphql-tools/utils@npm:10.5.5, @graphql-tools/utils@npm:^10.0.0, @graphql-tools/utils@npm:^10.0.3, @graphql-tools/utils@npm:^10.3.2, @graphql-tools/utils@npm:^10.5.1, @graphql-tools/utils@npm:^10.5.3, @graphql-tools/utils@npm:^10.5.4, @graphql-tools/utils@npm:^10.5.5": version: 10.5.5 resolution: "@graphql-tools/utils@npm:10.5.5" dependencies: @@ -8643,7 +8285,7 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/wrap@npm:10.0.11, @graphql-tools/wrap@npm:^10.0.11": +"@graphql-tools/wrap@npm:10.0.11": version: 10.0.11 resolution: "@graphql-tools/wrap@npm:10.0.11" dependencies: @@ -8674,18 +8316,18 @@ __metadata: languageName: node linkType: hard -"@graphql-tools/wrap@npm:^10.0.10": - version: 10.0.10 - resolution: "@graphql-tools/wrap@npm:10.0.10" +"@graphql-tools/wrap@npm:^10.0.11, @graphql-tools/wrap@npm:^10.0.12, @graphql-tools/wrap@npm:^10.0.5": + version: 10.0.12 + resolution: "@graphql-tools/wrap@npm:10.0.12" dependencies: - "@graphql-tools/delegate": "npm:^10.0.26" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/schema": "npm:^10.0.7" "@graphql-tools/utils": "npm:^10.5.5" tslib: "npm:^2.4.0" value-or-promise: "npm:^1.0.12" peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - checksum: 10c0/e9cbc456589e79e0531bae4657dd34aa322c8523c23f960fd81c48490c9a3fb8416b5e0fdcb56b43ffab51885b915b51699a6a2f195e8c28c2096af1aa3cc27d + checksum: 10c0/6aa36efac6211290a221a828d8abb7243e3624a82ed358a8819b2ac4ac360c2c757b39ea1376f2b8d3c1ad021389d826d3dc9e0540111a729879a848af33d51e languageName: node linkType: hard @@ -8846,7 +8488,7 @@ __metadata: languageName: node linkType: hard -"@grpc/grpc-js@npm:1.12.2, @grpc/grpc-js@npm:^1.1.7, @grpc/grpc-js@npm:^1.2.8, @grpc/grpc-js@npm:^1.7.1, @grpc/grpc-js@npm:^1.8.10": +"@grpc/grpc-js@npm:1.12.2, @grpc/grpc-js@npm:^1.1.7, @grpc/grpc-js@npm:^1.12.2, @grpc/grpc-js@npm:^1.2.8, @grpc/grpc-js@npm:^1.7.1, @grpc/grpc-js@npm:^1.8.10": version: 1.12.2 resolution: "@grpc/grpc-js@npm:1.12.2" dependencies: @@ -10537,6 +10179,27 @@ __metadata: languageName: node linkType: hard +"@omnigraph/grpc@npm:^0.0.0, @omnigraph/grpc@workspace:*, @omnigraph/grpc@workspace:packages/loaders/grpc": + version: 0.0.0-use.local + resolution: "@omnigraph/grpc@workspace:packages/loaders/grpc" + dependencies: + "@ardatan/grpc-reflection-js": "npm:^0.0.2" + "@graphql-mesh/cross-helpers": "npm:^0.4.7" + "@graphql-mesh/string-interpolation": "npm:^0.5.6" + "@graphql-mesh/transport-common": "npm:^0.7.11" + "@graphql-tools/utils": "npm:^10.5.5" + "@grpc/grpc-js": "npm:^1.1.7" + "@whatwg-node/disposablestack": "npm:^0.0.5" + globby: "npm:^11.1.0" + graphql-compose: "npm:^9.0.11" + graphql-scalars: "npm:^1.23.0" + lodash.has: "npm:^4.5.2" + protobufjs: "npm:^7.2.5" + peerDependencies: + graphql: "*" + languageName: unknown + linkType: soft + "@omnigraph/json-schema@npm:0.107.4, @omnigraph/json-schema@npm:^0.107.4, @omnigraph/json-schema@workspace:*, @omnigraph/json-schema@workspace:packages/loaders/json-schema": version: 0.0.0-use.local resolution: "@omnigraph/json-schema@workspace:packages/loaders/json-schema" @@ -10544,7 +10207,7 @@ __metadata: "@graphql-mesh/string-interpolation": "npm:0.5.6" "@graphql-mesh/transport-common": "npm:^0.7.11" "@graphql-mesh/transport-rest": "npm:^0.7.11" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@json-schema-tools/meta-schema": "npm:1.7.5" "@types/qs": "npm:6.9.16" "@types/to-json-schema": "npm:0.2.4" @@ -10579,7 +10242,7 @@ __metadata: "@graphql-mesh/string-interpolation": "npm:^0.5.6" "@graphql-mesh/transport-mysql": "npm:^0.7.11" "@graphql-mesh/utils": "npm:^0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/utils": "npm:^10.5.5" "@types/graphql-fields": "npm:1.3.9" "@types/mysql": "npm:2.15.26" @@ -10599,7 +10262,7 @@ __metadata: resolution: "@omnigraph/neo4j@workspace:packages/loaders/neo4j" dependencies: "@graphql-mesh/transport-neo4j": "npm:^0.7.11" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/schema": "npm:^10.0.5" "@neo4j/introspector": "npm:^3.0.0" neo4j-driver: "npm:^5.9.2" @@ -10615,7 +10278,7 @@ __metadata: resolution: "@omnigraph/odata@workspace:packages/loaders/odata" dependencies: "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@types/http-string-parser": "npm:0.0.33" "@types/url-join": "npm:4.0.3" "@whatwg-node/fetch": "npm:^0.9.0" @@ -10643,7 +10306,7 @@ __metadata: resolution: "@omnigraph/openapi@workspace:packages/loaders/openapi" dependencies: "@graphql-mesh/string-interpolation": "npm:^0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@graphql-tools/utils": "npm:10.5.5" "@omnigraph/json-schema": "npm:^0.107.4" "@whatwg-node/fetch": "npm:0.9.22" @@ -10668,7 +10331,7 @@ __metadata: dependencies: "@ardatan/raml-1-parser": "npm:1.1.69" "@graphql-mesh/string-interpolation": "npm:0.5.6" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" "@omnigraph/json-schema": "npm:0.107.4" "@whatwg-node/fetch": "npm:^0.9.0" change-case: "npm:4.1.2" @@ -10710,7 +10373,7 @@ __metadata: dependencies: "@graphql-mesh/cross-helpers": "npm:^0.4.7" "@graphql-mesh/types": "npm:^0.102.10" - "@graphql-tools/delegate": "npm:^10.0.27" + "@graphql-tools/delegate": "npm:^10.0.28" tuql: "npm:^1.7.0" peerDependencies: graphql: "*" @@ -10831,16 +10494,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/context-async-hooks@npm:1.26.0, @opentelemetry/context-async-hooks@npm:^1.25.1": - version: 1.26.0 - resolution: "@opentelemetry/context-async-hooks@npm:1.26.0" - peerDependencies: - "@opentelemetry/api": ">=1.0.0 <1.10.0" - checksum: 10c0/76ed53be50a472cbfe26a62620cb2a34f031474d08d302d31eb95d71cac2ed1567c6fa302c7ac5498e9d467d7d8e64f8d0e58c5c8b7bd987a352baafe5d9b213 - languageName: node - linkType: hard - -"@opentelemetry/context-async-hooks@npm:1.27.0": +"@opentelemetry/context-async-hooks@npm:1.27.0, @opentelemetry/context-async-hooks@npm:^1.25.1": version: 1.27.0 resolution: "@opentelemetry/context-async-hooks@npm:1.27.0" peerDependencies: @@ -10860,7 +10514,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/core@npm:1.26.0, @opentelemetry/core@npm:^1.0.0, @opentelemetry/core@npm:^1.1.0, @opentelemetry/core@npm:^1.25.0, @opentelemetry/core@npm:^1.25.1, @opentelemetry/core@npm:^1.26.0, @opentelemetry/core@npm:^1.8.0": +"@opentelemetry/core@npm:1.26.0": version: 1.26.0 resolution: "@opentelemetry/core@npm:1.26.0" dependencies: @@ -10871,7 +10525,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/core@npm:1.27.0": +"@opentelemetry/core@npm:1.27.0, @opentelemetry/core@npm:^1.0.0, @opentelemetry/core@npm:^1.1.0, @opentelemetry/core@npm:^1.25.0, @opentelemetry/core@npm:^1.25.1, @opentelemetry/core@npm:^1.26.0, @opentelemetry/core@npm:^1.8.0": version: 1.27.0 resolution: "@opentelemetry/core@npm:1.27.0" dependencies: @@ -11035,7 +10689,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/exporter-zipkin@npm:1.27.0": +"@opentelemetry/exporter-zipkin@npm:1.27.0, @opentelemetry/exporter-zipkin@npm:^1.25.1": version: 1.27.0 resolution: "@opentelemetry/exporter-zipkin@npm:1.27.0" dependencies: @@ -11049,20 +10703,6 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/exporter-zipkin@npm:^1.25.1": - version: 1.26.0 - resolution: "@opentelemetry/exporter-zipkin@npm:1.26.0" - dependencies: - "@opentelemetry/core": "npm:1.26.0" - "@opentelemetry/resources": "npm:1.26.0" - "@opentelemetry/sdk-trace-base": "npm:1.26.0" - "@opentelemetry/semantic-conventions": "npm:1.27.0" - peerDependencies: - "@opentelemetry/api": ^1.0.0 - checksum: 10c0/062cedd03fd2cc4c98468143ab19ae87697b3195f7b33419f71a23428bc910ca5e2783882ca42a38aa0c05d8d321403c18c6cc1dbb12d8b37ae1549b0b3cf5e6 - languageName: node - linkType: hard - "@opentelemetry/instrumentation-amqplib@npm:^0.43.0": version: 0.43.0 resolution: "@opentelemetry/instrumentation-amqplib@npm:0.43.0" @@ -11704,17 +11344,6 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/propagator-b3@npm:1.26.0": - version: 1.26.0 - resolution: "@opentelemetry/propagator-b3@npm:1.26.0" - dependencies: - "@opentelemetry/core": "npm:1.26.0" - peerDependencies: - "@opentelemetry/api": ">=1.0.0 <1.10.0" - checksum: 10c0/7b1e42872929b167a2d4155732d9253adfec65a307dbb05509b88ade2d7f68a8759714141a17c8e646199ad80a60529c02a45098a1fcce27f0cf0c69d90932d3 - languageName: node - linkType: hard - "@opentelemetry/propagator-b3@npm:1.27.0": version: 1.27.0 resolution: "@opentelemetry/propagator-b3@npm:1.27.0" @@ -11737,17 +11366,6 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/propagator-jaeger@npm:1.26.0": - version: 1.26.0 - resolution: "@opentelemetry/propagator-jaeger@npm:1.26.0" - dependencies: - "@opentelemetry/core": "npm:1.26.0" - peerDependencies: - "@opentelemetry/api": ">=1.0.0 <1.10.0" - checksum: 10c0/167a250f0c10223897f24335025af848b8fe0e5c550eafb5e9a011f301243faf3633ad74caebc6b38dfaac4ed4b138b1bf8149a33eadc2816c3d405d955fbc25 - languageName: node - linkType: hard - "@opentelemetry/propagator-jaeger@npm:1.27.0": version: 1.27.0 resolution: "@opentelemetry/propagator-jaeger@npm:1.27.0" @@ -11957,20 +11575,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/sdk-trace-base@npm:1.26.0, @opentelemetry/sdk-trace-base@npm:^1.25.1": - version: 1.26.0 - resolution: "@opentelemetry/sdk-trace-base@npm:1.26.0" - dependencies: - "@opentelemetry/core": "npm:1.26.0" - "@opentelemetry/resources": "npm:1.26.0" - "@opentelemetry/semantic-conventions": "npm:1.27.0" - peerDependencies: - "@opentelemetry/api": ">=1.0.0 <1.10.0" - checksum: 10c0/0d5fc19179375f1599edae91b7232f432faf8631746835a10d0cd0c4907d0ca3ed156cc8087d4e78efdfbd9ba5ba414cc9e1399172c2aa68d7e0cd5190394d87 - languageName: node - linkType: hard - -"@opentelemetry/sdk-trace-base@npm:1.27.0": +"@opentelemetry/sdk-trace-base@npm:1.27.0, @opentelemetry/sdk-trace-base@npm:^1.25.1": version: 1.27.0 resolution: "@opentelemetry/sdk-trace-base@npm:1.27.0" dependencies: @@ -11999,7 +11604,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/sdk-trace-node@npm:1.27.0": +"@opentelemetry/sdk-trace-node@npm:1.27.0, @opentelemetry/sdk-trace-node@npm:^1.25.1": version: 1.27.0 resolution: "@opentelemetry/sdk-trace-node@npm:1.27.0" dependencies: @@ -12015,22 +11620,6 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/sdk-trace-node@npm:^1.25.1": - version: 1.26.0 - resolution: "@opentelemetry/sdk-trace-node@npm:1.26.0" - dependencies: - "@opentelemetry/context-async-hooks": "npm:1.26.0" - "@opentelemetry/core": "npm:1.26.0" - "@opentelemetry/propagator-b3": "npm:1.26.0" - "@opentelemetry/propagator-jaeger": "npm:1.26.0" - "@opentelemetry/sdk-trace-base": "npm:1.26.0" - semver: "npm:^7.5.2" - peerDependencies: - "@opentelemetry/api": ">=1.0.0 <1.10.0" - checksum: 10c0/6924c565b4d187810c48a7b92215f8f986a8831bc24620856aaaeb057bf19dd8916f070a77cc45aa76182f6b70b534749274ba168d27941f0ed752d171ca3b51 - languageName: node - linkType: hard - "@opentelemetry/semantic-conventions@npm:1.25.1": version: 1.25.1 resolution: "@opentelemetry/semantic-conventions@npm:1.25.1" @@ -12816,7 +12405,7 @@ __metadata: languageName: node linkType: hard -"@sinclair/typebox@npm:0.33.17": +"@sinclair/typebox@npm:0.33.17, @sinclair/typebox@npm:^0.33.0": version: 0.33.17 resolution: "@sinclair/typebox@npm:0.33.17" checksum: 10c0/7808ee635fed449eebdfb7e86cf1e84aeff6b27232923277b6a6a0e57f3d38b8ac3dbc3d30bcd60a2e93c5fadc3aad20d387e3a85670a0f893eebed0ef5ca6a6 @@ -12837,13 +12426,6 @@ __metadata: languageName: node linkType: hard -"@sinclair/typebox@npm:^0.33.0": - version: 0.33.16 - resolution: "@sinclair/typebox@npm:0.33.16" - checksum: 10c0/b586c775ed43ce3b8e2e5acbacdfdcfaa884662e1a4504ac0187d69b6fefd2046d2ef6503ebdb09f3c6124ef398561e072bf856847dd95bb98c59e581a0f2443 - languageName: node - linkType: hard - "@sindresorhus/is@npm:^4.0.0": version: 4.6.0 resolution: "@sindresorhus/is@npm:4.6.0" @@ -14342,15 +13924,6 @@ __metadata: languageName: node linkType: hard -"@types/lodash.has@npm:4.5.9": - version: 4.5.9 - resolution: "@types/lodash.has@npm:4.5.9" - dependencies: - "@types/lodash": "npm:*" - checksum: 10c0/6466d9b4c1d4cf87010209923662091e771efb84973af8d10b40702b824d2ac6f6836b4111b5cf437a298c21333ed23bfe45a60713abed559aabf46e31d1ce2e - languageName: node - linkType: hard - "@types/lodash.kebabcase@npm:^4.1.9": version: 4.1.9 resolution: "@types/lodash.kebabcase@npm:4.1.9" @@ -14534,7 +14107,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:22.8.4, @types/node@npm:>=13.7.0, @types/node@npm:^22.0.0, @types/node@npm:^22.5.5": +"@types/node@npm:*, @types/node@npm:22.8.4, @types/node@npm:>=13.7.0, @types/node@npm:^22.0.0, @types/node@npm:^22.5.5, @types/node@npm:^22.7.5": version: 22.8.4 resolution: "@types/node@npm:22.8.4" dependencies: @@ -14972,7 +14545,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.12.2": +"@typescript-eslint/eslint-plugin@npm:8.12.2, @typescript-eslint/eslint-plugin@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0": version: 8.12.2 resolution: "@typescript-eslint/eslint-plugin@npm:8.12.2" dependencies: @@ -14995,29 +14568,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0": - version: 8.10.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.10.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.10.0" - "@typescript-eslint/type-utils": "npm:8.10.0" - "@typescript-eslint/utils": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^1.3.0" - peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/4b77ba9c865a2a14e238cd330b5901f0274b8ce1c13324fccd0339b8eea82a50a4709394c903fd8cd5bd0d3aebace0761ff9a4a19fa20b00bb61349b7671c035 - languageName: node - linkType: hard - "@typescript-eslint/eslint-plugin@npm:^5.5.0": version: 5.62.0 resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" @@ -15053,7 +14603,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.12.2": +"@typescript-eslint/parser@npm:8.12.2, @typescript-eslint/parser@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0": version: 8.12.2 resolution: "@typescript-eslint/parser@npm:8.12.2" dependencies: @@ -15071,24 +14621,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0": - version: 8.10.0 - resolution: "@typescript-eslint/parser@npm:8.10.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.10.0" - "@typescript-eslint/types": "npm:8.10.0" - "@typescript-eslint/typescript-estree": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/7becb2457c085c239838d301796074b790f46dd38c9fbc14ec1dec8e993c7115cd8a66cdc07983c3a68a2dd92e24e8acc49d69a4ebcc29e9869957eb52d1cb74 - languageName: node - linkType: hard - "@typescript-eslint/parser@npm:^5.5.0": version: 5.62.0 resolution: "@typescript-eslint/parser@npm:5.62.0" @@ -15116,16 +14648,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/scope-manager@npm:8.10.0" - dependencies: - "@typescript-eslint/types": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" - checksum: 10c0/b8bb8635c4d6c00a3578d6265e3ee0f5d96d0c9dee534ed588aa411c3f4497fd71cce730c3ae7571e52453d955b191bc9edcc47c9af21a20c90e9a20f2371108 - languageName: node - linkType: hard - "@typescript-eslint/scope-manager@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/scope-manager@npm:8.12.2" @@ -15153,21 +14675,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/type-utils@npm:8.10.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:8.10.0" - "@typescript-eslint/utils": "npm:8.10.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/1af8fce8394279e6ac7bcef449a132072ee36e374c8d557564246ffe7150230844901ca0305e29525bf37c87010e03bf8bedec76fccbfe1e41931cb4f274e208 - languageName: node - linkType: hard - "@typescript-eslint/type-utils@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/type-utils@npm:8.12.2" @@ -15190,13 +14697,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/types@npm:8.10.0" - checksum: 10c0/f27dd43c8383e02e914a254257627e393dfc0f08b0f74a253c106813ae361f090271b2f3f2ef588fa3ca1329897d873da595bb5641fe8e3091b25eddca24b5d2 - languageName: node - linkType: hard - "@typescript-eslint/types@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/types@npm:8.12.2" @@ -15222,25 +14722,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.10.0" - dependencies: - "@typescript-eslint/types": "npm:8.10.0" - "@typescript-eslint/visitor-keys": "npm:8.10.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/535a740fe25be0e28fe68c41e3264273d1e5169c9f938e08cc0e3415c357726f43efa44621960108c318fc3305c425d29f3223b6e731d44d67f84058a8947304 - languageName: node - linkType: hard - "@typescript-eslint/typescript-estree@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/typescript-estree@npm:8.12.2" @@ -15278,20 +14759,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/utils@npm:8.10.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.10.0" - "@typescript-eslint/types": "npm:8.10.0" - "@typescript-eslint/typescript-estree": "npm:8.10.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/a21a2933517176abd00fcd5d8d80023e35dc3d89d5746bbac43790b4e984ab1f371117db08048bce7f42d54c64f4e0e35161149f8f34fd25a27bff9d1110fd16 - languageName: node - linkType: hard - "@typescript-eslint/utils@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/utils@npm:8.12.2" @@ -15316,16 +14783,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.10.0": - version: 8.10.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.10.0" - dependencies: - "@typescript-eslint/types": "npm:8.10.0" - eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/14721c4ac939640d5fd1ee1b6eeb07604b11a6017e319e21dcc71e7aac2992341fc7ae1992d977bad4433b6a1d0d1c0c279e6927316b26245f6e333f922fa458 - languageName: node - linkType: hard - "@typescript-eslint/visitor-keys@npm:8.12.2": version: 8.12.2 resolution: "@typescript-eslint/visitor-keys@npm:8.12.2" @@ -16286,15 +15743,6 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:~5.1.3": - version: 5.1.3 - resolution: "aria-query@npm:5.1.3" - dependencies: - deep-equal: "npm:^2.0.5" - checksum: 10c0/edcbc8044c4663d6f88f785e983e6784f98cb62b4ba1e9dd8d61b725d0203e4cfca38d676aee984c31f354103461102a3d583aa4fbe4fd0a89b679744f4e5faf - languageName: node - linkType: hard - "array-back@npm:^3.0.1, array-back@npm:^3.1.0": version: 3.1.0 resolution: "array-back@npm:3.1.0" @@ -20585,7 +20033,7 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.19, es-iterator-helpers@npm:^1.1.0": +"es-iterator-helpers@npm:^1.1.0": version: 1.1.0 resolution: "es-iterator-helpers@npm:1.1.0" dependencies: @@ -21003,7 +20451,7 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.12.0": +"eslint-module-utils@npm:^2.12.0, eslint-module-utils@npm:^2.8.1": version: 2.12.0 resolution: "eslint-module-utils@npm:2.12.0" dependencies: @@ -21015,18 +20463,6 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.8.1": - version: 2.11.0 - resolution: "eslint-module-utils@npm:2.11.0" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/c1b02e83429878ab22596f17a5ac138e51a520e96a5ef89a5a6698769a2d174ab28302d45eb563c0fc418d21a5842e328c37a6e8f294bf2e64e675ba55203dd7 - languageName: node - linkType: hard - "eslint-plugin-es-x@npm:^7.5.0": version: 7.8.0 resolution: "eslint-plugin-es-x@npm:7.8.0" @@ -21100,7 +20536,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:^6.10.0": +"eslint-plugin-jsx-a11y@npm:^6.10.0, eslint-plugin-jsx-a11y@npm:^6.5.1": version: 6.10.2 resolution: "eslint-plugin-jsx-a11y@npm:6.10.2" dependencies: @@ -21125,32 +20561,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:^6.5.1": - version: 6.10.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.10.0" - dependencies: - aria-query: "npm:~5.1.3" - array-includes: "npm:^3.1.8" - array.prototype.flatmap: "npm:^1.3.2" - ast-types-flow: "npm:^0.0.8" - axe-core: "npm:^4.10.0" - axobject-query: "npm:^4.1.0" - damerau-levenshtein: "npm:^1.0.8" - emoji-regex: "npm:^9.2.2" - es-iterator-helpers: "npm:^1.0.19" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^3.3.5" - language-tags: "npm:^1.0.9" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - safe-regex-test: "npm:^1.0.3" - string.prototype.includes: "npm:^2.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - checksum: 10c0/9f8e29a3317fb6a82e2ecd333fe0fab3a69fff786d087eb65dc723d6e954473ab681d14a252d7cb2971f5e7f68816cb6f7731766558e1833a77bd73af1b5ab34 - languageName: node - linkType: hard - "eslint-plugin-n@npm:17.11.1": version: 17.11.1 resolution: "eslint-plugin-n@npm:17.11.1" @@ -21196,35 +20606,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:^7.27.1": - version: 7.37.1 - resolution: "eslint-plugin-react@npm:7.37.1" - dependencies: - array-includes: "npm:^3.1.8" - array.prototype.findlast: "npm:^1.2.5" - array.prototype.flatmap: "npm:^1.3.2" - array.prototype.tosorted: "npm:^1.1.4" - doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.0.19" - estraverse: "npm:^5.3.0" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" - minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.8" - object.fromentries: "npm:^2.0.8" - object.values: "npm:^1.2.0" - prop-types: "npm:^15.8.1" - resolve: "npm:^2.0.0-next.5" - semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.11" - string.prototype.repeat: "npm:^1.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - checksum: 10c0/13cf55666f16d2ca45b14aad1b0e14741d1817679c86d20aff0bc1e802439a8541f40a42c4c8e3486ffb710f1bcc2f3e56697f2b5f724306a7fca174e1ad6433 - languageName: node - linkType: hard - -"eslint-plugin-react@npm:^7.35.0": +"eslint-plugin-react@npm:^7.27.1, eslint-plugin-react@npm:^7.35.0": version: 7.37.2 resolution: "eslint-plugin-react@npm:7.37.2" dependencies: @@ -21703,8 +21085,8 @@ __metadata: "@graphql-codegen/cli": "npm:5.0.3" "@graphql-codegen/typescript": "npm:4.1.1" "@graphql-codegen/typescript-resolvers": "npm:4.4.0" + "@graphql-hive/gateway": "npm:1.4.0" "@graphql-mesh/compose-cli": "npm:1.1.4" - "@graphql-mesh/serve-cli": "npm:1.4.0" "@graphql-yoga/plugin-apollo-inline-trace": "npm:3.7.0" "@types/node": "npm:22.8.4" concurrently: "npm:9.0.1" @@ -27784,7 +27166,7 @@ __metadata: languageName: node linkType: hard -"long@npm:4.0.0, long@npm:^4.0.0": +"long@npm:^4.0.0": version: 4.0.0 resolution: "long@npm:4.0.0" checksum: 10c0/50a6417d15b06104dbe4e3d4a667c39b137f130a9108ea8752b352a4cfae047531a3ac351c181792f3f8768fe17cca6b0f406674a541a86fb638aaac560d83ed @@ -35891,7 +35273,7 @@ __metadata: languageName: node linkType: hard -"string.prototype.includes@npm:^2.0.0, string.prototype.includes@npm:^2.0.1": +"string.prototype.includes@npm:^2.0.1": version: 2.0.1 resolution: "string.prototype.includes@npm:2.0.1" dependencies: @@ -36444,7 +35826,7 @@ __metadata: languageName: node linkType: hard -"tailwindcss@npm:3.4.14": +"tailwindcss@npm:3.4.14, tailwindcss@npm:^3.0.2, tailwindcss@npm:^3.4.3": version: 3.4.14 resolution: "tailwindcss@npm:3.4.14" dependencies: @@ -36477,39 +35859,6 @@ __metadata: languageName: node linkType: hard -"tailwindcss@npm:^3.0.2, tailwindcss@npm:^3.4.3": - version: 3.4.12 - resolution: "tailwindcss@npm:3.4.12" - dependencies: - "@alloc/quick-lru": "npm:^5.2.0" - arg: "npm:^5.0.2" - chokidar: "npm:^3.5.3" - didyoumean: "npm:^1.2.2" - dlv: "npm:^1.1.3" - fast-glob: "npm:^3.3.0" - glob-parent: "npm:^6.0.2" - is-glob: "npm:^4.0.3" - jiti: "npm:^1.21.0" - lilconfig: "npm:^2.1.0" - micromatch: "npm:^4.0.5" - normalize-path: "npm:^3.0.0" - object-hash: "npm:^3.0.0" - picocolors: "npm:^1.0.0" - postcss: "npm:^8.4.23" - postcss-import: "npm:^15.1.0" - postcss-js: "npm:^4.0.1" - postcss-load-config: "npm:^4.0.1" - postcss-nested: "npm:^6.0.1" - postcss-selector-parser: "npm:^6.0.11" - resolve: "npm:^1.22.2" - sucrase: "npm:^3.32.0" - bin: - tailwind: lib/cli.js - tailwindcss: lib/cli.js - checksum: 10c0/9ed1449d3b98ce54c6c3a6c3354121a14b39d8dba28815ea1b0fc5a0b32422a744545ba357690468912a1a781593bc7da3d4e56367abed284a300ae1fb0ab42b - languageName: node - linkType: hard - "tapable@npm:^1.0.0": version: 1.1.3 resolution: "tapable@npm:1.1.3" @@ -36871,13 +36220,6 @@ __metadata: languageName: node linkType: hard -"to-fast-properties@npm:^2.0.0": - version: 2.0.0 - resolution: "to-fast-properties@npm:2.0.0" - checksum: 10c0/b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7 - languageName: node - linkType: hard - "to-json-schema@npm:0.2.5": version: 0.2.5 resolution: "to-json-schema@npm:0.2.5"