Skip to content

Releases: MichalLytek/type-graphql

2.0.0-rc.4

26 Feb 08:35

Choose a tag to compare

Fixes

  • prevent duplicated params when building schema multiple times (#1803)

2.0.0-rc.3

08 Feb 08:56

Choose a tag to compare

Features

  • optimize performance of building metadata storage with HashMap caching for O(1) lookups (#1779)

Fixes

  • prevent enumerable undefined properties in input types instances (#1789)
  • add missing support for GraphQL extensions in interface types (#1776)

Others

  • Breaking Change: update graphql-js peer dependency to ^16.12.0
  • Breaking Change: drop support for Node.js < 20.11.1
  • Breaking Change: update graphql-scalars peer dependency to ^1.25.0
  • Breaking Change: update class-validator peer dependency to >=0.14.3

2.0.0-rc.2

07 Jun 12:27

Choose a tag to compare

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 argument CustomParameterOptions - 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 into createMethodMiddlewareDecorator
  • Breaking Change: rename createParamDecorator to createParameterDecorator

2.0.0-rc.1

24 Apr 14:18

Choose a tag to compare

Features

  • support other Reflect polyfills than reflect-metadata by checking only used Reflect API (#1102)

Fixes

  • properly override fields of @ArgsType classes in deeply nested inheritance chain (#1644)
  • allow for leading spaces and multiline directives definitions in @Directive decorator (#1423)

2.0.0-beta.6

24 Apr 14:27

Choose a tag to compare

2.0.0-beta.6 Pre-release
Pre-release

Fixes

  • allow overriding field resolver method with different name arguments (#1284)
  • allow object type's name argument string contain a double underscore (__) when using buildTypeDefsAndResolvers() (#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

24 Apr 14:27

Choose a tag to compare

2.0.0-beta.4 Pre-release
Pre-release

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 of graphql-subscriptions as the subscriptions engine
  • Breaking Change: require providing PubSub implementation into buildSchema option when using @Subscription
  • Breaking Change: remove @PubSub in favor of directly importing created PubSub implementation
  • Breaking Change: remove Publisher and PubSubEngine types
  • Breaking Change: rename interface ResolverFilterData into SubscriptionHandlerData and ResolverTopicData into SubscribeResolverData
  • 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

17 Aug 16:48

Choose a tag to compare

2.0.0-beta.3 Pre-release
Pre-release

Features

  • Breaking Change: update graphql-js peer dependency to ^16.7.1
  • Breaking Change: upgrade ArgumentValidationError and replace UnauthorizedError and ForbiddenError with AuthenticationError, AuthorizationError that are extending GraphQLError to let the error details be accessible in the extensions property
  • Breaking Change: change ClassType constraint from ClassType<T = any> to ClassType<T extends object = object> in order to make it work properly with new TS features
  • Breaking Change: remove dateScalarMode option from buildSchema
  • 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 name DateTimeISO
  • Breaking Change: change ValidatorFn signature from ValidatorFn<TArgs> to ValidatorFn<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 only object | undefined)

2.0.0-beta.2

16 May 08:40

Choose a tag to compare

2.0.0-beta.2 Pre-release
Pre-release

Features

  • Breaking Change: AuthChecker type is now "function or class" - update to AuthCheckerFn 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 of buildSchema is set to false by default - integration with class-validator has to be turned on explicitly
  • Breaking Change: validate option of buildSchema doesn't accept anymore a custom validation function - use validateFn 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 remove ConflictingDefaultWithNullableError 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

06 Oct 08:41

Choose a tag to compare

v1.2.0-rc.1 Pre-release
Pre-release

Features

  • Breaking Change: AuthChecker type is now "function or class" - update to AuthCheckerFn 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 remove ConflictingDefaultWithNullableError 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

04 Nov 20:42

Choose a tag to compare

Fixes

  • fix crashing when of union's or interface type's resolveType function returns undefined or null (#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)