You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I see a need in our schema to define publishables, which in effect would offer an interface to publish (the whole or) parts of a mutation's payload to a topic.
Now, in order to get there with the current state of things I see only the option to override individual resolvers on a typescript level. This is cumbersome and error prone. It would be beneficial to have an AOP approach to this so that we may "wrap" the resolver and have before and after hooks ("after" hooks being given "before" input as well). That way we don't have to touch the original code, and with the proper setup these hooks could be type safe as well.
I know that with hacking this could be done in a dirty way, but am curious to hear opinions about my reasoning.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I see a need in our schema to define
publishable
s, which in effect would offer an interface to publish (the whole or) parts of a mutation's payload to a topic.Now, in order to get there with the current state of things I see only the option to override individual resolvers on a typescript level. This is cumbersome and error prone. It would be beneficial to have an AOP approach to this so that we may "wrap" the resolver and have before and after hooks ("after" hooks being given "before" input as well). That way we don't have to touch the original code, and with the proper setup these hooks could be type safe as well.
I know that with hacking this could be done in a dirty way, but am curious to hear opinions about my reasoning.
Beta Was this translation helpful? Give feedback.
All reactions