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
Every rule evaluation assumes that the return value from the evaluation function is a promise.
Describe the bug
This implicitly converts every response value into a promise. For large, nested responses, this causes lots of promises to be created and immediately resolved, which slows down the event loop and response times per request significantly. I've noticed over a million promises being invoked and resolved in our production environment.
I believe this is the root cause for most of the other performance issues being flagged in this repository.
Expected behavior
GraphQL Shield should only await functions that actually return promises. A lot of other libraries, like apollo-server, await on promises only if the return value is actually a promise.
The text was updated successfully, but these errors were encountered:
When using applyMiddleware each default field is unnecessary running the rule applied for the type.
Is there an option to choose if it will run once only for the type?
Bug report
Every rule evaluation assumes that the return value from the evaluation function is a promise.
Describe the bug
This implicitly converts every response value into a promise. For large, nested responses, this causes lots of promises to be created and immediately resolved, which slows down the event loop and response times per request significantly. I've noticed over a million promises being invoked and resolved in our production environment.
I believe this is the root cause for most of the other performance issues being flagged in this repository.
Expected behavior
GraphQL Shield should only await functions that actually return promises. A lot of other libraries, like
apollo-server
, await on promises only if the return value is actually a promise.The text was updated successfully, but these errors were encountered: