Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): result extensions runtime (#16343)
* feat(client): result extensions runtime Core of implemenation consists of 3 functions: - `getAllComputedFields` is responsible for resolving all depenencies and naming conflicts between computed fields and producing a list of computed that could potentially be applied to specific model. - `applyResultExtensions` function applies computed field to single part of the query result. Does not traverse relationship. - `visitQueryResult` traverses the response and calls provided callback for each part of the response, corresponding to particular model and allows to modify it. By combining all 3 of them, we are able to resolve and apply all computed fields to any query response recursively, following all the relationships.
- Loading branch information
Showing
50 changed files
with
1,772 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
packages/client/src/__tests__/integration/happy/float-napi/dev.db
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
packages/client/src/__tests__/integration/happy/middlewares-transaction/dev.db
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
packages/client/src/__tests__/integration/happy/middlewares/dev.db
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.