Skip to content

Commit adc6040

Browse files
committed
fix failing tests
1 parent 9c1ed62 commit adc6040

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/datadog-instrumentations/src/graphql.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ function finishResolvers ({ fields }) {
322322
field.ctx.error = field.error
323323
resolveErrorCh.publish(field.ctx)
324324
}
325-
console.log('finishResolvers', field)
326325
finishResolveCh.publish(field.ctx)
327326
})
328327
}

packages/datadog-plugin-graphql/src/resolve.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ class GraphQLResolvePlugin extends TracingPlugin {
1212
start (fieldCtx) {
1313
const { info, ctx: parentCtx, args } = fieldCtx
1414

15-
const pathInfo = info && info.path
16-
const path = pathToArray(pathInfo)
15+
const path = getPath(info, this.config)
1716

1817
// we need to get the parent span to the field if it exists for correct span parenting
1918
// of nested fields
20-
const parentField = getParentField(parentCtx, path)
19+
const parentField = getParentField(parentCtx, pathToArray(info && info.path))
2120
const childOf = parentField?.ctx?.currentStore?.span
2221

2322
fieldCtx.parent = parentField

0 commit comments

Comments
 (0)