-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Make REST API use Twenty ORM direclty #3644
Comments
Yes please! If any experienced contributor wants to tackle this task, I'm happy to give a hand here. There is a lot of work but the engineering and the product is very well defined so it should be doable by the community |
@FelixMalfait It's not that difficult anymore I think as most of the complexity is within twenty-orm and we have quite good example of parsing in the current rest api and in our graphql implementation (we know how to parse rest input to graphql and graphql to orm already, we need to do rest input to orm direclty) |
I'm editing the description to add more details |
@charlesBochet I am ready to work. You may please assign me. |
@Faisal-imtiyaz123 let me know if we should unassign you. Thanks! |
@FelixMalfait Yes you may unassign me. I talked to @charlesBochet regarding this. |
/oss.gg 3000 |
Thanks for opening an issue! It's live on oss.gg! |
I have working experience in nestjs, May I work on this? @charlesBochet |
sure, thank you @DeepaPrasanna! |
It's not an easy one, feel free to ping me if you need help! |
sure! Thank you |
/assign |
Assigned to @DeepaPrasanna! Please open a draft PR linking this issue within 48h |
/assign |
This issue is already assigned to another person. Please find more issues here. |
@DeepaPrasanna, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically. |
hello @charlesBochet , I am working on this. I have an interview scheduled for today, that is why I paused for some time. I plan to resume my work again tomorrow. |
/assign |
Assigned to @DeepaPrasanna! Please open a draft PR linking this issue within 48h |
/assign |
This issue is already assigned to another person. Please find more issues here. |
I will be creating a draft PR today. Pls don't unassign me. |
Thanks @DeepaPrasanna, great to create a PR to get intermediate feedback and make sure you go in the right direction since this is a big PR, thanks a lot! |
Hello @charlesBochet @FelixMalfait , I have tried to refactor the |
Thank you @DeepaPrasanna, I will take a look today |
Just curious, how the distribution of the points will work if I am unable to complete it everything before 31st. I do understand and respect your time for reviews. :) |
Awarded points on the PR :) We will take a deep look at your PR shortly, we are a bit overwhelmed by the volume of PRs right now! |
No worries! Thank you :) |
@FelixMalfait @charlesBochet this is interesting. working on it, getting back with first version to get initial feedback on implementation, will start by making it work for batch endpoints as we will get enough idea for other endpoints with that implementation. |
Hey @Nabhag8848, I wasn't able to finish the PR due to my work commitments. You can refer to the incomplete PR to get a head start. |
Thanks a lot @Nabhag8848 this is a big one and an impactful one for the overall quality of the codebase (current solution for the api is hacky)! Ping us when you need feedback! |
still working, have better idea about overall codebase 🙌🏼. |
Hey @Nabhag8848 are you still working on that issue? @pacyL2K19 is interested to work on it |
Can you assign this task to me @martmull? |
Done |
# This PR - Addressing #3644 - Migrates the `DELETE /rest/*` endpoint to use TwentyORM - Factorizes common middleware logic into a common module --------- Co-authored-by: martmull <[email protected]>
Objective: Enhance the reliability and performance of the REST API.
Technical Context
Currently, our REST API (documentation here) is exposed via two dynamic endpoint sets:
rest/...
rest/batch/...
These endpoints are handled by two controllers:
rest-api-core.controller
andrest-api-batch-core.controller
, both backed byRestApiCoreService
.The RestApiCoreService currently parses REST payloads, converts them into GraphQL payloads, and calls the GraphQL API—an inefficient process. This approach was initially necessary because querying workspaceSchemas in Twenty required pg_graphql.
However, we recently introduced TwentyORM (soon to be renamed WorkspaceORM), a lightweight layer on top of TypeORM, which can directly query workspaceSchemas.
Goal: Refactor the REST API to leverage TwentyORM directly.
Note: The GraphQL API is also being migrated to TwentyORM (replacing
pg_graphql
), so you can draw inspiration from theGraphqlQueryRunnerService
.Key Goals:
Refactor the REST API to use TwentyORM directly.
Ensure the REST API is fully covered by integration tests.
Technical inputs
We should take a lot of inspiration from what has been done in the new GraphqlQueryRunnerService. Advices:
The text was updated successfully, but these errors were encountered: