diff --git a/.ghjk/lock.json b/.ghjk/lock.json index c6b1cecdc6..f038249500 100644 --- a/.ghjk/lock.json +++ b/.ghjk/lock.json @@ -2191,7 +2191,7 @@ ] } }, - "defaultEnv": "ci", + "defaultEnv": "dev", "envsNamed": { "main": "bciqiaaqxx3azvrkvlj2eknjj6awsczu4gdcohccrvjpwk3vmkrnyfpi", "_wasm": "bciqdpiup27tflfkq26oirbutkz53wrp34entiq423upf47za7zoq4za", diff --git a/CHANGELOG.md b/CHANGELOG.md index 52bddbbd2b..3effa087fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3844,6 +3844,3 @@ Make sure to sync `typegate/src/types.ts` when an update is made on the typegraph schema. - - - diff --git a/deno.lock b/deno.lock index 8bb148a79c..5f5c0b2d41 100644 --- a/deno.lock +++ b/deno.lock @@ -2084,6 +2084,122 @@ "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/unarchive.ts": "f6d0e9e75f470eeef5aecd0089169f4350fc30ebfdc05466bb7b30042294d6d3", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/url.ts": "e1ada6fd30fc796b8918c88456ea1b5bbd87a07d0a0538b092b91fd2bb9b7623", "https://raw.githubusercontent.com/metatypedev/ghjk/v0.2.1/utils/worker.ts": "ac4caf72a36d2e4af4f4e92f2e0a95f9fc2324b568640f24c7c2ff6dc0c11d62", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/engine/bindings.ts": "4529b86703a1512302164bca346c29df2a246d0ebbf20248cc39ee9745490dc1", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config.ts": "63ea402f9a993888a9e3ec88d35112186f8f13bcd3a5fe358e69e0bb603311a5", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config/loader.ts": "91cc2b67cc9bee413b0b44f9aa2ea7814f50e2465e6bc114eece248554d7477d", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config/shared.ts": "252b42038eb68059b2cac85c792e36f5849b8e7392b98452341ccc3ee680a774", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/config/types.ts": "73357168542ef041da67997acdd98097444d92f0a1663be03ad1523fd20f768c", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/crypto.ts": "f550775b9e5bf9e7ec286a1596246a631b117fd91e093169bcad4898fb729634", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/computation_engine.ts": "07a3826fcf0bb13eb3912b8e5cbf69932848cd28c1c4ebda7042f977510d00a5", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/args.ts": "de16ba5c087afae319f65d02ab39779146da37ea925f610da8887cffe7828060", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/dependency_resolver.ts": "b851f4a6e2d500f9427dd1a59920d6c71f10904b31863bb1fac4d26e01d02b67", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/injection_utils.ts": "6f9ad0f8f9cde9a985b6ad36bf58418637a85f50749abe6870c792ade7dc45a2", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/mod.ts": "9a4429e7a579903f4f67ab53bd602b2d05a58138bdbd91c7cc5b1b44cf714b68", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/parameter_transformer.ts": "3ba3b9603c6d28c0d54648f8177bce30b8b667e0e1be903d468af3f2645649ff", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/planner/policies.ts": "caf3cfd8a46e21a5d09fdb46882d6ea4ffb376c56070bdb1ccff92fa70989d63", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/query_engine.ts": "dbbbe1f233f67fae4e0574ab8ceafe3f4a03f3c62fa0a9f7cc8d02c44fe79bc5", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/stage_id.ts": "b3b3c62215ff421103788079b77943af8f0026a56eafaa929415cb39ccde3cca", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/code_generator.ts": "edb77e2b98da2f040d3f7567d204dba2a3d8c66ae1a7c2709c049e464763f0cd", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/common.ts": "b585975e1a978dfa966df1a549261049ab159077bc90203a33bfe8ae055b3c6f", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/common.ts": "112f56c8e590215b0af0c1b46dc84b85cb5b9b43621a52646876c35a43103499", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/constraints.ts": "3237d0acce31aca8b2f2bbc0cae8a82d86f3671fcc7fabc3158037c4f79008f5", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/list.ts": "bd70fef3bc3840cfb6255a518de5fdb3db79a68a4481594475aebcbdd6a10102", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/number.ts": "9890c8af998dca2e573fc2ad02e63d9abc9b506b4a0c451d31f5916a8888e401", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/object.ts": "bd4f8891ee823bf82481df2ee181256514fd7299b5fe4fd7cd7194defa228f57", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/inline_validators/string.ts": "914a2b809a344075279578cb35ac3d03cb6025eb9f62c1f9f86958191b9857da", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/input.ts": "e34fec32501c9e4d9b427b097fd6565f54065562e101732e62b4c2799e60288c", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/matching_variant.ts": "aca8db649194921a01aca42b02113d0735262bb63d41ec44174e61c4cfa85369", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/engine/typecheck/result.ts": "6544f206b67c32015950ec96134415c261a60f54c469c1cd73f8accadf87fff6", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/errors.ts": "29dfbfdc8b7a85ee9551831d6db882e50a4e0104102b5885b2bd9a42878365f6", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/libs/jsonpath.ts": "f6851288fb8600dec0e62d5f804f41332b6197b255b6497360ba7e4b7f375cba", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/log.ts": "1330c01d489956c7530e2f2e2e60967f30c6b3a0c5c1d6c18d161ea2cf44fa0e", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/main.ts": "f390cfd2b5b836f1a54fa9ea7d8a5f5ba80430b6e849032145c0a7c0ae7216f3", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/Runtime.ts": "30ec531890bc626953fe16e0a6882c61b05c9cdab8858727662fbf29998df274", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno.ts": "c893dcf170b38547239d550080a856aca46a788de9922f282bbacf9b5841b5fe", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/deno.ts": "9964279b30ab39827cb1691484adb84a04d764ba2746122af0dfcba13caa39e3", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/deno_messenger.ts": "81160c8a9c9817b46b52c4eee15cde880fb3f6b013c3b5110ee07a4c9c7f7a5e", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/shared_types.ts": "34d56aa89c5a34e943a34b623b20d13ca54ab5466ea5313e0543da68b7aebcb1", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/deno/worker.ts": "2397af9b517b332ef5df2ffea7d537170084b0c6e3155f62a045ad5c0d557a3b", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/graphql.ts": "5f0f4125367fd5fc43ccb2b8c9e8ba1f9c84348595e70e5ed9870e776d2efed3", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/grpc.ts": "92b2f5214ebe0f7b61e582faa67d6759641feaf788166a939ec6db8d819708da", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/http.ts": "f598a33aa3cafcf37a1f33d84c06bfd0ef5fd768f72837042c83ac6ae1d90762", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/kv.ts": "ea5365bf5cb3a2c1a7a82482d4b5c1f9fb5e84ed331edce4187464a4ca4e5801", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/mod.ts": "26c06f1bff03255c20df97e1a109944b6fd2872acbb27aa97ab38b081fb19d7e", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/patterns/messenger/async_messenger.ts": "40644e011e3a258138ff1fb7a5323754a547016da9c1deb2114cfc471ee28bf0", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/patterns/messenger/lazy_async_messenger.ts": "b93d5e7252231d27d6b76ec4172d67cc23880b78411fb371d0cba2db712e2161", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma.ts": "e4b679c3b5e28a323d72bde5ebbcc113abe0efc8da82d70b3b2e390149c57d84", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/hooks/generate_schema.ts": "f55ffcb6fdfdfcb29eb5543ac23f89e224fc7e233f4ec598f7c5f44f05eefed2", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/hooks/mod.ts": "3e33752e3676b538c7016f3ddd4f1f49d75e217c410bcaa6319d33ed987d3c60", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/hooks/run_migrations.ts": "aa21425f2383068d08accf99e40ca31046a3f8cec30bf5302a345fbf7fda019f", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/migration.ts": "f501540557b13a32f7b57e5a87f4ae1794cdd95214a49b34a429d7a33a96d5d8", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/mod.ts": "a0e44e86a45aad8b2bb0357ddbe8ba02802e6979451553940ec3688be571127f", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/prisma.ts": "9ec0f38674728229d053aff19b4f411852390c08c2886c0944d49c8d13ebfa2f", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/prisma/types.ts": "b4912f164aa8cdb1db3a98238a0271882864ff2778c10920dd7f0f3d59165dd6", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/python.ts": "4a067d196fbcce2978207de7dc61c734dcdc77f0100739080ae341af3c352adf", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/random.ts": "e7651e262ef5857e777ad46877c66f9098a2dfe774c13720a4cd38be327b53ff", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/s3.ts": "d7a0372faf555180bd4326550c1c6a07b156d3c5f0bbbcf9c0f6eb4b0f2bfff1", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial.ts": "175644d75911d09919c06577bfa86239b3a44b1217664035551ff0989e22882a", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial/agent.ts": "223288cb3d7baa02fa2d4e37207da7fa69cf4f16eb04ed7810d3e91ac725615b", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial/types.ts": "8255ea84c5129ffc049d6fa88ad57eadf298d420ff11782c43eae9d2031efed1", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/substantial/workflow_worker_manager.ts": "589611456b82df0637db5f63af0881a459747d7c8963684bdcde291af13515cd", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/temporal.ts": "ff8a21af119e67e30c4cb31f7ac677555ac3945fa6f94431c4535009bf9a4c9c", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/typegate.ts": "52d49471d2682c1be323b53e4cca9866f2babb93708a855daa8c471ba4174b64", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/typegraph.ts": "e5808e5a20080fc260e54113e5941e5dffaeead5e3b7448dc17a48031d4799cf", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/utils/graphql_forward_vars.ts": "f0bb091aadd191eb1491dd86b7abd311ab60e09f532d226c8328b2cfa6025d9e", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/utils/graphql_inline_vars.ts": "9c3c339ee596c93cf65cda696d756c9ef08d34b78e4136472e27a92f2254ec8a", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/utils/http.ts": "842af99040fd0e3456690f7674311da3a0b9ea64c608d7bc588df1ab28f163a3", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/wasm_reflected.ts": "99d59cdd0c4b228c42ac90099036ecf5d2e14d6758916b27e4017d53b69cf481", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/wasm_wire.ts": "d10c891f12c9521bcd1a7e1cb459f642a5f4e0936f25f4e04174141691ba06d1", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/runtimes/wit_wire/mod.ts": "ab031dcd7ad66861fe30c3bf6da8b545a7ef4a26a9610da849f73cd8a1e58fae", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/artifact_service.ts": "282a9a6c3d89afc8955aabab6b3b242edccba664f5f41558e9c9b07d43dd8d13", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/cookies.ts": "ee17535cb19eab884732cefcdc46e63a2905041d5b5942e9ad6783c50a1f8624", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/mod.ts": "5b15823ec19cec1c985a77d525ee2e9e5c5aa367f5e24c96e305e485b6c633a9", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/basic.ts": "3c233ae1ccd0d3a8ff47a32c74682921abaf84e0de7c096f220f63b05756fc58", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/internal.ts": "7a9173406fbc1b885e08dd74a8dd34f168de2f1e9bedef4cdd88dad613e59166", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/jwt.ts": "e39249df7c2d088da07af1ccf5e97815addb46a994469efd4a335f6ae8618bc5", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/oauth2.ts": "7172cc6da5ecba71775bbc2d467d52d1f78505204e55452170f35004923b847b", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/protocols/protocol.ts": "158c55618be6165a9ee393ccd1a9da267b084ff04df7e627af1e4fc8fe636644", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/routes/mod.ts": "8fe85c16feb3da7086d3d6fd19a4579585b632893f3534c533c60aed84b9413a", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/routes/take.ts": "bc343c5d34870aeeaf9b0cc9473ba18fe7b324a23a630a57c9fd41eea4418a46", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/auth/routes/validate.ts": "56e52bb6d1660735683bdd398a86936f24ad8a00e402b7d88790867ad559e476", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/graphql_service.ts": "458e3cedcd22a44e166e531bcac4c65972916d81f3776c8161b2440ad212626f", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/info_service.ts": "a9a1f6ebdcbe64d55806597b879dd5714c32b8b861bed695a944f5e2f1213beb", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/middlewares.ts": "8af6277ce67c940564538f4def8e6567b5783b51f7c5f38c902736d620ffe405", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/playground_service.ts": "2cc8689899be7c31ad6c2e9c2c5adde0c6cc1f1442b27a55e8ead830e867dbe5", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/responses.ts": "5c45923c1374aab1ac8dd5b1a09ae69062ab34a448f8e92630678a236e38b2ba", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/services/rest_service.ts": "ae6ffdbddaccdbc7ed11dfb86511f2917332dcf5ae22ed814e1059e640ff7b08", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/sync/replicated_map.ts": "6b94fb884ce81d7e17572ae0abbeb91ceadb31f9356c4e9255982a00edcfe729", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/sync/typegraph.ts": "78120bc4d35e728ed86a98781c5d60996050fa8b35fa91f563c3c8b2a964b5dd", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/system_typegraphs.ts": "51299d60c1bb75b3e74998eb77bdf1680ee9d4a2f29a267d3ca90b2867c577fb", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/gq.ts": "78435e53ec1c5b7aec29364c051eb8f10802714050d24ee68a65e1e263495d7d", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/graphql.ts": "9f4aa79276e05acc6020da2a18472a1cc54c0ecf42efcbf017d67a88b0b90af2", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/request_parser.ts": "afbc95debcb1bbfa6fc2b88937d7abedbed1f4335bb2d17bf98c7293761cfdb0", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/typegraph.ts": "fc0ba3f62e1dd687a0545adb1dbaf7185176e0f1e938bfdd29cfef7f85951635", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/graphql/utils.ts": "d09147add80f5e53a643ed3126ee8675a1655480728311de2def04ffe6262a4b", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/transports/rest/rest_schema_generator.ts": "c776e83c6a55e9bee3ec72c36c1d771b3ca711e4086b3728e4983ab866472624", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/artifacts/local.ts": "d36ece0f53a56922744dd4d3e170101466b3816ba136f9574e799880e27d1a4b", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/artifacts/mod.ts": "13583fb57bb5280e26c50ae89834ab73b123b712eb14a1995af00267304fef97", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/artifacts/shared.ts": "5061a07eb880e33c1543e7397e945d50b476ed51d81fc01d109c53295f089131", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/hooks.ts": "ea97c08285388300802676d03dbc06caadf060093736abce07ef8f99a60e9a04", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/memory_register.ts": "6eab24914a941f85c233037013dc13749d8b689c5f9ffb38600df4c7b00a94f0", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/mod.ts": "ce468fd7d0a32676f2867bf183c73e59da063f0a5ad3f0cde05d5f40e2bbf280", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/no_limiter.ts": "1e98610a737bd74668f80b7014c64669a59a801355340eaa14411e07f4a8a94e", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/rate_limiter.ts": "b5718ab9e718314f11f5d88d84795bd0e61575856470793f1fe83d499f4a9d40", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegate/register.ts": "d7a8732386ad019d4dcee0372b6cab93bfc55e0146729842db2aaecf1411b15d", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/mod.ts": "3401f26beae423b008480460495cf7a22791a53cce65fd0a941c34e4b65ee5b0", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/type_node.ts": "7f721cd5f6da2cbc7e66b804e0f81e0429aa2893e0a93244f9e66b39cb96b1a0", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/types.ts": "fc813b5f18e71b58e5f7904cd7fe3d6cae38b3c7055a8875042588c1561df160", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/utils.ts": "66fe8e1b5072f52ea2efebc5cf42001c3b858068b2d970ee3c8558032ff53103", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/versions.ts": "cdab4b07960f78c1f18511a8cc464a7e97c4c1fd15c6e8678c109483d3c26508", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraph/visitor.ts": "0fb0f89d92cb1654c1b010494a14c1aad88c7923102ea3e89866b232d3bcdf04", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraphs/introspection.json": "bbcf2c4233371c7f36052e5fe9e1cb1d18a46d3f31391cfcba2a3063c9141adb", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraphs/prisma_migration.json": "dfc346ff8fc2cef611c8f172b90e9d13eae6fed8b3dd65dea8631f9533159173", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/typegraphs/typegate.json": "bc0cbf4cd2c5de34410779994240993db4f1dd3d1eeda10b6045efdc37eb48a4", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/types.ts": "a36918c2bfab397edec906c23d2cd7558246337bb16fdf1ea4e353cffea5f2b4", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/utils.ts": "de1a17260e76607e1a8fd6d7384cbc21bb26e08f64bffc41d6508bf5a8359311", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/utils/hash.ts": "df6cf462c7a6a805b91dce9d3e7bbbd00ea3bfd8dcc973fb3e6c94e48e33d9b9", + "https://raw.githubusercontent.com/metatypedev/metatype/54558c719cf3d491c396af019a50b68159c5209f/src/typegate/src/worker_utils.ts": "19f686d729b947ab3eb2f29e99ccd07578037a3bccced65fc0dce42d5338cd31", "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/engine/bindings.ts": "e9391491bf5c4f682267a5cb4ae384ef33ed7c15273fcada13bea7b064cf1270", "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/engine/runtime.js": "1ae55e76d3de8e79c37054d9127c92af496ce10aa905ea64021893048bb33794", "https://raw.githubusercontent.com/metatypedev/metatype/54b487d5e3f83680c049a6a0d521dcff264e05c4/typegate/src/config.ts": "289820b743711beb9139bca83556f60774521f3c58addd5c441ae3205ef49e61", diff --git a/src/typegate/src/engine/query_engine.ts b/src/typegate/src/engine/query_engine.ts index f6383cb63d..d36f74018d 100644 --- a/src/typegate/src/engine/query_engine.ts +++ b/src/typegate/src/engine/query_engine.ts @@ -97,9 +97,10 @@ export class ComputeStage { }\n--`; } - withResolver(resolver: Resolver): ComputeStage { + withResolver(resolver: Resolver, deps: string[] = []): ComputeStage { return new ComputeStage({ ...this.props, + dependencies: [...this.props.dependencies, ...deps], resolver, }); } diff --git a/src/typegate/src/runtimes/Runtime.ts b/src/typegate/src/runtimes/Runtime.ts index b943451846..3b0ef87d75 100644 --- a/src/typegate/src/runtimes/Runtime.ts +++ b/src/typegate/src/runtimes/Runtime.ts @@ -65,7 +65,10 @@ export abstract class Runtime { materializedStages.push(...materializeRoot(s)); } else { materializedStages.push( - s.withResolver(Runtime.resolveFromParent(s.props.node)), + s.withResolver( + Runtime.resolveFromParent(s.props.node), + [s.props.parent!.id()], + ), ); } } diff --git a/src/typegate/src/runtimes/prisma/prisma.ts b/src/typegate/src/runtimes/prisma/prisma.ts index eeaea99304..c6c4c35d37 100644 --- a/src/typegate/src/runtimes/prisma/prisma.ts +++ b/src/typegate/src/runtimes/prisma/prisma.ts @@ -292,7 +292,7 @@ export class PrismaRuntime extends Runtime { this.execute( query, stage.props.materializer?.data.path as string[] ?? - [node], + [stage.props.node], renames, ), ); diff --git a/tests/e2e/published/published_test.ts b/tests/e2e/published/published_test.ts index 2bc897049f..ae8b46305a 100644 --- a/tests/e2e/published/published_test.ts +++ b/tests/e2e/published/published_test.ts @@ -214,7 +214,7 @@ Meta.test( const stdout = new Lines(proc.stdout); await stdout.readWhile((line) => { console.log(`typegate>`, line); - return !line.includes(`typegate ready on ${port}`); + return !line.includes(`typegate ready on :${port}`); }); stdout.readWhile((line) => { const match = line.match(/Initializing engine '(.+)'/); @@ -272,7 +272,7 @@ Meta.test( if (match) { typegraphs2.push(match[1]); } - return !line.includes(`typegate ready on ${port}`); + return !line.includes(`typegate ready on :${port}`); }); await stdout.close(); @@ -338,7 +338,7 @@ Meta.test( await stdout.readWhile((line) => { console.error("typegate>", line); - return !line.includes(`typegate ready on ${port}`); + return !line.includes(`typegate ready on :${port}`); }); const tgsDir = $.path( diff --git a/tests/typecheck/type_alias.py b/tests/typecheck/type_alias.py index 36bc2652a9..3f7c068761 100644 --- a/tests/typecheck/type_alias.py +++ b/tests/typecheck/type_alias.py @@ -1,10 +1,12 @@ from typegraph import typegraph, Policy, t, Graph -from typegraph.runtimes.random import RandomRuntime +from typegraph.runtimes import RandomRuntime +from typegraph.providers import PrismaRuntime @typegraph() def type_alias(g: Graph): random = RandomRuntime(seed=1) + prisma = PrismaRuntime("prisma", "POSTGRES") public = Policy.public() infos = t.struct( @@ -23,7 +25,26 @@ def type_alias(g: Graph): } ) + user = t.struct( + { + "id": t.integer().id(), + "name": t.string(), + "posts": t.list(g.ref("post")), + }, + name="user", + ) + _post = t.struct( + { + "id": t.integer().id(), + "title": t.string(), + "content": t.string(), + "author": user, + }, + name="post", + ) + g.expose( public, get_message=random.gen(message), + create_user=prisma.create(user), ) diff --git a/tests/typecheck/type_alias_test.ts b/tests/typecheck/type_alias_test.ts index c51ed65cf1..b0a7691a1d 100644 --- a/tests/typecheck/type_alias_test.ts +++ b/tests/typecheck/type_alias_test.ts @@ -1,10 +1,19 @@ // Copyright Metatype OÜ, licensed under the Elastic License 2.0. // SPDX-License-Identifier: Elastic-2.0 -import { gql, Meta } from "../utils/mod.ts"; +import { gql, Meta } from "test-utils/mod.ts"; +import { dropSchemas, recreateMigrations } from "test-utils/migrations.ts"; +import { randomPGConnStr } from "test-utils/database.ts"; Meta.test("Random", async (t) => { - const e = await t.engine("typecheck/type_alias.py"); + const { connStr } = randomPGConnStr(); + const e = await t.engine("typecheck/type_alias.py", { + secrets: { + POSTGRES: connStr, + }, + }); + await dropSchemas(e); + await recreateMigrations(e); await t.should("validate and work with a basic alias", async () => { await gql` @@ -102,4 +111,65 @@ Meta.test("Random", async (t) => { }) .on(e); }); + + await t.should("validate and work with prisma runtime", async () => { + await gql` + mutation { + user1: create_user( + data: { id: 123, name: "john", } + ) { + user_id: id + name + posts { + title + content + } + } + } + ` + .expectData({ + user1: { + name: "john", + user_id: 123, + posts: [], + }, + }) + .on(e); + + await gql` + mutation { + user1: create_user( + data: { + id: 124, + name: "john", + posts: { + create: { + id: 321, + title: "hello", + content: "Hello World!", + } + } + } + ) { + id + name + user_posts: posts { + post_title: title + content + } + } + } + ` + .expectData({ + user1: { + id: 124, + name: "john", + user_posts: [{ + content: "Hello World!", + post_title: "hello", + }], + }, + }) + .on(e); + }); });