-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: join field support relationships inside arrays (#9773)
### What? Allow the join field to have a configuration `on` relationships inside of an array, ie `on: 'myArray.myRelationship'`. ### Why? This is a more powerful and expressive way to use the join field and not be limited by usage of array data. For example, if you have a roles array for multinant sites, you could add a join field on the sites to show who the admins are. ### How? This fixes the traverseFields function to allow the configuration to pass sanitization. In addition, the function for querying the drizzle tables needed to be ehanced. Additional changes from #9995: - Significantly improves traverseFields and the 'join' case with a raw query injection pattern, right now it's internal but we could expose it at some point, for example for querying vectors. - Fixes potential issues with not passed locale to traverseFields (it was undefined always) - Adds an empty array fallback for joins with localized relationships Fixes # #9643 --------- Co-authored-by: Because789 <thomas@because789.ch> Co-authored-by: Sasha <64744993+r1tsuu@users.noreply.github.com>
- Loading branch information
1 parent
eb037a0
commit b0b2fc6
Showing
17 changed files
with
291 additions
and
142 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
Oops, something went wrong.