graphql-middleware icon indicating copy to clipboard operation
graphql-middleware copied to clipboard

High memory and CPU usage with a noop graphql-middleware

Open amitgud-doordash opened this issue 3 years ago • 1 comments

We are experiencing very high memory usage when we add even a noop middleware to our express Apollo GraphQL application. Do we have an idea of what memory / CPU overhead we should expect with the graphql-middleware? Using the latest version (6.0.10).

Screen Shot 2021-07-09 at 10 38 10 AM

amitgud-doordash avatar Jul 09 '21 17:07 amitgud-doordash

Just add some more color to this issue. The schema in the application is big, however the middleware itself is not going anything interesting.

+const noopMiddleware = async (
+  resolve: any,
+  root: any,
+  args: any,
+  context: Context,
+  info: any
+) => {
+  return await resolve(root, args, context, info)
+}

amitgud-doordash avatar Jul 09 '21 18:07 amitgud-doordash