v2.0.0-beta.3
版本发布时间: 2023-08-18 00:48:16
MichalLytek/type-graphql最新发布版本:v2.0.0-rc.2(2024-06-07 20:27:54)
Features
-
Breaking Change: update
graphql-js
peer dependency to^16.7.1
-
Breaking Change: upgrade
ArgumentValidationError
and replaceUnauthorizedError
andForbiddenError
withAuthenticationError
,AuthorizationError
that are extendingGraphQLError
to let the error details be accessible in theextensions
property -
Breaking Change: change
ClassType
constraint fromClassType<T = any>
toClassType<T extends object = object>
in order to make it work properly with new TS features -
Breaking Change: remove
dateScalarMode
option frombuildSchema
-
Breaking Change: make
graphql-scalars
package a peer dependency and use date scalars from it instead of custom ones -
Breaking Change: exported
GraphQLISODateTime
scalar has now a nameDateTimeISO
-
Breaking Change: change
ValidatorFn
signature fromValidatorFn<TArgs>
toValidatorFn<TContext>
- support custom validation function getting resolver data on validate
- bring compatibility with the ESM ecosystem by exposing the double bundle of the
type-graphql
package (CJS and ESM versions)
Fixes
- allow
ValidatorFn
to accept array of values (instead of onlyobject | undefined
)