@pothos/plugin-drizzle 0.17.2 → 0.17.4
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 +15 -0
- package/dts/connection-helpers.d.ts +7 -7
- package/dts/connection-helpers.d.ts.map +1 -1
- package/dts/drizzle-field-builder.d.ts +35 -20
- package/dts/drizzle-field-builder.d.ts.map +1 -1
- package/dts/global-types.d.ts.map +1 -1
- package/dts/index.d.ts.map +1 -1
- package/dts/interface-ref.d.ts.map +1 -1
- package/dts/model-loader.d.ts.map +1 -1
- package/dts/node-ref.d.ts.map +1 -1
- package/dts/object-ref.d.ts.map +1 -1
- package/dts/types.d.ts +1 -4
- package/dts/types.d.ts.map +1 -1
- package/dts/utils/config.d.ts +0 -6
- package/dts/utils/config.d.ts.map +1 -1
- package/dts/utils/cursors.d.ts +1 -1
- package/dts/utils/cursors.d.ts.map +1 -1
- package/dts/utils/map-query.d.ts +1 -1
- package/dts/utils/map-query.d.ts.map +1 -1
- package/esm/connection-helpers.d.ts +1 -1
- package/esm/connection-helpers.d.ts.map +1 -1
- package/esm/drizzle-field-builder.d.ts +75 -30
- package/esm/drizzle-field-builder.d.ts.map +1 -1
- package/esm/global-types.d.ts.map +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/interface-ref.d.ts.map +1 -1
- package/esm/model-loader.d.ts.map +1 -1
- package/esm/node-ref.d.ts.map +1 -1
- package/esm/object-ref.d.ts.map +1 -1
- package/esm/types.d.ts +1 -4
- package/esm/types.d.ts.map +1 -1
- package/esm/types.js.map +1 -1
- package/esm/utils/config.d.ts +0 -6
- package/esm/utils/config.d.ts.map +1 -1
- package/esm/utils/cursors.d.ts +1 -1
- package/esm/utils/cursors.d.ts.map +1 -1
- package/esm/utils/map-query.d.ts +1 -1
- package/esm/utils/map-query.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +7 -7
- package/src/types.ts +2 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pothos/plugin-drizzle",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
4
4
|
"description": "A Pothos plugin for drizzle",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./dts/index.d.ts",
|
|
@@ -41,26 +41,26 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@libsql/client": "^0.17.2",
|
|
43
43
|
"drizzle-graphql": "^0.8.5",
|
|
44
|
-
"drizzle-kit": "1.0.0-
|
|
45
|
-
"drizzle-orm": "1.0.0-
|
|
44
|
+
"drizzle-kit": "1.0.0-rc.2",
|
|
45
|
+
"drizzle-orm": "1.0.0-rc.2",
|
|
46
46
|
"graphql-scalars": "^1.25.0",
|
|
47
47
|
"graphql-tag": "^2.12.6",
|
|
48
48
|
"postgres": "^3.4.9",
|
|
49
|
+
"@pothos/core": "4.12.0",
|
|
49
50
|
"@pothos/plugin-add-graphql": "4.3.0",
|
|
50
|
-
"@pothos/plugin-relay": "4.7.0",
|
|
51
51
|
"@pothos/plugin-errors": "4.9.0",
|
|
52
|
+
"@pothos/plugin-relay": "4.7.0",
|
|
52
53
|
"@pothos/plugin-scope-auth": "4.1.6",
|
|
53
|
-
"@pothos/core": "4.12.0",
|
|
54
54
|
"@pothos/plugin-with-input": "4.1.4",
|
|
55
55
|
"@pothos/test-utils": "2.1.3"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
|
-
"type": "
|
|
58
|
+
"type": "tsgo --project tsconfig.type.json",
|
|
59
59
|
"build": "pnpm build:clean && pnpm build:cjs && pnpm build:dts && pnpm build:esm",
|
|
60
60
|
"build:clean": "git clean -dfX esm lib",
|
|
61
61
|
"build:cjs": "swc src -d lib --config-file ../../.swcrc -C module.type=commonjs --strip-leading-paths",
|
|
62
62
|
"build:esm": "cp -r dts/* esm/ && swc src -d esm --config-file ../../.swcrc -C module.type=es6 --strip-leading-paths && pnpm esm:extensions",
|
|
63
|
-
"build:dts": "
|
|
63
|
+
"build:dts": "tsgo",
|
|
64
64
|
"esm:extensions": "TS_NODE_PROJECT=../../tsconfig.json node -r @swc-node/register ../../scripts/esm-transformer.ts",
|
|
65
65
|
"test": "pnpm vitest --run"
|
|
66
66
|
}
|
package/src/types.ts
CHANGED
|
@@ -58,9 +58,6 @@ export interface PathInfo {
|
|
|
58
58
|
|
|
59
59
|
export type DrizzleClient<TCountSource = Table | SQL | SQLWrapper> = {
|
|
60
60
|
readonly _: {
|
|
61
|
-
readonly schema: unknown;
|
|
62
|
-
readonly fullSchema: Record<string, unknown>;
|
|
63
|
-
readonly tableNamesMap: Record<string, string>;
|
|
64
61
|
readonly relations: AnyRelations;
|
|
65
62
|
};
|
|
66
63
|
query: {};
|
|
@@ -236,8 +233,8 @@ export type DrizzleFieldOptions<
|
|
|
236
233
|
> & {
|
|
237
234
|
type: Param;
|
|
238
235
|
resolve: (
|
|
239
|
-
query: <T
|
|
240
|
-
selection?: T,
|
|
236
|
+
query: <T = {}>(
|
|
237
|
+
selection?: T & QueryForDrizzleField<Types, Param, Table>,
|
|
241
238
|
) => Omit<T, 'columns' | 'extra'> & {
|
|
242
239
|
columns: T extends { columns: infer C extends {} } ? C : {};
|
|
243
240
|
extras: {
|