@m1212e/rumble 0.16.19 → 0.16.21
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.cjs +8 -10
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +9 -11
- package/out/index.mjs.map +1 -1
- package/package.json +1 -1
package/out/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { t as generateFromSchema } from "./generate-PDRNfY6V.mjs";
|
|
|
3
3
|
import { GraphQLError } from "graphql";
|
|
4
4
|
import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor";
|
|
5
5
|
import { useDisableIntrospection } from "@graphql-yoga/plugin-disable-introspection";
|
|
6
|
-
import { trace } from "@opentelemetry/api";
|
|
6
|
+
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { AttributeNames, SpanNames, createOpenTelemetryWrapper } from "@pothos/tracing-opentelemetry";
|
|
8
8
|
import { capitalize, cloneDeep, debounce, merge, toMerged } from "es-toolkit";
|
|
9
9
|
import { createPubSub, createYoga } from "graphql-yoga";
|
|
@@ -185,7 +185,7 @@ function mapNullFieldsToUndefined(obj) {
|
|
|
185
185
|
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region package.json
|
|
188
|
-
var version = "0.16.
|
|
188
|
+
var version = "0.16.21";
|
|
189
189
|
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region lib/helpers/mergeFilters.ts
|
|
@@ -1437,15 +1437,12 @@ var RuntimeFiltersPlugin = class extends BasePlugin {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
wrapResolve(resolver, fieldConfig) {
|
|
1439
1439
|
return async (parent, args, context, info) => {
|
|
1440
|
+
let filters;
|
|
1441
|
+
const fieldType = fieldConfig?.type;
|
|
1442
|
+
if (fieldType.kind === "List") filters = fieldType.type?.ref.currentConfig.pothosOptions[applyFiltersKey];
|
|
1443
|
+
else if (fieldType.kind === "Object") filters = fieldType.ref.currentConfig.pothosOptions[applyFiltersKey];
|
|
1444
|
+
if (!filters || !Array.isArray(filters) || filters.length === 0) return resolver(parent, args, context, info);
|
|
1440
1445
|
const runFilters = async (span) => {
|
|
1441
|
-
let filters;
|
|
1442
|
-
const fieldType = fieldConfig?.type;
|
|
1443
|
-
if (fieldType.kind === "List") filters = fieldType.type?.ref.currentConfig.pothosOptions[applyFiltersKey];
|
|
1444
|
-
else if (fieldType.kind === "Object") filters = fieldType.ref.currentConfig.pothosOptions[applyFiltersKey];
|
|
1445
|
-
if (!filters || !Array.isArray(filters) || filters.length === 0) {
|
|
1446
|
-
span?.setAttribute("filters.status", "unrestricted");
|
|
1447
|
-
return resolver(parent, args, context, info);
|
|
1448
|
-
}
|
|
1449
1446
|
const resolved = await resolver(parent, args, context, info);
|
|
1450
1447
|
const allResolvedValues = Array.isArray(resolved) ? resolved : [resolved];
|
|
1451
1448
|
const allFilters = Array.isArray(filters) ? filters : [filters];
|
|
@@ -1618,7 +1615,8 @@ export const db = drizzle(
|
|
|
1618
1615
|
try {
|
|
1619
1616
|
return await executeFn(options);
|
|
1620
1617
|
} catch (error) {
|
|
1621
|
-
span.recordException(error);
|
|
1618
|
+
if (error instanceof Error) span.recordException(error);
|
|
1619
|
+
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1622
1620
|
throw error;
|
|
1623
1621
|
} finally {
|
|
1624
1622
|
span.end();
|