maticzav / graphql-middleware

Split up your GraphQL resolvers in middleware functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: applyMiddlewareToDeclaredResolvers works only for first middleware

rostislavv opened this issue Β· comments

On top of this issue maticzav/graphql-shield#416 we faced noticeable performance degradation when graphql-shield applied. After few stages of investigation it turned out that there is a small bug in graphql-middleware itself, where for applyMiddlewareToDeclaredResolvers it will apply to declared resolver only for first middleware in sequence here, and all fields will be affected for next middlewares, due to presence of field, and passing of this condition

i've also prepared pr for this #242

@rostislavv thanks. Your PR is invaluable to graphql-shield and graphql-middleware! πŸ™‚

np, thank you for your work πŸ‘

πŸŽ‰ This issue has been resolved in version 4.0.2 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€