Skip to content

Commit ea6e2d5

Browse files
committed
ref: remove tracePromise as it was not needed with runStores
1 parent acb1945 commit ea6e2d5

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

src/diagnostics.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -165,25 +165,6 @@ export function maybeTraceSync<T>(
165165
return channel.traceSync(fn, ctxFactory());
166166
}
167167

168-
/**
169-
* Publish a promise-returning operation through the named graphql tracing
170-
* channel, short-circuiting to `fn()` when the channel isn't registered or
171-
* nothing is listening.
172-
*
173-
* @internal
174-
*/
175-
export function maybeTracePromise<T>(
176-
name: keyof GraphQLChannels,
177-
ctxFactory: () => object,
178-
fn: () => Promise<T>,
179-
): Promise<T> {
180-
const channel = getChannels()?.[name];
181-
if (!shouldTrace(channel)) {
182-
return fn();
183-
}
184-
return channel.tracePromise(fn, ctxFactory());
185-
}
186-
187168
/**
188169
* Publish a mixed sync-or-promise operation through the named graphql tracing
189170
* channel.

0 commit comments

Comments
 (0)