@m1212e/rumble 0.17.3 → 0.18.1

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.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _$graphql from "graphql";
2
2
  import { GraphQLError } from "graphql";
3
+ import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor";
3
4
  import { Tracer } from "@opentelemetry/api";
4
5
  import { TracingWrapperOptions } from "@pothos/tracing-opentelemetry";
5
6
  import * as _$graphql_yoga0 from "graphql-yoga";
6
7
  import { YogaServerOptions, createPubSub } from "graphql-yoga";
7
- import { useSofa } from "sofa-api";
8
8
  import * as _$drizzle_orm0 from "drizzle-orm";
9
9
  import * as _$drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
10
10
  import { PgAsyncDatabase } from "drizzle-orm/pg-core";
@@ -16,6 +16,8 @@ import * as _$_pothos_plugin_drizzle0 from "@pothos/plugin-drizzle";
16
16
  import { IncomingMessage, RequestListener, ServerResponse } from "node:http";
17
17
  import { Http2ServerRequest, Http2ServerResponse } from "node:http2";
18
18
  import { Socket } from "node:net";
19
+ import { ServerOptions } from "graphql-ws";
20
+ import { useSofa } from "sofa-api";
19
21
 
20
22
  //#region lib/helpers/asserts.d.ts
21
23
  /**
@@ -4381,6 +4383,17 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4381
4383
  * explorer and will not apply the additional envelop armor plugin.
4382
4384
  */
4383
4385
  enableApiDocs?: boolean;
4386
+ /**
4387
+ * Optional configuration passed to the auto-installed graphql-armor
4388
+ * EnvelopArmorPlugin. Only applied when `enableApiDocs` is false
4389
+ * (i.e. in production). Useful for relaxing the default depth/alias/
4390
+ * directive/token limits when the generated schema legitimately exceeds
4391
+ * them. See https://github.com/Escape-Technologies/graphql-armor for available options.
4392
+ *
4393
+ * @example
4394
+ * createYoga({ armorConfig: { maxDepth: { n: 20 } } })
4395
+ */
4396
+ armorConfig?: Parameters<typeof EnvelopArmorPlugin>[0];
4384
4397
  }) | undefined) => _$graphql_yoga0.YogaServerInstance<RequestEvent, {}>;
4385
4398
  /**
4386
4399
  * Creates a sofa instance to offer a REST API.
@@ -4395,9 +4408,9 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4395
4408
  * ```
4396
4409
  * https://the-guild.dev/graphql/sofa-api/docs#usage
4397
4410
  */
4398
- createSofa: (args: Omit<Parameters<typeof useSofa>[0], "schema" | "context">) => Router<any, {}, {
4411
+ createSofa: (args: Omit<Parameters<typeof useSofa>[0], "schema" | "context">) => Promise<Router<any, {}, {
4399
4412
  [TKey: string]: never;
4400
- }>;
4413
+ }>>;
4401
4414
  /**
4402
4415
  * Creates a WebSocket server handler for GraphQL subscriptions.
4403
4416
  * Pass the ws implementation function as the first argument and rumble will
@@ -4417,7 +4430,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
4417
4430
  * Bun.serve({ websocket: createWs(makeHandler, { ... }), ... });
4418
4431
  * ```
4419
4432
  */
4420
- createWs: <T_2 extends (options: any, ...rest: any[]) => any>(implementation: T_2, args: Omit<Parameters<T_2>[0], "schema" | "context">, ...rest: Parameters<T_2> extends [any, ...infer R] ? R : never) => ReturnType<T_2>;
4433
+ createWs: <Options extends ServerOptions<any, any>, Rest extends unknown[], Return>(implementation: (options: Options, ...rest: Rest) => Return, args: Omit<Options, "schema" | "context">, ...rest: Rest) => Return;
4421
4434
  /**
4422
4435
  * A function for creating default objects for your schema
4423
4436
  */