Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: JSON RPC based typegraph #877

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open

Conversation

luckasRanarison
Copy link
Contributor

@luckasRanarison luckasRanarison commented Oct 16, 2024

Tasks

Replace WASM in typegraph with a client/server architecture using JSON RPC through stdin/stdout.

  • Remove wit from typgraph-core
  • Codegen system for the SDK types
  • Rewrite the client SDKs
  • Write the JSON RPC server in the CLI
  • Update the build infrastructure
  • Fix broken tests

Migration notes

...

  • The change comes with new or modified tests
  • Hard-to-understand functions have explanatory comments
  • End-user documentation is updated to reflect the change

@luckasRanarison luckasRanarison marked this pull request as draft October 16, 2024 05:48
Natoandro
Natoandro previously approved these changes Oct 16, 2024
@luckasRanarison luckasRanarison marked this pull request as ready for review November 17, 2024 13:35
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.40%. Comparing base (bfffb07) to head (af5a9b2).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
+ Coverage   77.69%   81.40%   +3.70%     
==========================================
  Files         149      127      -22     
  Lines       18509    16458    -2051     
  Branches     1794     1740      -54     
==========================================
- Hits        14381    13397     -984     
+ Misses       4105     3038    -1067     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@luckasRanarison luckasRanarison requested a review from a team November 17, 2024 14:25
Yohe-Am
Yohe-Am previously approved these changes Nov 19, 2024
@@ -74,8 +73,9 @@ def build_reduce_entries(node: Any, paths: List[ReduceEntry], curr_path: List[st
raise Exception(f"unsupported type {type(node)} at {'.'.join(curr_path)}")


def unpack_tarb64(tar_b64: str, dest: str):
return wit_utils.unpack_tarb64(store, tar_b64, dest)
# FIXME: What is this?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used to unpack migrations that are returned from tg_deploy. Might be best to do the unpacking inside the typegraph itself now.

src/typegraph/specs/codegen/deno.jsonc Outdated Show resolved Hide resolved
src/typegraph/specs/codegen/tests/utils.ts Show resolved Hide resolved
Natoandro
Natoandro previously approved these changes Nov 25, 2024
src/typegraph/core/src/logger.rs Outdated Show resolved Hide resolved
const POSTGRES =
"postgresql://postgres:password@localhost:5432/db?schema=injection_test_prisma";
`postgresql://postgres:password@localhost:5432/db?schema=${schema}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not schemaName?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants