refactoring REST APIs to use twenty orm
I checked the codebase and it seems the existing REST APIs are not covered by integration tests. Am i right in thinking so?
6 Replies
GitHub
[Server Integration tests] Write integration REST API tests · Issue...
Scope & Context We have recently introduced integration testing suite on the server graphql API. See: packages/twenty-server/test/companies.integration-spec.ts We have 1 suite per standard obje...
thank u
are the APIs response structure expected to remain same after refactoring?
For example, whether the key
createViews
is expected to be there in the response? on one hand, i do believe changing the response might involve larger refactoring wherever it is used. And on the other hand, its more of coming from graphql response structure. That is why I am wondering whether to keep as it is or return without that key. Thank u!may I know what is the purpose of
objectMetadataCollection
specified here https://github.com/twentyhq/twenty/blob/113e9fc8c731fffb23ca630fe14c3b6a6015676a/packages/twenty-server/src/engine/api/graphql/workspace-schema.factory.ts#L75I agree implementing a more standard (more simple) REST response format is something we should consider during this refactoring. We may create another REST api version to avoid breaking changes
Yes! for now I kept the way it is so that it wont break