-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: simplify and optimiize
ElasticGraph::GraphQL::Schema
.
- Avoid calling `::GraphQL::Schema#types` repeatedly. As reported in rmosolgo/graphql-ruby#5154, accessing `#types` repeatedly can be quite slow (at least on 2.4.0 - 2.4.2). While it's been optimized in 2.4.3, there's no need to access it more than once. Previously, we accessed it in `#lookup_type_by_name`; instead we can just use the type objects as we iterate over `::GraphQL::Schema#types` a single time. - Remove unused `#defined_types` method. - Inline the old `#lookup_type_by_name` logic into `#type_named`.
- Loading branch information
1 parent
91dbffd
commit c748940
Showing
2 changed files
with
12 additions
and
34 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