Repository navigation
Add middleware support - #87
Merged
Merged
Conversation
cyrus-za
reviewed
Feb 18, 2021
KATT
marked this pull request as ready for review
February 18, 2021 10:26
cyrus-za
reviewed
Feb 18, 2021
Comment on lines
+149
to
+152
| expect(await client.query('child.child.name')).toBe('GrandChild'); | ||
| expect(preHookInParent).toHaveBeenCalledTimes(1); | ||
| expect(preHookInChild).toHaveBeenCalledTimes(1); | ||
| expect(preHookInGrandChild).toHaveBeenCalledTimes(1); |
Contributor
There was a problem hiding this comment.
nice. so it will call each of those "middleware" hooks when going to a subrouter. That's perfect.
cyrus-za
reviewed
Feb 18, 2021
cyrus-za
approved these changes
Feb 18, 2021
cyrus-za
left a comment
Contributor
There was a problem hiding this comment.
This is exactly what I requested. Thanks so much
Member
Author
|
@all-contributors add @cyrus-za for idea |
Contributor
|
I've put up a pull request to add @cyrus-za! 🎉 |
Codecov Report
@@ Coverage Diff @@
## main #87 +/- ##
==========================================
- Coverage 85.88% 85.69% -0.20%
==========================================
Files 13 13
Lines 588 601 +13
Branches 107 109 +2
==========================================
+ Hits 505 515 +10
- Misses 82 85 +3
Partials 1 1
Continue to review full report at Codecov.
|
Closed
This branch was successfully deployed
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
preHook- would love some input.trpc/packages/server/test/preHook.test.ts
Lines 67 to 84 in 5f96526