Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coalesce find requests, add support for preloading data
This PR brings following improvements/changes: 1. Find calls from the same runloop will be coalesced into findMany requests if the adapter has a findMany method 2. Adds a groupRecordsForFindMany hook on the adapter that allows you to decide how to coalesce the record requests. This will enable fixing of bugs such as #651, by segmenting on the number of records 3. Allows users to preset attributes and relationships on a model when doing a find call. For relationships you can either pass in a record or an id 4. Gives rudimentary support for nested urls, by passing in the record object to the buildUrl method 5. Removes the owner being passed to findMany becuase it can be looked up on the original record 6. Adds couple special cased SSOT features that were needed for buildUrl/removal of owner property to be viable This PR lays the groundwork for: 1. Adding support for reloading hasManys 2. Making nice sugar for nestedUrls in the RestAdater
- Loading branch information
Showing
15 changed files
with
750 additions
and
137 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
Oops, something went wrong.