-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support middleware chaining #89
Conversation
This commit adds `use()` and `define()` methods to the action client, in order to support chaining of middlewares, with type safe context. BREAKING CHANGE: Before, you would pass a single middleware function to the action client. Now, you can chain middlewares using `use()` method and then define your action with the `define()` method.
…nctions Improve middleware implementation and add `metadata` method to pass metadata to middleware functions. For now, just `actionName` property is supported, but this may be expanded in the future.
Before, input schemas were passed to the `define` method as the first argument. From now on, they'll be passed to `schema` method instead, which returns the `define` function with type safe arguments.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I love tRPC, so I am really looking forward to this. Is there a general issue/discussion where everything related to v7 gets tracked? |
Hey @rwieruch,
Great, me too!
You can check out the v7 milestone for that. The main feature to implement I'd say is Form Actions support. |
🎉 This PR is included in version 7.0.0-next.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
See #88