Releases: MichalLytek/type-graphql
Releases · MichalLytek/type-graphql
2.0.0-rc.2
Features
- support declaring middlewares on resolver class level (#620)
- support declaring auth roles on resolver class level (#620)
- make possible creating custom decorators on resolver class level -
createResolverClassMiddlewareDecorator
- support registering custom arg decorator via
createParameterDecorator
and its second argumentCustomParameterOptions
-arg
(#1325)
Fixes
- properly build multiple schemas with generic resolvers, args and field resolvers (#1321)
Others
- Breaking Change: update
graphql-scalars
peer dependency to^1.23.0
- Breaking Change: rename
createMethodDecorator
intocreateMethodMiddlewareDecorator
- Breaking Change: rename
createParamDecorator
tocreateParameterDecorator
2.0.0-rc.1
2.0.0-beta.6
Fixes
- allow overriding field resolver method with different
name
arguments (#1284) - allow object type's
name
argument string contain a double underscore (__
) when usingbuildTypeDefsAndResolvers()
(#1309)
Others
- Breaking Change: update
graphql-scalars
peer dependency to^1.22.4
- properly configure esm build pipeline to publish working esm version of the package
2.0.0-beta.4
Features
- Breaking Change: expose shim as a package entry point
type-graphql/shim
(and/node_modules/type-graphql/build/typings/shim.ts
) - Breaking Change: update
graphql-js
peer dependency to^16.8.1
- Breaking Change: use
@graphql-yoga
instead ofgraphql-subscriptions
as the subscriptions engine - Breaking Change: require providing
PubSub
implementation intobuildSchema
option when using@Subscription
- Breaking Change: remove
@PubSub
in favor of directly importing createdPubSub
implementation - Breaking Change: remove
Publisher
andPubSubEngine
types - Breaking Change: rename interface
ResolverFilterData
intoSubscriptionHandlerData
andResolverTopicData
intoSubscribeResolverData
- support defining directives on
@Field
of@Args
- support defining directives on inline
@Arg
- allow passing custom validation function as
validateFn
option of@Arg
and@Args
decorators - add support for dynamic topic id function in
@Subscription
decorator option
2.0.0-beta.3
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
)
2.0.0-beta.2
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 (#1425)
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
v1.2.0-rc.1
Features
- Breaking Change:
AuthChecker
type is now "function or class" - update toAuthCheckerFn
if the function form is needed in the code - 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)
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: "..." })
Others
- Breaking Change: update
graphql-js
peer dependency to^15.5.0
1.1.1
Fixes
- fix crashing when of union's or interface type's
resolveType
function returnsundefined
ornull
(#731) - fix crashing when no reflected type available for fields with params decorators (#724)
- fix not registering object types implementing interface type when interface type is used as object type field type (#736)
- properly transform nested array of input type classes (#737)
1.1.0
Features
- allow passing custom validation function as
validate
option tobuildSchema
- support defining deprecation reason and description of enum members (#714)
Fixes
- Breaking Change: throw error when wrong type of value provided as arg or input for
GraphQLISODateTime
andGraphQLTimestamp
scalars - don't include in schema the fields declared as
@FieldResolver
when that resolvers classes aren't provided inresolvers
array - fix grammar in
CannotDetermineGraphQLTypeError
error message - properly inherit extensions from parent class and its fields
1.0.0
Features
- Breaking Change: emit in schema only types actually used by provided resolvers classes (#415)
- Breaking Change: update
graphql-js
peer dependency to^15.3.0
- Breaking Change: update
graphql-query-complexity
dependency to^0.7.0
and drop support forfieldConfigEstimator
(usefieldExtensionsEstimator
instead) - Breaking Change: introduce
sortedSchema
option inPrintSchemaOptions
and emit sorted schema file by default - Breaking Change: make
class-validator
a peer dependency of version>=0.12.0
that needs to be installed manually (#366) - Breaking Change: remove
CannotDetermineTypeError
and make other error messages more detailed and specific - Breaking Change: remove legacy array inference - now explicit array syntax (
[Item]
) is required - update
TypeResolver
interface to match withGraphQLTypeResolver
fromgraphql-js
- add basic support for directives with
@Directive()
decorator (#369) - add possibility to tune up the performance and disable auth & middlewares stack for simple field resolvers (#479)
- optimize resolvers execution paths to speed up a lot basic scenarios (#488)
- add
@Extensions
decorator for putting metadata into GraphQL types config (#521) - add support for defining arguments and implementing resolvers for interface types fields (#579)
- add
{ autoRegisterImplementations: false }
option to prevent automatic emitting in schema all the object types that implements used interface type (#595) - allow interfaces to implement other interfaces (#602)
- expose
createResolversMap
utility that generates apollo-like resolvers object - support IoC containers which
.get()
method returns aPromise
of resolver instance - update deps to newest major versions (
tslib
,graphql-query-complexity
)
Fixes
- Breaking Change: stop returning null for
GraphQLTimestamp
andGraphQLISODateTime
scalars when returned value is not aDate
instance - now it throws explicit error instead - Breaking Change: fix transforming and validating nested inputs and arrays (#462)
- refactor union types function syntax handling to prevent possible errors with circular refs
- remove duplicated entries for resolver classes that use inheritance (#499)
- fix using
name
option on interface fields (#567) - fix not calling
authChecker
during subscribe phase for subscriptions (#578) - fix using shared union type in multiple schemas
- fix using shared interface type in multiple schemas
- fix calling field resolver without providing resolver class to
buildSchema
- fix generated TS union type for union type of object type classes extending themselves (#587)
- fix using shared union and interface types in multiple schemas when
resolveType
is used - properly inherit directives while extending
@InputType
or@ObjectType
classes (#626) - skip transforming empty array items into input classes
Others
- Breaking Change: change build config to ES2018 - drop support for Node.js < 10.3
- Breaking Change: remove deprecated
DepreciationOptions
interface - Breaking Change: remove deprecated direct array syntax for declaring union types