-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: move where we call
field.coerce_result
.
Previously, we called it from `GarphQLAdapter#call`, applying it to all resolved fields. However, we only need to use it in the aggregation `GroupedBy` resolver, where we get `DayOfWeek` enum values that we may need to coerce. There are no other cases where it is needed. This allows us to simplify `GarphQLAdapter#call` so that it now only does two things: * Identifies the resolver to dispatch to. * Dispatches to that resolver. This will allow us to further optimize by leveraging built-in functionality of the GraphQL gem to have it dispatch to the appropriate resolver in a more performant manner.
- Loading branch information
1 parent
80a940f
commit 547a1c0
Showing
3 changed files
with
14 additions
and
29 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