@graphql-mesh/transport-sql 0.0.0-stage → 0.1.0
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/CHANGELOG.md +9 -0
- package/dist/cjs/adapter.js +60 -0
- package/dist/cjs/batch.js +113 -0
- package/dist/cjs/client.js +205 -0
- package/dist/cjs/client.js.map +7 -0
- package/dist/cjs/dialect.js +60 -0
- package/dist/cjs/dialect.js.map +7 -0
- package/dist/cjs/entity.js +186 -0
- package/dist/cjs/execution.js +307 -0
- package/dist/cjs/execution.js.map +7 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/mapping.js +260 -0
- package/dist/cjs/mapping.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/pg-executor.js +53 -0
- package/dist/cjs/pg-plans.js +103 -0
- package/dist/cjs/pg-registry.js +239 -0
- package/dist/cjs/plan.js +359 -0
- package/dist/cjs/sql-builder.js +653 -0
- package/dist/cjs/sql-builder.js.map +7 -0
- package/dist/cjs/types.js +0 -0
- package/dist/cjs/types.js.map +7 -0
- package/dist/cjs/uri.js +267 -0
- package/dist/esm/adapter.js +54 -0
- package/dist/esm/batch.js +107 -0
- package/dist/esm/client.js +197 -0
- package/dist/esm/client.js.map +7 -0
- package/dist/esm/dialect.js +54 -0
- package/dist/esm/dialect.js.map +7 -0
- package/dist/esm/entity.js +180 -0
- package/dist/esm/execution.js +303 -0
- package/dist/esm/execution.js.map +7 -0
- package/dist/esm/index.js +20 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/mapping.js +255 -0
- package/dist/esm/mapping.js.map +7 -0
- package/dist/esm/pg-executor.js +49 -0
- package/dist/esm/pg-plans.js +100 -0
- package/dist/esm/pg-registry.js +236 -0
- package/dist/esm/plan.js +351 -0
- package/dist/esm/sql-builder.js +636 -0
- package/dist/esm/sql-builder.js.map +7 -0
- package/dist/esm/types.js +0 -0
- package/dist/esm/types.js.map +7 -0
- package/dist/esm/uri.js +261 -0
- package/dist/package.json +57 -0
- package/dist/typings/adapter.d.cts +9 -0
- package/dist/typings/adapter.d.ts +9 -0
- package/dist/typings/batch.d.cts +21 -0
- package/dist/typings/batch.d.ts +21 -0
- package/dist/typings/client.d.cts +36 -0
- package/dist/typings/client.d.ts +36 -0
- package/dist/typings/dialect.d.cts +9 -0
- package/dist/typings/dialect.d.ts +9 -0
- package/dist/typings/entity.d.cts +24 -0
- package/dist/typings/entity.d.ts +24 -0
- package/dist/typings/execution.d.cts +9 -0
- package/dist/typings/execution.d.ts +9 -0
- package/dist/typings/index.d.cts +15 -0
- package/dist/typings/index.d.ts +15 -0
- package/dist/typings/mapping.d.cts +13 -0
- package/dist/typings/mapping.d.ts +13 -0
- package/dist/typings/pg-executor.d.cts +19 -0
- package/dist/typings/pg-executor.d.ts +19 -0
- package/dist/typings/pg-plans.d.cts +12 -0
- package/dist/typings/pg-plans.d.ts +12 -0
- package/dist/typings/pg-registry.d.cts +16 -0
- package/dist/typings/pg-registry.d.ts +16 -0
- package/dist/typings/plan.d.cts +47 -0
- package/dist/typings/plan.d.ts +47 -0
- package/dist/typings/sql-builder.d.cts +75 -0
- package/dist/typings/sql-builder.d.ts +75 -0
- package/dist/typings/types.d.cts +50 -0
- package/dist/typings/types.d.ts +50 -0
- package/dist/typings/uri.d.cts +42 -0
- package/dist/typings/uri.d.ts +42 -0
- package/package.json +67 -4
- package/src/adapter.ts +56 -0
- package/src/batch.ts +150 -0
- package/src/client.ts +233 -0
- package/src/entity.ts +235 -0
- package/src/execution.ts +411 -0
- package/src/index.ts +25 -0
- package/src/mapping.ts +291 -0
- package/src/pg-executor.ts +68 -0
- package/src/pg-plans.ts +118 -0
- package/src/pg-registry.ts +290 -0
- package/src/plan.ts +466 -0
- package/src/sql-builder.ts +809 -0
- package/src/types.ts +63 -0
- package/src/uri.ts +301 -0
- package/test/client-bun.test.ts +8 -0
- package/test/client.bun.test.ts +46 -0
- package/test/execution.test.ts +277 -0
- package/test/mapping.test.ts +79 -0
- package/test/pg-registry.test.ts +103 -0
- package/test/sql-builder.test.ts +131 -0
- package/test/uri.test.ts +123 -0
- package/README.md +0 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SqlTransportOptions } from './types.js';
|
|
2
|
+
export * from './adapter.js';
|
|
3
|
+
export * from './batch.js';
|
|
4
|
+
export * from './client.js';
|
|
5
|
+
export * from './entity.js';
|
|
6
|
+
export * from './execution.js';
|
|
7
|
+
export * from './mapping.js';
|
|
8
|
+
export * from './plan.js';
|
|
9
|
+
export * from './sql-builder.js';
|
|
10
|
+
export * from './uri.js';
|
|
11
|
+
export type * from './types.js';
|
|
12
|
+
declare const _default: {
|
|
13
|
+
getSubgraphExecutor({ subgraph, cwd }: import("@graphql-mesh/transport-common").TransportGetSubgraphExecutorOptions<SqlTransportOptions>): Promise<import("@graphql-mesh/transport-common").DisposableExecutor>;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParsedSqlMapping, SqlMappingValue } from './types.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* Parse `@sql` `where` / `set` / `selection` block strings.
|
|
4
|
+
* Skips `# ...` comments to EOL. Supports nested `{ ... }` blocks and `$args` / `$this` / `$pseudo`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseSqlMapping(source: string | null | undefined): ParsedSqlMapping;
|
|
7
|
+
/** Flatten selection entries that map GraphQL field -> SQL column (ignore nested/pseudo). */
|
|
8
|
+
export declare function columnMapFromSelection(selection: ParsedSqlMapping): Map<string, string>;
|
|
9
|
+
/** Resolve `$args.path` / `$this.path` / literal against runtime. */
|
|
10
|
+
export declare function resolveMappingValue(value: SqlMappingValue | undefined, ctx: {
|
|
11
|
+
args?: Record<string, any>;
|
|
12
|
+
parent?: Record<string, any>;
|
|
13
|
+
}): unknown;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParsedSqlMapping, SqlMappingValue } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse `@sql` `where` / `set` / `selection` block strings.
|
|
4
|
+
* Skips `# ...` comments to EOL. Supports nested `{ ... }` blocks and `$args` / `$this` / `$pseudo`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseSqlMapping(source: string | null | undefined): ParsedSqlMapping;
|
|
7
|
+
/** Flatten selection entries that map GraphQL field -> SQL column (ignore nested/pseudo). */
|
|
8
|
+
export declare function columnMapFromSelection(selection: ParsedSqlMapping): Map<string, string>;
|
|
9
|
+
/** Resolve `$args.path` / `$this.path` / literal against runtime. */
|
|
10
|
+
export declare function resolveMappingValue(value: SqlMappingValue | undefined, ctx: {
|
|
11
|
+
args?: Record<string, any>;
|
|
12
|
+
parent?: Record<string, any>;
|
|
13
|
+
}): unknown;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GraphQLSchema } from 'graphql';
|
|
2
|
+
import type { Pool } from 'pg';
|
|
3
|
+
import type { DisposableExecutor } from '@graphql-mesh/transport-common';
|
|
4
|
+
import type { SqlClient } from './types.cjs';
|
|
5
|
+
export interface CreatePostgresGrafastExecutorOpts {
|
|
6
|
+
subgraph: GraphQLSchema;
|
|
7
|
+
sqlClient: SqlClient;
|
|
8
|
+
/** Called on dispose in addition to releasing withPgClient */
|
|
9
|
+
disposeClient: () => void | Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Postgres fast path: Grafast + `@dataplan/pg` plans for `@sql` fields.
|
|
13
|
+
* Requires a Node `pg.Pool` on `sqlClient.pgPool` (Bun.SQL falls back to the
|
|
14
|
+
* generic GraphQL.js planner).
|
|
15
|
+
*/
|
|
16
|
+
export declare function createPostgresGrafastExecutor(opts: CreatePostgresGrafastExecutorOpts): DisposableExecutor | null;
|
|
17
|
+
export declare function hasPgPool(client: SqlClient): client is SqlClient & {
|
|
18
|
+
pgPool: Pool;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GraphQLSchema } from 'graphql';
|
|
2
|
+
import type { Pool } from 'pg';
|
|
3
|
+
import type { DisposableExecutor } from '@graphql-mesh/transport-common';
|
|
4
|
+
import type { SqlClient } from './types.js';
|
|
5
|
+
export interface CreatePostgresGrafastExecutorOpts {
|
|
6
|
+
subgraph: GraphQLSchema;
|
|
7
|
+
sqlClient: SqlClient;
|
|
8
|
+
/** Called on dispose in addition to releasing withPgClient */
|
|
9
|
+
disposeClient: () => void | Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Postgres fast path: Grafast + `@dataplan/pg` plans for `@sql` fields.
|
|
13
|
+
* Requires a Node `pg.Pool` on `sqlClient.pgPool` (Bun.SQL falls back to the
|
|
14
|
+
* generic GraphQL.js planner).
|
|
15
|
+
*/
|
|
16
|
+
export declare function createPostgresGrafastExecutor(opts: CreatePostgresGrafastExecutorOpts): DisposableExecutor | null;
|
|
17
|
+
export declare function hasPgPool(client: SqlClient): client is SqlClient & {
|
|
18
|
+
pgPool: Pool;
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GraphQLSchema } from 'graphql';
|
|
2
|
+
import type { MeshPgRegistry } from './pg-registry.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* Attach Grafast / `@dataplan/pg` plan resolvers for `@sql` query fields.
|
|
5
|
+
* Mutations keep traditional resolvers for this slice.
|
|
6
|
+
*/
|
|
7
|
+
export declare function wirePostgresSqlPlans(schema: GraphQLSchema, registry: MeshPgRegistry, meta: {
|
|
8
|
+
relationNames: Map<string, Map<string, {
|
|
9
|
+
remoteTable: string;
|
|
10
|
+
kind: 'ROW' | 'ROWS';
|
|
11
|
+
}>>;
|
|
12
|
+
}): GraphQLSchema;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GraphQLSchema } from 'graphql';
|
|
2
|
+
import type { MeshPgRegistry } from './pg-registry.js';
|
|
3
|
+
/**
|
|
4
|
+
* Attach Grafast / `@dataplan/pg` plan resolvers for `@sql` query fields.
|
|
5
|
+
* Mutations keep traditional resolvers for this slice.
|
|
6
|
+
*/
|
|
7
|
+
export declare function wirePostgresSqlPlans(schema: GraphQLSchema, registry: MeshPgRegistry, meta: {
|
|
8
|
+
relationNames: Map<string, Map<string, {
|
|
9
|
+
remoteTable: string;
|
|
10
|
+
kind: 'ROW' | 'ROWS';
|
|
11
|
+
}>>;
|
|
12
|
+
}): GraphQLSchema;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type GraphQLSchema } from 'graphql';
|
|
2
|
+
import { makeRegistry, PgExecutor } from '@dataplan/pg';
|
|
3
|
+
export type MeshPgRegistry = ReturnType<typeof makeRegistry>;
|
|
4
|
+
/**
|
|
5
|
+
* Build a `@dataplan/pg` registry from `@sql` directives on the subgraph schema.
|
|
6
|
+
* Attribute names are GraphQL field names; SQL columns are selected via expression.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildPgRegistryFromSqlSchema(schema: GraphQLSchema): {
|
|
9
|
+
registry: MeshPgRegistry;
|
|
10
|
+
executor: PgExecutor;
|
|
11
|
+
tableByType: Map<string, string>;
|
|
12
|
+
relationNames: Map<string, Map<string, {
|
|
13
|
+
remoteTable: string;
|
|
14
|
+
kind: 'ROW' | 'ROWS';
|
|
15
|
+
}>>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type GraphQLSchema } from 'graphql';
|
|
2
|
+
import { makeRegistry, PgExecutor } from '@dataplan/pg';
|
|
3
|
+
export type MeshPgRegistry = ReturnType<typeof makeRegistry>;
|
|
4
|
+
/**
|
|
5
|
+
* Build a `@dataplan/pg` registry from `@sql` directives on the subgraph schema.
|
|
6
|
+
* Attribute names are GraphQL field names; SQL columns are selected via expression.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildPgRegistryFromSqlSchema(schema: GraphQLSchema): {
|
|
9
|
+
registry: MeshPgRegistry;
|
|
10
|
+
executor: PgExecutor;
|
|
11
|
+
tableByType: Map<string, string>;
|
|
12
|
+
relationNames: Map<string, Map<string, {
|
|
13
|
+
remoteTable: string;
|
|
14
|
+
kind: 'ROW' | 'ROWS';
|
|
15
|
+
}>>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type GraphQLResolveInfo, type GraphQLSchema } from 'graphql';
|
|
2
|
+
import type { ParsedSqlMapping } from './types.cjs';
|
|
3
|
+
/** Parent objects stamped with GraphQL field names already satisfied by a JOIN. */
|
|
4
|
+
export declare const SQL_JOINED_FIELDS: unique symbol;
|
|
5
|
+
export interface BelongsToJoin {
|
|
6
|
+
fieldName: string;
|
|
7
|
+
table: string;
|
|
8
|
+
alias: string;
|
|
9
|
+
/** Alias of the FROM / join this join hangs off (`t` or a parent join alias). */
|
|
10
|
+
parentAlias: string;
|
|
11
|
+
/** Column on the joined table (left of `where` equality). */
|
|
12
|
+
joinColumn: string;
|
|
13
|
+
/** Column on the parent alias (from `$this.<field>` → parent selection). */
|
|
14
|
+
parentColumn: string;
|
|
15
|
+
selection: ParsedSqlMapping;
|
|
16
|
+
/** Nested belongs-to joins under this relation (multi-hop). */
|
|
17
|
+
joins: BelongsToJoin[];
|
|
18
|
+
}
|
|
19
|
+
export interface HasManySubselect {
|
|
20
|
+
fieldName: string;
|
|
21
|
+
table: string;
|
|
22
|
+
/** Column on the child table for the FK equality. */
|
|
23
|
+
joinColumn: string;
|
|
24
|
+
/** GraphQL field on parent → SQL column used in correlation. */
|
|
25
|
+
parentGraphqlField: string;
|
|
26
|
+
parentColumn: string;
|
|
27
|
+
selection: ParsedSqlMapping;
|
|
28
|
+
limit?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface SelectionPlan {
|
|
31
|
+
/** Root selection narrowed to requested scalar columns (+ FK keys for joins). */
|
|
32
|
+
selection: ParsedSqlMapping;
|
|
33
|
+
joins: BelongsToJoin[];
|
|
34
|
+
hasMany: HasManySubselect[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Look ahead in `info` and build a Graphile-style selection plan:
|
|
38
|
+
* - belongs-to (`ROW` + `$this`) → LEFT JOIN chain (including multi-hop)
|
|
39
|
+
* - has-many (`ROWS` + `$this` + simple equality) → correlated JSON subselect
|
|
40
|
+
* (falls back to DataLoader when args/filters make folding unsafe)
|
|
41
|
+
*/
|
|
42
|
+
export declare function planSelection(schema: GraphQLSchema, info: GraphQLResolveInfo, fullSelection: ParsedSqlMapping): SelectionPlan;
|
|
43
|
+
/** @deprecated use planSelection */
|
|
44
|
+
export declare function collectBelongsToJoins(schema: GraphQLSchema, info: GraphQLResolveInfo, parentSelection: ParsedSqlMapping): BelongsToJoin[];
|
|
45
|
+
export declare function flattenJoins(joins: BelongsToJoin[]): BelongsToJoin[];
|
|
46
|
+
export declare function stampJoinedFields<T extends Record<string, any>>(obj: T, joins: BelongsToJoin[]): T;
|
|
47
|
+
export declare function hasJoinedField(parent: any, fieldName: string): boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type GraphQLResolveInfo, type GraphQLSchema } from 'graphql';
|
|
2
|
+
import type { ParsedSqlMapping } from './types.js';
|
|
3
|
+
/** Parent objects stamped with GraphQL field names already satisfied by a JOIN. */
|
|
4
|
+
export declare const SQL_JOINED_FIELDS: unique symbol;
|
|
5
|
+
export interface BelongsToJoin {
|
|
6
|
+
fieldName: string;
|
|
7
|
+
table: string;
|
|
8
|
+
alias: string;
|
|
9
|
+
/** Alias of the FROM / join this join hangs off (`t` or a parent join alias). */
|
|
10
|
+
parentAlias: string;
|
|
11
|
+
/** Column on the joined table (left of `where` equality). */
|
|
12
|
+
joinColumn: string;
|
|
13
|
+
/** Column on the parent alias (from `$this.<field>` → parent selection). */
|
|
14
|
+
parentColumn: string;
|
|
15
|
+
selection: ParsedSqlMapping;
|
|
16
|
+
/** Nested belongs-to joins under this relation (multi-hop). */
|
|
17
|
+
joins: BelongsToJoin[];
|
|
18
|
+
}
|
|
19
|
+
export interface HasManySubselect {
|
|
20
|
+
fieldName: string;
|
|
21
|
+
table: string;
|
|
22
|
+
/** Column on the child table for the FK equality. */
|
|
23
|
+
joinColumn: string;
|
|
24
|
+
/** GraphQL field on parent → SQL column used in correlation. */
|
|
25
|
+
parentGraphqlField: string;
|
|
26
|
+
parentColumn: string;
|
|
27
|
+
selection: ParsedSqlMapping;
|
|
28
|
+
limit?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface SelectionPlan {
|
|
31
|
+
/** Root selection narrowed to requested scalar columns (+ FK keys for joins). */
|
|
32
|
+
selection: ParsedSqlMapping;
|
|
33
|
+
joins: BelongsToJoin[];
|
|
34
|
+
hasMany: HasManySubselect[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Look ahead in `info` and build a Graphile-style selection plan:
|
|
38
|
+
* - belongs-to (`ROW` + `$this`) → LEFT JOIN chain (including multi-hop)
|
|
39
|
+
* - has-many (`ROWS` + `$this` + simple equality) → correlated JSON subselect
|
|
40
|
+
* (falls back to DataLoader when args/filters make folding unsafe)
|
|
41
|
+
*/
|
|
42
|
+
export declare function planSelection(schema: GraphQLSchema, info: GraphQLResolveInfo, fullSelection: ParsedSqlMapping): SelectionPlan;
|
|
43
|
+
/** @deprecated use planSelection */
|
|
44
|
+
export declare function collectBelongsToJoins(schema: GraphQLSchema, info: GraphQLResolveInfo, parentSelection: ParsedSqlMapping): BelongsToJoin[];
|
|
45
|
+
export declare function flattenJoins(joins: BelongsToJoin[]): BelongsToJoin[];
|
|
46
|
+
export declare function stampJoinedFields<T extends Record<string, any>>(obj: T, joins: BelongsToJoin[]): T;
|
|
47
|
+
export declare function hasJoinedField(parent: any, fieldName: string): boolean;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type BelongsToJoin, type HasManySubselect } from './plan.cjs';
|
|
2
|
+
import type { ParsedSqlMapping, SqlAdapter, SqlMappingEntry, SqlQueryKind } from './types.cjs';
|
|
3
|
+
export interface BuiltQuery {
|
|
4
|
+
sql: string;
|
|
5
|
+
params: unknown[];
|
|
6
|
+
}
|
|
7
|
+
export type SqlPlannerKey = 'filter' | 'orderBy' | 'limit' | 'offset' | 'first' | 'after' | 'last' | 'before';
|
|
8
|
+
export type SqlPlanners = Partial<Record<SqlPlannerKey, string>>;
|
|
9
|
+
export interface SelectPlan {
|
|
10
|
+
table: string;
|
|
11
|
+
kind: SqlQueryKind;
|
|
12
|
+
selection: ParsedSqlMapping;
|
|
13
|
+
whereMapping: ParsedSqlMapping;
|
|
14
|
+
graphqlArgs: Record<string, any>;
|
|
15
|
+
parent?: Record<string, any>;
|
|
16
|
+
/**
|
|
17
|
+
* Explicit `@sql` planner binders (`filter: "$args.filter"`, …).
|
|
18
|
+
* Preferred over stuffing planner keys into `where`.
|
|
19
|
+
*/
|
|
20
|
+
planners?: SqlPlanners;
|
|
21
|
+
/** Belongs-to joins folded from GraphQL selection lookahead. */
|
|
22
|
+
joins?: BelongsToJoin[];
|
|
23
|
+
/** Has-many folded as correlated JSON subselects. */
|
|
24
|
+
hasMany?: HasManySubselect[];
|
|
25
|
+
}
|
|
26
|
+
export declare function buildSelect(adapter: SqlAdapter, plan: SelectPlan): BuiltQuery;
|
|
27
|
+
/**
|
|
28
|
+
* Escape a value embedded in a single-quoted SQL string literal.
|
|
29
|
+
* Backslashes must be escaped before quotes (CodeQL js/incomplete-sanitization).
|
|
30
|
+
*/
|
|
31
|
+
export declare function escapeSqlStringLiteral(value: string, style?: 'mysql' | 'sqlite'): string;
|
|
32
|
+
/**
|
|
33
|
+
* Batch helper: same filters/order/limit as `buildSelect`, but replace the single
|
|
34
|
+
* equality binder for `column` with `WHERE column IN (...)`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildSelectByColumnIn(adapter: SqlAdapter, plan: SelectPlan & {
|
|
37
|
+
column: string;
|
|
38
|
+
values: unknown[];
|
|
39
|
+
}): BuiltQuery;
|
|
40
|
+
export declare function buildInsert(adapter: SqlAdapter, table: string, setMapping: ParsedSqlMapping, graphqlArgs: Record<string, any>, returningColumns: string[]): BuiltQuery;
|
|
41
|
+
export declare function buildUpdate(adapter: SqlAdapter, table: string, setMapping: ParsedSqlMapping, whereMapping: ParsedSqlMapping, graphqlArgs: Record<string, any>, returningColumns: string[]): BuiltQuery;
|
|
42
|
+
export declare function buildDelete(adapter: SqlAdapter, table: string, whereMapping: ParsedSqlMapping, graphqlArgs: Record<string, any>): BuiltQuery;
|
|
43
|
+
export declare function encodeCursor(offset: number): string;
|
|
44
|
+
export declare function decodeCursor(cursor: string): number;
|
|
45
|
+
export declare function mapRowToGraphql(row: Record<string, unknown>, selection: ParsedSqlMapping): Record<string, unknown>;
|
|
46
|
+
export declare function mapRowToGraphqlWithJoins(row: Record<string, unknown>, selection: ParsedSqlMapping, joins: BelongsToJoin[], hasMany?: HasManySubselect[]): Record<string, unknown>;
|
|
47
|
+
export declare function selectionHasNested(selection: ParsedSqlMapping, key: string): boolean;
|
|
48
|
+
export declare function nestedSelection(selection: ParsedSqlMapping, key: string): ParsedSqlMapping;
|
|
49
|
+
export declare function collectReturningColumns(selection: ParsedSqlMapping): string[];
|
|
50
|
+
export declare function parseSqlDirectiveMappings(opts: {
|
|
51
|
+
where?: string | null;
|
|
52
|
+
set?: string | null;
|
|
53
|
+
selection?: string | null;
|
|
54
|
+
filter?: string | null;
|
|
55
|
+
orderBy?: string | null;
|
|
56
|
+
limit?: string | null;
|
|
57
|
+
offset?: string | null;
|
|
58
|
+
first?: string | null;
|
|
59
|
+
after?: string | null;
|
|
60
|
+
last?: string | null;
|
|
61
|
+
before?: string | null;
|
|
62
|
+
}): {
|
|
63
|
+
whereMapping: ParsedSqlMapping;
|
|
64
|
+
setMapping: ParsedSqlMapping;
|
|
65
|
+
selection: ParsedSqlMapping;
|
|
66
|
+
planners: Partial<Record<SqlPlannerKey, string>>;
|
|
67
|
+
};
|
|
68
|
+
/** @deprecated use parseSqlDirectiveMappings */
|
|
69
|
+
export declare function parseArgsAndSelection(argsStr?: string | null, selectionStr?: string | null): {
|
|
70
|
+
whereMapping: ParsedSqlMapping;
|
|
71
|
+
setMapping: ParsedSqlMapping;
|
|
72
|
+
selection: ParsedSqlMapping;
|
|
73
|
+
planners: Partial<Record<SqlPlannerKey, string>>;
|
|
74
|
+
};
|
|
75
|
+
export type { SqlMappingEntry };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type BelongsToJoin, type HasManySubselect } from './plan.js';
|
|
2
|
+
import type { ParsedSqlMapping, SqlAdapter, SqlMappingEntry, SqlQueryKind } from './types.js';
|
|
3
|
+
export interface BuiltQuery {
|
|
4
|
+
sql: string;
|
|
5
|
+
params: unknown[];
|
|
6
|
+
}
|
|
7
|
+
export type SqlPlannerKey = 'filter' | 'orderBy' | 'limit' | 'offset' | 'first' | 'after' | 'last' | 'before';
|
|
8
|
+
export type SqlPlanners = Partial<Record<SqlPlannerKey, string>>;
|
|
9
|
+
export interface SelectPlan {
|
|
10
|
+
table: string;
|
|
11
|
+
kind: SqlQueryKind;
|
|
12
|
+
selection: ParsedSqlMapping;
|
|
13
|
+
whereMapping: ParsedSqlMapping;
|
|
14
|
+
graphqlArgs: Record<string, any>;
|
|
15
|
+
parent?: Record<string, any>;
|
|
16
|
+
/**
|
|
17
|
+
* Explicit `@sql` planner binders (`filter: "$args.filter"`, …).
|
|
18
|
+
* Preferred over stuffing planner keys into `where`.
|
|
19
|
+
*/
|
|
20
|
+
planners?: SqlPlanners;
|
|
21
|
+
/** Belongs-to joins folded from GraphQL selection lookahead. */
|
|
22
|
+
joins?: BelongsToJoin[];
|
|
23
|
+
/** Has-many folded as correlated JSON subselects. */
|
|
24
|
+
hasMany?: HasManySubselect[];
|
|
25
|
+
}
|
|
26
|
+
export declare function buildSelect(adapter: SqlAdapter, plan: SelectPlan): BuiltQuery;
|
|
27
|
+
/**
|
|
28
|
+
* Escape a value embedded in a single-quoted SQL string literal.
|
|
29
|
+
* Backslashes must be escaped before quotes (CodeQL js/incomplete-sanitization).
|
|
30
|
+
*/
|
|
31
|
+
export declare function escapeSqlStringLiteral(value: string, style?: 'mysql' | 'sqlite'): string;
|
|
32
|
+
/**
|
|
33
|
+
* Batch helper: same filters/order/limit as `buildSelect`, but replace the single
|
|
34
|
+
* equality binder for `column` with `WHERE column IN (...)`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildSelectByColumnIn(adapter: SqlAdapter, plan: SelectPlan & {
|
|
37
|
+
column: string;
|
|
38
|
+
values: unknown[];
|
|
39
|
+
}): BuiltQuery;
|
|
40
|
+
export declare function buildInsert(adapter: SqlAdapter, table: string, setMapping: ParsedSqlMapping, graphqlArgs: Record<string, any>, returningColumns: string[]): BuiltQuery;
|
|
41
|
+
export declare function buildUpdate(adapter: SqlAdapter, table: string, setMapping: ParsedSqlMapping, whereMapping: ParsedSqlMapping, graphqlArgs: Record<string, any>, returningColumns: string[]): BuiltQuery;
|
|
42
|
+
export declare function buildDelete(adapter: SqlAdapter, table: string, whereMapping: ParsedSqlMapping, graphqlArgs: Record<string, any>): BuiltQuery;
|
|
43
|
+
export declare function encodeCursor(offset: number): string;
|
|
44
|
+
export declare function decodeCursor(cursor: string): number;
|
|
45
|
+
export declare function mapRowToGraphql(row: Record<string, unknown>, selection: ParsedSqlMapping): Record<string, unknown>;
|
|
46
|
+
export declare function mapRowToGraphqlWithJoins(row: Record<string, unknown>, selection: ParsedSqlMapping, joins: BelongsToJoin[], hasMany?: HasManySubselect[]): Record<string, unknown>;
|
|
47
|
+
export declare function selectionHasNested(selection: ParsedSqlMapping, key: string): boolean;
|
|
48
|
+
export declare function nestedSelection(selection: ParsedSqlMapping, key: string): ParsedSqlMapping;
|
|
49
|
+
export declare function collectReturningColumns(selection: ParsedSqlMapping): string[];
|
|
50
|
+
export declare function parseSqlDirectiveMappings(opts: {
|
|
51
|
+
where?: string | null;
|
|
52
|
+
set?: string | null;
|
|
53
|
+
selection?: string | null;
|
|
54
|
+
filter?: string | null;
|
|
55
|
+
orderBy?: string | null;
|
|
56
|
+
limit?: string | null;
|
|
57
|
+
offset?: string | null;
|
|
58
|
+
first?: string | null;
|
|
59
|
+
after?: string | null;
|
|
60
|
+
last?: string | null;
|
|
61
|
+
before?: string | null;
|
|
62
|
+
}): {
|
|
63
|
+
whereMapping: ParsedSqlMapping;
|
|
64
|
+
setMapping: ParsedSqlMapping;
|
|
65
|
+
selection: ParsedSqlMapping;
|
|
66
|
+
planners: Partial<Record<SqlPlannerKey, string>>;
|
|
67
|
+
};
|
|
68
|
+
/** @deprecated use parseSqlDirectiveMappings */
|
|
69
|
+
export declare function parseArgsAndSelection(argsStr?: string | null, selectionStr?: string | null): {
|
|
70
|
+
whereMapping: ParsedSqlMapping;
|
|
71
|
+
setMapping: ParsedSqlMapping;
|
|
72
|
+
selection: ParsedSqlMapping;
|
|
73
|
+
planners: Partial<Record<SqlPlannerKey, string>>;
|
|
74
|
+
};
|
|
75
|
+
export type { SqlMappingEntry };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type SqlAdapter = 'postgres' | 'mysql' | 'sqlite';
|
|
2
|
+
export type SqlQueryKind = 'ROW' | 'ROWS' | 'CONNECTION' | 'COUNT';
|
|
3
|
+
export type SqlMutationKind = 'INSERT' | 'UPDATE' | 'DELETE';
|
|
4
|
+
/** Combined ` @sql` kind (reads + writes). */
|
|
5
|
+
export type SqlKind = SqlQueryKind | SqlMutationKind;
|
|
6
|
+
/**
|
|
7
|
+
* Bun SQL–inspired connection / pool options stored on `@transport(options:)`.
|
|
8
|
+
* Only the fields we can honour on Node (`pg` / `mysql2` / `node:sqlite`) or
|
|
9
|
+
* forward to `Bun.SQL` when present are included.
|
|
10
|
+
*/
|
|
11
|
+
export interface SqlTransportOptions {
|
|
12
|
+
adapter?: SqlAdapter;
|
|
13
|
+
/** Max pool size (default 10). Maps to Bun `max`, mysql2 `connectionLimit`, pg `max`. */
|
|
14
|
+
max?: number;
|
|
15
|
+
/** Idle connection lifetime in seconds (0 = off). Bun `idleTimeout`. */
|
|
16
|
+
idleTimeout?: number;
|
|
17
|
+
/** Seconds to wait for a new connection (default 30). Bun `connectionTimeout`. */
|
|
18
|
+
connectionTimeout?: number;
|
|
19
|
+
/** Enable TLS / SSL (`true` or Bun-style mode string). */
|
|
20
|
+
tls?: boolean | string;
|
|
21
|
+
}
|
|
22
|
+
export interface SqlMappingValue {
|
|
23
|
+
kind: 'column' | 'pseudo' | 'args' | 'this' | 'literal';
|
|
24
|
+
/** SQL column name, pseudo token ($cursor), or path after $args / $this */
|
|
25
|
+
value: string;
|
|
26
|
+
/** Nested path segments for $args.input.title -> ['input','title'] */
|
|
27
|
+
path?: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface SqlMappingEntry {
|
|
30
|
+
/** GraphQL field name, planner key (filter/orderBy/...), or SQL column on the left of args */
|
|
31
|
+
key: string;
|
|
32
|
+
value?: SqlMappingValue;
|
|
33
|
+
children?: SqlMappingEntry[];
|
|
34
|
+
}
|
|
35
|
+
export interface ParsedSqlMapping {
|
|
36
|
+
entries: SqlMappingEntry[];
|
|
37
|
+
}
|
|
38
|
+
export interface SqlClient {
|
|
39
|
+
readonly adapter: SqlAdapter;
|
|
40
|
+
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<{
|
|
41
|
+
rows: T[];
|
|
42
|
+
rowCount: number;
|
|
43
|
+
}>;
|
|
44
|
+
dispose(): void | Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Node `pg.Pool` when using the postgres adapter (required for the
|
|
47
|
+
* Grafast / `@dataplan/pg` fast path). Absent for Bun.SQL / mysql / sqlite.
|
|
48
|
+
*/
|
|
49
|
+
pgPool?: import('pg').Pool;
|
|
50
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type SqlAdapter = 'postgres' | 'mysql' | 'sqlite';
|
|
2
|
+
export type SqlQueryKind = 'ROW' | 'ROWS' | 'CONNECTION' | 'COUNT';
|
|
3
|
+
export type SqlMutationKind = 'INSERT' | 'UPDATE' | 'DELETE';
|
|
4
|
+
/** Combined ` @sql` kind (reads + writes). */
|
|
5
|
+
export type SqlKind = SqlQueryKind | SqlMutationKind;
|
|
6
|
+
/**
|
|
7
|
+
* Bun SQL–inspired connection / pool options stored on `@transport(options:)`.
|
|
8
|
+
* Only the fields we can honour on Node (`pg` / `mysql2` / `node:sqlite`) or
|
|
9
|
+
* forward to `Bun.SQL` when present are included.
|
|
10
|
+
*/
|
|
11
|
+
export interface SqlTransportOptions {
|
|
12
|
+
adapter?: SqlAdapter;
|
|
13
|
+
/** Max pool size (default 10). Maps to Bun `max`, mysql2 `connectionLimit`, pg `max`. */
|
|
14
|
+
max?: number;
|
|
15
|
+
/** Idle connection lifetime in seconds (0 = off). Bun `idleTimeout`. */
|
|
16
|
+
idleTimeout?: number;
|
|
17
|
+
/** Seconds to wait for a new connection (default 30). Bun `connectionTimeout`. */
|
|
18
|
+
connectionTimeout?: number;
|
|
19
|
+
/** Enable TLS / SSL (`true` or Bun-style mode string). */
|
|
20
|
+
tls?: boolean | string;
|
|
21
|
+
}
|
|
22
|
+
export interface SqlMappingValue {
|
|
23
|
+
kind: 'column' | 'pseudo' | 'args' | 'this' | 'literal';
|
|
24
|
+
/** SQL column name, pseudo token ($cursor), or path after $args / $this */
|
|
25
|
+
value: string;
|
|
26
|
+
/** Nested path segments for $args.input.title -> ['input','title'] */
|
|
27
|
+
path?: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface SqlMappingEntry {
|
|
30
|
+
/** GraphQL field name, planner key (filter/orderBy/...), or SQL column on the left of args */
|
|
31
|
+
key: string;
|
|
32
|
+
value?: SqlMappingValue;
|
|
33
|
+
children?: SqlMappingEntry[];
|
|
34
|
+
}
|
|
35
|
+
export interface ParsedSqlMapping {
|
|
36
|
+
entries: SqlMappingEntry[];
|
|
37
|
+
}
|
|
38
|
+
export interface SqlClient {
|
|
39
|
+
readonly adapter: SqlAdapter;
|
|
40
|
+
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<{
|
|
41
|
+
rows: T[];
|
|
42
|
+
rowCount: number;
|
|
43
|
+
}>;
|
|
44
|
+
dispose(): void | Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Node `pg.Pool` when using the postgres adapter (required for the
|
|
47
|
+
* Grafast / `@dataplan/pg` fast path). Absent for Bun.SQL / mysql / sqlite.
|
|
48
|
+
*/
|
|
49
|
+
pgPool?: import('pg').Pool;
|
|
50
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SqlAdapter } from './types.cjs';
|
|
2
|
+
export interface ParsedSqlUri {
|
|
3
|
+
adapter: SqlAdapter;
|
|
4
|
+
user?: string;
|
|
5
|
+
password?: string;
|
|
6
|
+
host?: string;
|
|
7
|
+
port?: number;
|
|
8
|
+
database?: string;
|
|
9
|
+
ssl?: boolean;
|
|
10
|
+
/** Absolute or relative file path for sqlite */
|
|
11
|
+
filePath?: string;
|
|
12
|
+
searchParams: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export type EnvLike = Record<string, string | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Bun-compatible connection URL env vars, in precedence order.
|
|
17
|
+
* @see https://bun.com/docs/runtime/sql
|
|
18
|
+
*/
|
|
19
|
+
export declare const SQL_URL_ENV_VARS: readonly ['DATABASE_URL', 'TLS_DATABASE_URL', 'POSTGRES_URL', 'PGURL', 'PG_URL', 'TLS_POSTGRES_DATABASE_URL', 'MYSQL_URL', 'TLS_MYSQL_DATABASE_URL', 'MARIADB_URL', 'TLS_MARIADB_DATABASE_URL', 'SQLITE_URL'];
|
|
20
|
+
/**
|
|
21
|
+
* Resolve a connection string from the environment the way Bun SQL does:
|
|
22
|
+
* URL vars first, then (when no URL) a postgres URL composed from `PG*` fields.
|
|
23
|
+
*
|
|
24
|
+
* `TLS_*` URLs get `sslmode=require` unless the URL already names an ssl mode.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveConnectionStringFromEnv(env?: EnvLike, opts?: {
|
|
27
|
+
adapter?: SqlAdapter;
|
|
28
|
+
}): string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Detect adapter from a connection string protocol — Bun SQL–compatible.
|
|
31
|
+
*
|
|
32
|
+
* | Connection string | Adapter |
|
|
33
|
+
* | --- | --- |
|
|
34
|
+
* | `postgres://`, `postgresql://`, or host-style with no protocol | postgres |
|
|
35
|
+
* | `mysql://`, `mysql2://`, `mysqls://`, `mariadb://` | mysql |
|
|
36
|
+
* | `sqlite://`, `sqlite:`, `file://`, `file:`, `:memory:` | sqlite |
|
|
37
|
+
*
|
|
38
|
+
* Unknown protocols throw. Plain `*.db` / `*.sqlite` paths are treated as sqlite
|
|
39
|
+
* (Mesh convenience; Bun would require an explicit adapter for bare filenames).
|
|
40
|
+
*/
|
|
41
|
+
export declare function inferAdapterFromConnectionString(location: string): SqlAdapter;
|
|
42
|
+
export declare function parseSqlUri(location: string): ParsedSqlUri;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { SqlAdapter } from './types.js';
|
|
2
|
+
export interface ParsedSqlUri {
|
|
3
|
+
adapter: SqlAdapter;
|
|
4
|
+
user?: string;
|
|
5
|
+
password?: string;
|
|
6
|
+
host?: string;
|
|
7
|
+
port?: number;
|
|
8
|
+
database?: string;
|
|
9
|
+
ssl?: boolean;
|
|
10
|
+
/** Absolute or relative file path for sqlite */
|
|
11
|
+
filePath?: string;
|
|
12
|
+
searchParams: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export type EnvLike = Record<string, string | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Bun-compatible connection URL env vars, in precedence order.
|
|
17
|
+
* @see https://bun.com/docs/runtime/sql
|
|
18
|
+
*/
|
|
19
|
+
export declare const SQL_URL_ENV_VARS: readonly ['DATABASE_URL', 'TLS_DATABASE_URL', 'POSTGRES_URL', 'PGURL', 'PG_URL', 'TLS_POSTGRES_DATABASE_URL', 'MYSQL_URL', 'TLS_MYSQL_DATABASE_URL', 'MARIADB_URL', 'TLS_MARIADB_DATABASE_URL', 'SQLITE_URL'];
|
|
20
|
+
/**
|
|
21
|
+
* Resolve a connection string from the environment the way Bun SQL does:
|
|
22
|
+
* URL vars first, then (when no URL) a postgres URL composed from `PG*` fields.
|
|
23
|
+
*
|
|
24
|
+
* `TLS_*` URLs get `sslmode=require` unless the URL already names an ssl mode.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveConnectionStringFromEnv(env?: EnvLike, opts?: {
|
|
27
|
+
adapter?: SqlAdapter;
|
|
28
|
+
}): string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Detect adapter from a connection string protocol — Bun SQL–compatible.
|
|
31
|
+
*
|
|
32
|
+
* | Connection string | Adapter |
|
|
33
|
+
* | --- | --- |
|
|
34
|
+
* | `postgres://`, `postgresql://`, or host-style with no protocol | postgres |
|
|
35
|
+
* | `mysql://`, `mysql2://`, `mysqls://`, `mariadb://` | mysql |
|
|
36
|
+
* | `sqlite://`, `sqlite:`, `file://`, `file:`, `:memory:` | sqlite |
|
|
37
|
+
*
|
|
38
|
+
* Unknown protocols throw. Plain `*.db` / `*.sqlite` paths are treated as sqlite
|
|
39
|
+
* (Mesh convenience; Bun would require an explicit adapter for bare filenames).
|
|
40
|
+
*/
|
|
41
|
+
export declare function inferAdapterFromConnectionString(location: string): SqlAdapter;
|
|
42
|
+
export declare function parseSqlUri(location: string): ParsedSqlUri;
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/transport-sql",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "ardatan/graphql-mesh",
|
|
8
|
+
"directory": "packages/transports/sql"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=22.18.0"
|
|
13
|
+
},
|
|
14
|
+
"main": "dist/cjs/index.js",
|
|
15
|
+
"module": "dist/esm/index.js",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/typings/index.d.cts",
|
|
20
|
+
"default": "./dist/cjs/index.js"
|
|
21
|
+
},
|
|
22
|
+
"import": {
|
|
23
|
+
"types": "./dist/typings/index.d.ts",
|
|
24
|
+
"default": "./dist/esm/index.js"
|
|
25
|
+
},
|
|
26
|
+
"default": {
|
|
27
|
+
"types": "./dist/typings/index.d.ts",
|
|
28
|
+
"default": "./dist/esm/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"typings": "dist/typings/index.d.ts",
|
|
34
|
+
"scripts": {
|
|
35
|
+
"test:bun": "bun test ./test/client.bun.test.ts"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"graphql": "^16.0.0 || ^17.0.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@apollo/subgraph": "^2.16.0",
|
|
42
|
+
"@dataplan/pg": "^1.2.1",
|
|
43
|
+
"@graphql-mesh/transport-common": "^1.1.2",
|
|
44
|
+
"@graphql-mesh/utils": "^0.107.3",
|
|
45
|
+
"@graphql-tools/utils": "^13.2.2",
|
|
46
|
+
"@whatwg-node/disposablestack": "^0.1.0",
|
|
47
|
+
"@whatwg-node/promise-helpers": "^2.0.1",
|
|
48
|
+
"dataloader": "^2.2.2",
|
|
49
|
+
"grafast": "^1.2.0",
|
|
50
|
+
"graphile-config": "^0.0.1-beta.14",
|
|
51
|
+
"mysql2": "^3.14.0",
|
|
52
|
+
"pg": "^8.23.1",
|
|
53
|
+
"pg-sql2": "^5.0.2",
|
|
54
|
+
"tslib": "^2.4.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@omnigraph/sql": "workspace:*",
|
|
58
|
+
"@types/pg": "^8.15.4",
|
|
59
|
+
"graphql": "16.14.0"
|
|
60
|
+
},
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public",
|
|
63
|
+
"directory": "dist"
|
|
64
|
+
},
|
|
65
|
+
"sideEffects": false,
|
|
66
|
+
"typescript": {
|
|
67
|
+
"definition": "dist/typings/index.d.ts"
|
|
68
|
+
}
|
|
69
|
+
}
|