Can I extend the procedure builder?
Authorization in my app is somewhat complicated; I have various resources, and I often have to validate the current user's relation to that resource before allowing them access.
Currently I'm doing this:
-
- The types of the query and config are related, because the authorization check uses the procedure's input.
What I really want to do is this:
Any advice? I've looked at using
Currently I'm doing this:
-
authorize is a custom function that wraps a mutation in an authorization check, which is defined by the config. - The types of the query and config are related, because the authorization check uses the procedure's input.
What I really want to do is this:
Any advice? I've looked at using
.meta(), but middleware doesn't know about the input types does it?