Skip to content

Releases: MichalLytek/type-graphql

1.0.0-rc.3

29 Jun 18:06
Compare
Choose a tag to compare
1.0.0-rc.3 Pre-release
Pre-release

Features

  • Breaking Change: remove legacy array inference - now explicit array syntax ([Item]) is required
  • Breaking Change: update graphql-js peer dependency to ^15.1.0
  • update deps to newest major versions (tslib, graphql-query-complexity)

1.0.0-rc.2

19 May 19:36
Compare
Choose a tag to compare
1.0.0-rc.2 Pre-release
Pre-release

Features

  • expose createResolversMap utility that generates apollo-like resolvers object
  • support IoC containers which .get() method returns a Promise of resolver instance

Fixes

  • properly inherit directives while extending @InputType or @ObjectType classes (#626)
  • skip transforming empty array items into input classes

1.0.0-rc.1

03 May 16:50
Compare
Choose a tag to compare
1.0.0-rc.1 Pre-release
Pre-release

Features

  • Breaking Change: emit in schema only types actually used by provided resolvers classes (#415)
  • Breaking Change: update graphql-js peer dependency to ^15.0.0
  • Breaking Change: update graphql-query-complexity dependency to ^0.5.0 and drop support for fieldConfigEstimator (use fieldExtensionsEstimator instead)
  • Breaking Change: introduce sortedSchema option in PrintSchemaOptions 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
  • update TypeResolver interface to match with GraphQLTypeResolver from graphql-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)

Fixes

  • Breaking Change: stop returning null for GraphQLTimestamp and GraphQLISODateTime scalars when returned value is not a Date instance - now it throws explicit error instead
  • refactor union types function syntax handling to prevent possible errors with circular refs
  • fix transforming and validating nested inputs and arrays (#462)
  • 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

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

0.17.6

21 Dec 20:48
Compare
Choose a tag to compare

Fixes

  • fix leaking resolver source code in MissingSubscriptionTopicsError error message (#489)

0.17.5

18 Aug 11:09
Compare
Choose a tag to compare

Features

  • rename DepreciationOptions interface to DeprecationOptions and deprecate the old one
  • update deps to newest minor versions (tslib, semver, graphql-query-complexity and glob)
  • support nested array types (@Field(type => [[Int]])) (#393)
  • deprecate the direct array syntax for union types

Fixes

  • fix errors on circular refs in union types (#364) by adding the function syntax (() => TClassTypes)

0.17.4

12 May 20:26
Compare
Choose a tag to compare

Features

  • add support for creating custom parameter decorators (#329)
  • allow to provide custom subscribe function in @Subscription decorator (#328)

0.17.3

06 May 16:48
Compare
Choose a tag to compare

Features

  • update packages semver to ^6.0.0 and graphql-subscriptions to ^1.1.0

Fixes

  • fix broken compatibility with newer @types/graphql due to using removed private types (e.g. MaybePromise) (#320)

0.17.2

23 Apr 19:30
Compare
Choose a tag to compare

Features

  • add support for defining resolveType function for interfaces and unions (#319)
  • add support for setting default nullability for fields and return types (#297)
  • add skipCheck option in buildSchema to disable checking the correctness of a schema
  • add postinstall script for printing info on console about supporting the project

Fixes

  • fix generating plain resolvers for queries and mutations (compatibility with Apollo client state)

0.17.1

30 Mar 15:24
Compare
Choose a tag to compare

Features

  • add support for emitting schema file in not existing directory (#269)
  • drop support for Node.js v6 (end of LTS in April 2019)

Fixes

  • fix typings discovery support for WebStorm (#276)
  • allow for returning plain objects when using ObjectTypes that implements InterfaceTypes or extends other classes (#160)

0.17.0

04 Mar 19:28
Compare
Choose a tag to compare

Features

  • Breaking Change: make graphql-js packages a peer dependencies, bump graphql to ^14.1.1 and @types/graphql to ^14.0.7 (#239)
  • Breaking Change: remove useContainer function and allow to register container by buildSchema options (#241)
  • Breaking Change: change the default PrintSchemaOptions option commentDescriptions to false (no more # comments in SDL)
  • add support for passing PrintSchemaOptions in buildSchema.emitSchemaFile (e.g. commentDescriptions: true to restore previous behavior)
  • add buildTypeDefsAndResolvers utils function for generating apollo-like typeDefs and resolvers pair (#233)
  • add support for generic types (#255)

Fixes

  • Breaking Change: remove the formatArgumentValidationError helper as it's not compatible and not needed in new Apollo Server (#258)
  • fix calling return type getter function @Field(type => Foo) before finishing module evaluation (allow for extending circular classes using require)
  • fix nullifying other custom method decorators - call the method on target instance, not the stored reference to original function (#247)
  • fix throwing error when extending non args class in the @ArgsType() class
  • prevent unnecessary conversion of an object that is already an instance of the requested type (avoid constructor side-effects)