-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
14 changed files
with
942 additions
and
165 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
Oops, something went wrong.
51728a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍