@m1212e/rumble 0.16.16 → 0.16.17

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.d.cts CHANGED
@@ -14,6 +14,8 @@ import * as _pothos_plugin_drizzle0 from "@pothos/plugin-drizzle";
14
14
  import * as _pothos_core0 from "@pothos/core";
15
15
  import SchemaBuilder from "@pothos/core";
16
16
  import { useSofa } from "sofa-api";
17
+ import { Tracer } from "@opentelemetry/api";
18
+ import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
17
19
 
18
20
  //#region lib/helpers/asserts.d.ts
19
21
  /**
@@ -4280,6 +4282,19 @@ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInst
4280
4282
  */
4281
4283
  cpu_operator_cost?: number;
4282
4284
  } | undefined;
4285
+ /**
4286
+ * rumble can set up otel tracing if you want to. This will provide details of execution time and outcome to the provided tracer. See https://pothos-graphql.dev/docs/plugins/tracing#install for more information.
4287
+ */
4288
+ otel?: {
4289
+ /**
4290
+ * The tracer to use
4291
+ */
4292
+ tracer: Tracer;
4293
+ /**
4294
+ * You can pass options to the tracing wrapper
4295
+ */
4296
+ options?: TracingWrapperOptions<unknown>;
4297
+ };
4283
4298
  };
4284
4299
  //#endregion
4285
4300
  //#region lib/rumble.d.ts
@@ -4294,8 +4309,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4294
4309
  abilityBuilder.users
4295
4310
  .allow(["read", "update", "delete"])
4296
4311
  .when(({ userId }) => ({ where: eq(schema.users.id, userId) }));
4297
-
4298
- // everyone can read posts
4312
+ // everyone can read posts
4299
4313
  abilityBuilder.posts.allow("read");
4300
4314
  *
4301
4315
  * ```
@@ -4394,20 +4408,19 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4394
4408
  DefaultFieldNullability: false;
4395
4409
  }>>;
4396
4410
  /**
4397
- * Creates the native yoga instance. Can be used to run an actual HTTP server.
4398
- *
4399
- * @example
4400
- *
4401
- * ```ts
4402
- *
4403
- import { createServer } from "node:http";
4404
- * const server = createServer(createYoga());
4405
- server.listen(3000, () => {
4406
- console.info("Visit http://localhost:3000/graphql");
4407
- });
4408
- * ```
4409
- * https://the-guild.dev/graphql/yoga-server/docs#server
4410
- */
4411
+ * Creates the native yoga instance. Can be used to run an actual HTTP server.
4412
+ *
4413
+ * @example
4414
+ *
4415
+ * ```ts
4416
+ * import { createServer } from "node:http";
4417
+ * const server = createServer(createYoga());
4418
+ * server.listen(3000, () => {
4419
+ * console.info("Visit http://localhost:3000/graphql");
4420
+ * });
4421
+ * ```
4422
+ * https://the-guild.dev/graphql/yoga-server/docs#server
4423
+ */
4411
4424
  createYoga: (args?: (Omit<YogaServerOptions<RequestEvent, any>, "schema" | "context"> & {
4412
4425
  /**
4413
4426
  * Determines if the API should disclose various things about its structure.
@@ -4418,17 +4431,18 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4418
4431
  enableApiDocs?: boolean;
4419
4432
  }) | undefined) => graphql_yoga0.YogaServerInstance<RequestEvent, {}>;
4420
4433
  /**
4421
- * Creates a sofa instance to offer a REST API.
4422
- ```ts
4423
- import express from 'express';
4424
-
4425
- const app = express();
4426
- const sofa = createSofa(...);
4427
-
4428
- app.use('/api', useSofa({ schema }));
4429
- ```
4430
- * https://the-guild.dev/graphql/sofa-api/docs#usage
4431
- */
4434
+ * Creates a sofa instance to offer a REST API.
4435
+ *
4436
+ * ```ts
4437
+ * import express from "express";
4438
+ *
4439
+ * const app = express();
4440
+ * const sofa = createSofa(...);
4441
+ *
4442
+ * app.use("/api", useSofa({ schema }));
4443
+ * ```
4444
+ * https://the-guild.dev/graphql/sofa-api/docs#usage
4445
+ */
4432
4446
  createSofa: (args: Omit<Parameters<typeof useSofa>[0], "schema" | "context">) => Router<any, {}, {
4433
4447
  [TKey: string]: never;
4434
4448
  }>;