@m1212e/rumble 0.16.31 → 0.16.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/index.mjs CHANGED
@@ -181,7 +181,7 @@ function mapNullFieldsToUndefined(obj) {
181
181
  }
182
182
  //#endregion
183
183
  //#region package.json
184
- var version = "0.16.31";
184
+ var version = "0.16.34";
185
185
  //#endregion
186
186
  //#region lib/helpers/mergeFilters.ts
187
187
  function mergeFilters(filterA, filterB) {
@@ -1424,7 +1424,22 @@ var RuntimeFiltersPlugin = class extends BasePlugin {
1424
1424
  entities
1425
1425
  });
1426
1426
  }));
1427
- const [resolved, prefetchedFilters] = await Promise.all([resolver(parent, args, context, info), prefetchedFiltersPromises]);
1427
+ let resolved, prefetchedFilters;
1428
+ if (this.tracer && this.tracerEnabled) {
1429
+ const o = await this.tracer.startActiveSpan(`apply_filters`, async (span) => {
1430
+ try {
1431
+ return await Promise.all([resolver(parent, args, context, info), prefetchedFiltersPromises]);
1432
+ } finally {
1433
+ span.end();
1434
+ }
1435
+ });
1436
+ resolved = o[0];
1437
+ prefetchedFilters = o[1];
1438
+ } else {
1439
+ const o = await Promise.all([resolver(parent, args, context, info), prefetchedFiltersPromises]);
1440
+ resolved = o[0];
1441
+ prefetchedFilters = o[1];
1442
+ }
1428
1443
  const allowed = Array.from((await Promise.all(prefetchedFilters.map((f) => f({
1429
1444
  context,
1430
1445
  entities: Array.isArray(resolved) ? resolved : [resolved]
@@ -1436,7 +1451,7 @@ var RuntimeFiltersPlugin = class extends BasePlugin {
1436
1451
  if (Array.isArray(resolved)) return allowed;
1437
1452
  return allowed[0] ?? null;
1438
1453
  };
1439
- if (this.tracer && this.tracerEnabled) return this.tracer.startActiveSpan(`apply_filters_${fieldConfig.name}`, async (span) => {
1454
+ if (this.tracer && this.tracerEnabled) return this.tracer.startActiveSpan(`filter_${fieldConfig.name}`, async (span) => {
1440
1455
  try {
1441
1456
  return await runFilters(span);
1442
1457
  } finally {