Type Graphql Versions Save

Create GraphQL schema and resolvers with TypeScript, using classes and decorators!

v1.0.0-rc.2

4 years ago

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

v1.0.0-rc.1

4 years ago

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

v0.17.6

4 years ago

Fixes

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

v0.17.5

4 years ago

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)

v0.17.4

5 years ago

Features

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

v0.17.3

5 years ago

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)

v0.17.2

5 years ago

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)

v0.17.1

5 years ago

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)

v0.17.0

5 years ago

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)

v0.16.0

5 years ago

Features

  • add support for default values in schema (#203)
  • add support for lists with nullable items (#211)

Fixes

  • fix browser shim (compatibility with polyfills for decorator support)