@vantreeseba/drizzle-graphql 8.0.0 → 8.2.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/README.md +13 -1
- package/dist/README.md +13 -1
- package/dist/index.cjs +2059 -2454
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +1944 -2339
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -3
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { Column, Table, Relation, SQL, TablesRelationalConfig, One, Many } from
|
|
|
2
2
|
import { MySqlDatabase } from 'drizzle-orm/mysql-core';
|
|
3
3
|
import { PgAsyncDatabase } from 'drizzle-orm/pg-core';
|
|
4
4
|
import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
5
|
-
import { GraphQLError, GraphQLScalarType, GraphQLOutputType, GraphQLInputType, GraphQLFieldResolver, GraphQLResolveInfo, GraphQLSchema, GraphQLInputObjectType, GraphQLObjectType, GraphQLNonNull, GraphQLList, GraphQLEnumType } from 'graphql';
|
|
5
|
+
import { ASTNode, GraphQLError, GraphQLScalarType, GraphQLOutputType, GraphQLInputType, GraphQLFieldResolver, GraphQLResolveInfo, GraphQLSchema, GraphQLInputObjectType, GraphQLObjectType, GraphQLNonNull, GraphQLList, GraphQLEnumType } from 'graphql';
|
|
6
6
|
import { ResolveTree } from 'graphql-parse-resolve-info';
|
|
7
7
|
export { GraphQLDate, GraphQLDateTime, GraphQLJSON, GraphQLUUID } from 'graphql-scalars';
|
|
8
8
|
|
|
@@ -154,6 +154,12 @@ type DrizzleErrorCode =
|
|
|
154
154
|
| 'DRIZZLE_INVALID_DISTINCT'
|
|
155
155
|
/** An `onConflict` named a target or update column the upsert cannot use. */
|
|
156
156
|
| 'DRIZZLE_INVALID_ON_CONFLICT'
|
|
157
|
+
/** A written value could not be converted to what its column stores. */
|
|
158
|
+
| 'DRIZZLE_INVALID_INPUT_VALUE'
|
|
159
|
+
/** A write's input named a key that is not a column of the table. */
|
|
160
|
+
| 'DRIZZLE_UNKNOWN_COLUMN'
|
|
161
|
+
/** A stored value could not be represented by the scalar that transports it. */
|
|
162
|
+
| 'DRIZZLE_UNREPRESENTABLE_VALUE'
|
|
157
163
|
/** The request's shared mutation transaction was rolled back, so this field never ran. */
|
|
158
164
|
| 'DRIZZLE_TRANSACTION_ABORTED';
|
|
159
165
|
/**
|
|
@@ -179,8 +185,10 @@ type DrizzleErrorContext = {
|
|
|
179
185
|
* meant for a client; `extensions.code` classifies it and `extensions.drizzle` says which
|
|
180
186
|
* table, operation and generated field it came from.
|
|
181
187
|
*/
|
|
182
|
-
declare const drizzleError: (message: string, { code, ...context }: DrizzleErrorContext & {
|
|
188
|
+
declare const drizzleError: (message: string, { code, nodes, ...context }: DrizzleErrorContext & {
|
|
183
189
|
code: DrizzleErrorCode;
|
|
190
|
+
/** The AST the error is about, where the throw site has one — it becomes the `locations`. */
|
|
191
|
+
nodes?: ASTNode | readonly ASTNode[];
|
|
184
192
|
}) => GraphQLError;
|
|
185
193
|
/**
|
|
186
194
|
* Default for `config.onError`: keeps drizzle-graphql's own errors, which are written for
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Column, Table, Relation, SQL, TablesRelationalConfig, One, Many } from
|
|
|
2
2
|
import { MySqlDatabase } from 'drizzle-orm/mysql-core';
|
|
3
3
|
import { PgAsyncDatabase } from 'drizzle-orm/pg-core';
|
|
4
4
|
import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
5
|
-
import { GraphQLError, GraphQLScalarType, GraphQLOutputType, GraphQLInputType, GraphQLFieldResolver, GraphQLResolveInfo, GraphQLSchema, GraphQLInputObjectType, GraphQLObjectType, GraphQLNonNull, GraphQLList, GraphQLEnumType } from 'graphql';
|
|
5
|
+
import { ASTNode, GraphQLError, GraphQLScalarType, GraphQLOutputType, GraphQLInputType, GraphQLFieldResolver, GraphQLResolveInfo, GraphQLSchema, GraphQLInputObjectType, GraphQLObjectType, GraphQLNonNull, GraphQLList, GraphQLEnumType } from 'graphql';
|
|
6
6
|
import { ResolveTree } from 'graphql-parse-resolve-info';
|
|
7
7
|
export { GraphQLDate, GraphQLDateTime, GraphQLJSON, GraphQLUUID } from 'graphql-scalars';
|
|
8
8
|
|
|
@@ -154,6 +154,12 @@ type DrizzleErrorCode =
|
|
|
154
154
|
| 'DRIZZLE_INVALID_DISTINCT'
|
|
155
155
|
/** An `onConflict` named a target or update column the upsert cannot use. */
|
|
156
156
|
| 'DRIZZLE_INVALID_ON_CONFLICT'
|
|
157
|
+
/** A written value could not be converted to what its column stores. */
|
|
158
|
+
| 'DRIZZLE_INVALID_INPUT_VALUE'
|
|
159
|
+
/** A write's input named a key that is not a column of the table. */
|
|
160
|
+
| 'DRIZZLE_UNKNOWN_COLUMN'
|
|
161
|
+
/** A stored value could not be represented by the scalar that transports it. */
|
|
162
|
+
| 'DRIZZLE_UNREPRESENTABLE_VALUE'
|
|
157
163
|
/** The request's shared mutation transaction was rolled back, so this field never ran. */
|
|
158
164
|
| 'DRIZZLE_TRANSACTION_ABORTED';
|
|
159
165
|
/**
|
|
@@ -179,8 +185,10 @@ type DrizzleErrorContext = {
|
|
|
179
185
|
* meant for a client; `extensions.code` classifies it and `extensions.drizzle` says which
|
|
180
186
|
* table, operation and generated field it came from.
|
|
181
187
|
*/
|
|
182
|
-
declare const drizzleError: (message: string, { code, ...context }: DrizzleErrorContext & {
|
|
188
|
+
declare const drizzleError: (message: string, { code, nodes, ...context }: DrizzleErrorContext & {
|
|
183
189
|
code: DrizzleErrorCode;
|
|
190
|
+
/** The AST the error is about, where the throw site has one — it becomes the `locations`. */
|
|
191
|
+
nodes?: ASTNode | readonly ASTNode[];
|
|
184
192
|
}) => GraphQLError;
|
|
185
193
|
/**
|
|
186
194
|
* Default for `config.onError`: keeps drizzle-graphql's own errors, which are written for
|