Replies: 1 comment 7 replies
-
can you share a repo we could look at? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm debugging slow responses from API, and it seems like GraphQL Mesh is the bottleneck.
In this particular request there are 2 queries sent.
I've added following logger in mesh:
First request:
How client see response time: 318ms
GraphQL Mesh see response time: 287ms
Backend answered in 37ms
Second request:
How client see response time: 583ms
GraphQL Mesh see response time: 528ms
Backend answered in 211ms
So there is constant latency of ~200-300ms inside Mesh - which seems insane, given that it only parses query and routes the requests (and it does that in async fashion) - and that is way slower than the backends which also parses queries but also processes all the data (in non-async fashion) ?
Backend is GraphQL.
Here is profile from the request. Seems like the issue is coming @graphql-tools/delegate/cjs/delegateToSchema.js
which internally calls several times @graphql-tools/delegate/cjs/Transformer.js 20ms.
What could be done in order to achieve better performance ?!
Beta Was this translation helpful? Give feedback.
All reactions