standaloneMiddleware: Merge ctx/meta/input types
Using standaloneMiddleware, it would be great to merge the types (ctx, input, meta) with what is already there when passing that middleware.
In our case:
this is because we want to be sure user.id exists in the context before allowing the usage of this middleware, but when returning like this:
next({ ctx: { ...ctx, newProp: '' } })
you would still want the context type to be merged with the original so your queries and mutations get the complete context.0 Replies