best practices for middleware? #984
Replies: 3 comments
-
Hi @Chandraprakash-Darji! I'm Dosu and I’m helping the orpc team. You're on the right track with composable middleware and context extension, but there are a few best practices from the orpc ecosystem that can help you improve:
Refactoring suggestion: In These patterns are widely used in orpc and help keep your middleware efficient, composable, and easy to reason about. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Please remove |
Beta Was this translation helpful? Give feedback.
-
@unnoq Thanks, was trying every bit of code changes but didn't work. Thanks for help, it worked. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have two middleware: auth and brandId. I have shared my current implementation but I don't feel like it is best approach.
I am building for the first time with orpc. I want to do chain the middleware but typescript not letting me do it
middleware.ts
router.ts
contract.ts
base.ts
Beta Was this translation helpful? Give feedback.
All reactions