pothos-drizzle-generator 0.1.7 → 0.1.8
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.
|
@@ -2,7 +2,7 @@ import type { SchemaTypes } from "@pothos/core";
|
|
|
2
2
|
import type { PothosDrizzleGenerator } from "./PothosDrizzleGenerator.js";
|
|
3
3
|
import type { DBQueryConfigColumns, GetTableViewFieldSelection, RelationsFilter, SchemaEntry } from "drizzle-orm";
|
|
4
4
|
import type { Operation, OperationBasic } from "./libs/operations.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { PgTable, PgUpdateSetSource } from "drizzle-orm/pg-core";
|
|
6
6
|
declare global {
|
|
7
7
|
export namespace PothosSchemaTypes {
|
|
8
8
|
interface Plugins<Types extends SchemaTypes, T extends object = object> {
|
|
@@ -78,7 +78,7 @@ declare global {
|
|
|
78
78
|
ctx: Types["Context"];
|
|
79
79
|
modelName: U;
|
|
80
80
|
operation: (typeof OperationBasic)[number];
|
|
81
|
-
}) =>
|
|
81
|
+
}) => PgUpdateSetSource<Relations<Types>[U]["table"] extends PgTable ? Relations<Types>[U]["table"] : never> | undefined;
|
|
82
82
|
};
|
|
83
83
|
models?: {
|
|
84
84
|
[U in TableNames<Types>]?: {
|
|
@@ -137,7 +137,7 @@ declare global {
|
|
|
137
137
|
ctx: Types["Context"];
|
|
138
138
|
modelName: U;
|
|
139
139
|
operation: (typeof OperationBasic)[number];
|
|
140
|
-
}) =>
|
|
140
|
+
}) => PgUpdateSetSource<Relations<Types>[U]["table"] extends PgTable<any> ? Relations<Types>[U]["table"] : never> | undefined;
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
143
|
};
|
|
@@ -2,7 +2,7 @@ import type { SchemaTypes } from "@pothos/core";
|
|
|
2
2
|
import type { PothosDrizzleGenerator } from "./PothosDrizzleGenerator.js";
|
|
3
3
|
import type { DBQueryConfigColumns, GetTableViewFieldSelection, RelationsFilter, SchemaEntry } from "drizzle-orm";
|
|
4
4
|
import type { Operation, OperationBasic } from "./libs/operations.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { PgTable, PgUpdateSetSource } from "drizzle-orm/pg-core";
|
|
6
6
|
declare global {
|
|
7
7
|
export namespace PothosSchemaTypes {
|
|
8
8
|
interface Plugins<Types extends SchemaTypes, T extends object = object> {
|
|
@@ -78,7 +78,7 @@ declare global {
|
|
|
78
78
|
ctx: Types["Context"];
|
|
79
79
|
modelName: U;
|
|
80
80
|
operation: (typeof OperationBasic)[number];
|
|
81
|
-
}) =>
|
|
81
|
+
}) => PgUpdateSetSource<Relations<Types>[U]["table"] extends PgTable ? Relations<Types>[U]["table"] : never> | undefined;
|
|
82
82
|
};
|
|
83
83
|
models?: {
|
|
84
84
|
[U in TableNames<Types>]?: {
|
|
@@ -137,7 +137,7 @@ declare global {
|
|
|
137
137
|
ctx: Types["Context"];
|
|
138
138
|
modelName: U;
|
|
139
139
|
operation: (typeof OperationBasic)[number];
|
|
140
|
-
}) =>
|
|
140
|
+
}) => PgUpdateSetSource<Relations<Types>[U]["table"] extends PgTable<any> ? Relations<Types>[U]["table"] : never> | undefined;
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
143
|
};
|