-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Batch GraphQL link expansion queries
Previously LinkedToEditionsSource would make one query per edition (getting linked editions, given a list of link types). This change makes one query per parent edition, by getting the dataloader to batch queries across multiple editions and link types. For the prime minister page, the number of database queries reduces from 93 to 15, and the ActiveRecord execution time decreases from ~100ms to ~20ms, when run locally. Co-authored-by: Richard Towers <[email protected]>
- Loading branch information
1 parent
7afeb55
commit de1628b
Showing
3 changed files
with
28 additions
and
23 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