⚠️
This is the documentation for the old GraphQL Envelop version 2.
We recommend upgrading to the latest version 3.
We recommend upgrading to the latest version 3.
Tracing
envelop
comes with a self-measuring tracing tool, for providing you some insights on the performance of each stage.
If you wish to enable it, pass enableInternalTracing: true
to your envelop instance:
const getEnveloped = envelop({
plugins: [
// ...
],
enableInternalTracing: true
})
This way, on each executed request, you'll get the following object with metrics (measured in ms
) added to your result.extensions
:
{
"extensions": {
"_envelopTracing": {
"parse": 0.1,
"validate": 0.1,
"context": 0.1,
"execute": 0.1,
"subscribe": 0.1
}
}
}
💡
The measured time represents the entire execution, of all plugins, in each phase, including before/after of all plugins, and the actual GraphQL function.