Skip to content

Conversation

forivall
Copy link

Remove uses of reduce/spread which causes significant latency to large middlewares. This is a port of (maticzav/graphql-middleware#567), which can be reproduced with git fetch https://github.com/maticzav/graphql-middleware.git e9eac82fc16723a1549e15bdaf370063572052a6 && git cherry-pick e9eac82fc16723a1549e15bdaf370063572052a6

I've also made the further change to use Object.fromEntries
instead of reduce, as it's the more modern approach imo, and typescript has better inference when using it (as, it caught a type issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants