Open knikoloski opened 7 months ago
@knikoloski thanks for reporting.
I just shipped 0.0.0-alpha.103
It allows you to pass the shouldExcludeTypeFields
key to trace schema see more
Please try this option and report if you notice an improvement, in the mean time we will be working on benchmarks to better diagnose your described issue.
Issue description
I'm experiencing slow query execution when using the
@graphql-debugger/trace-schema
package in my schema setup. My schema setup includes Nexus for defining the GraphQL schema and Prisma for database access.Here's a simplified version of my setup:
Here's a simple
ping
query that I have defined:When I remove the
traceSchema
wrapper and exportnexusSchema
directly, query execution of theping
query is fast. However, withtraceSchema
, queryping
takes more than 1 or 2 seconds to execute (it should not take more than 20 or 30 ms to execute).Packages version:
@graphql-debugger/adapter-proxy:
0.0.0-alpha.100
@graphql-debugger/trace-schema:0.0.0-alpha.100
Node.js version:20.12.2
Prisma version:5.10.2
Nexus version:1.3.0
Additional information:
After debugging the
traceSchema
function directly in thenode_modules/@graphql-debugger/trace-schema/build/trace-schema.js
file, I found that removing the following block of code resolves the slowness issue:Please let me know if you need any further information. Thank you for your help in resolving this issue.