@silkline/hasura-sim 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silkline/hasura-sim",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "In-memory Hasura GraphQL Engine (compiled to WebAssembly) + pglite — runs real GraphQL queries/mutations offline for tests and codegen, with no Docker/Postgres/network.",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
package/src/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { PGlite } from '@electric-sql/pglite';
1
+ import type { PGliteInterface } from '@electric-sql/pglite';
2
2
  import type {
3
3
  GraphQLFieldResolver,
4
4
  GraphQLFormattedError,
@@ -68,7 +68,7 @@ export interface CreateSimulatorArgs {
68
68
  /** Consolidated Hasura metadata ({ version, sources, … }). */
69
69
  metadataJson?: unknown;
70
70
  /** A pglite instance to run SQL against; one is created if omitted. */
71
- db?: PGlite;
71
+ db?: PGliteInterface;
72
72
  /** Remote schemas, keyed by remote-schema name. */
73
73
  remoteSchemas?: Record<string, RemoteSchemaDef>;
74
74
  /** Action handlers, keyed by action name. */
@@ -90,7 +90,7 @@ export interface RoleArgs {
90
90
  /** A running simulator: a wasm Hasura engine bound to a pglite database. */
91
91
  export interface Simulator {
92
92
  /** The pglite database the engine executes SQL against. */
93
- db: PGlite;
93
+ db: PGliteInterface;
94
94
  /** (Re)build the schema cache from metadata + static remote introspections. */
95
95
  init(
96
96
  metadata: unknown,
@@ -119,7 +119,7 @@ export function createSimulator(args?: CreateSimulatorArgs): Promise<Simulator>;
119
119
  * Run one Haskell-bridge request against a pglite connection via the raw wire
120
120
  * protocol. Exported for tests; normally reached through the wasm bridge.
121
121
  */
122
- export function execOnPglite(db: PGlite, requestJson: string): Promise<string>;
122
+ export function execOnPglite(db: PGliteInterface, requestJson: string): Promise<string>;
123
123
 
124
124
  /**
125
125
  * Normalise a remote-schema definition to the introspection *response* shape