diff --git a/plugins/node/opentelemetry-instrumentation-graphql/src/utils.ts b/plugins/node/opentelemetry-instrumentation-graphql/src/utils.ts index 06e6d6bbdf..c9ef7a935a 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-graphql/src/utils.ts @@ -419,7 +419,7 @@ export function wrapFieldResolver( let field: any; let shouldEndSpan = false; - if (config.depth! >= 0 && config.depth! < depth) { + if (config.depth >= 0 && config.depth < depth) { field = getParentField(contextValue, path); } else { const newField = createFieldIfNotExists(