v2.0.0-beta.2
版本发布时间: 2023-05-16 16:40:02
MichalLytek/type-graphql最新发布版本:v2.0.0-rc.2(2024-06-07 20:27:54)
Features
-
Breaking Change:
AuthChecker
type is now "function or class" - update toAuthCheckerFn
if the function form is needed in the code -
Breaking Change: update
graphql-js
peer dependency to^16.6.0
-
Breaking Change:
buildSchemaSync
is now also checking the generated schema for errors -
Breaking Change:
validate
option ofbuildSchema
is set tofalse
by default - integration withclass-validator
has to be turned on explicitly -
Breaking Change:
validate
option ofbuildSchema
doesn't accept anymore a custom validation function - usevalidateFn
option instead - support class-based auth checker, which allows for dependency injection
- allow defining directives for interface types and theirs fields, with inheritance for object types fields (#744)
- allow deprecating input fields and args (#794)
- support disabling inferring default values (#793)
- support readonly arrays for roles of
@Authorized
decorator (#935) - add sync version of
buildTypeDefsAndResolvers
function (#803) - lift restriction of listing all interfaces from inheritance chain in
implements
option of@ObjectType
decorator (#1435)
Fixes
-
Breaking Change: properly emit types nullability when
defaultValue
is provided and removeConflictingDefaultWithNullableError
error (#751) - allow defining extension on field resolver level for fields also defined as a property of the class (#776)
- fix throwing error when schema with dynamic default value was built again (#787)
- fix converting inputs with fields of nested array type (#801)
- disable broken exposing input types fields under a changed name via
@Field({ name: "..." })
- support overwriting fields of extended types (#1109)
- properly execute args validation for nullable items array (#1328)
Others
-
Breaking Change: update
class-validator
peer dependency to>=0.14.0
- Breaking Change: change build config to ES2019 - drop support for Node.js < 14.5
-
Breaking Change: remove support for loading resolvers by glob paths (
resolvers: string[]
build schema option) -
Breaking Change: remove
isAbstract
legacy decorator option