- Breaking Change: update
graphql-js
peer dependency to^16.6.0
- support overwriting fields of extended types (#1109)
- properly execute args validation for nullable items array (#1328)
- Breaking Change: update
class-validator
peer dependency to>=0.13.0
- Breaking Change: change build config to ES2019 - drop support for Node.js < 14.5
- 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)
- 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: "..." })
- Breaking Change: update
graphql-js
peer dependency to^15.5.0
- 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)
- allow passing custom validation function as
validate
option tobuildSchema
- support defining deprecation reason and description of enum members (#714)
- 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
- 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
)
- 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
- 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
- fix leaking resolver source code in
MissingSubscriptionTopicsError
error message (#489)
- rename
DepreciationOptions
interface toDeprecationOptions
and deprecate the old one - update deps to newest minor versions (
tslib
,semver
,graphql-query-complexity
andglob
) - support nested array types (
@Field(type => [[Int]])
) (#393) - deprecate the direct array syntax for union types
- fix errors on circular refs in union types (#364) by adding the function syntax (
() => TClassTypes
)
- add support for creating custom parameter decorators (#329)
- allow to provide custom
subscribe
function in@Subscription
decorator (#328)
- update packages
semver
to^6.0.0
andgraphql-subscriptions
to^1.1.0
- fix broken compatibility with newer
@types/graphql
due to using removed private types (e.g.MaybePromise
) (#320)
- 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 inbuildSchema
to disable checking the correctness of a schema - add postinstall script for printing info on console about supporting the project
- fix generating plain resolvers for queries and mutations (compatibility with Apollo client state)
- add support for emitting schema file in not existing directory (#269)
- drop support for Node.js v6 (end of LTS in April 2019)
- fix typings discovery support for WebStorm (#276)
- allow for returning plain objects when using
ObjectType
s that implementsInterfaceType
s or extends other classes (#160)
- Breaking Change: make
graphql-js
packages a peer dependencies, bumpgraphql
to^14.1.1
and@types/graphql
to^14.0.7
(#239) - Breaking Change: remove
useContainer
function and allow to register container bybuildSchema
options (#241) - Breaking Change: change the default
PrintSchemaOptions
optioncommentDescriptions
to false (no more#
comments in SDL) - add support for passing
PrintSchemaOptions
inbuildSchema.emitSchemaFile
(e.g.commentDescriptions: true
to restore previous behavior) - add
buildTypeDefsAndResolvers
utils function for generating apollo-liketypeDefs
andresolvers
pair (#233) - add support for generic types (#255)
- 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 usingrequire
) - 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)
- add support for default values in schema (#203)
- add support for lists with nullable items (#211)
- fix browser shim (compatibility with polyfills for decorator support)
- Breaking Change: upgrade
graphql
to^14.0.2
,graphql-subscriptions
to^1.0.0
and@types/graphql
to^14.0.2
- update all other dependencies
- drop support for Node.js v9
- add capability to emit the schema definition file (*.gql) as a
buildSchema
option - add
emitSchemaDefinitionFile
helper function for emitting the schema SDL
- Breaking Change: change
ClassType
type and export it in package index - Breaking Change: refactor generic
createUnionType
to remove the 10 types limit (note: requires TypeScript >=3.0.1) - add support for subscribing to dynamic topics - based on args/ctx/root (#137)
- add support for query complexity analysis - integration with
graphql-query-complexity
(#139)
- fix missing loosely typed overload signature for
createUnionType
(remove the 10 types limit)
- make
class-validator
a virtual peer dependency and update it to newest0.9.1
version - add support for creating scoped containers (#113)
- add reflect-metadata checks and informative error if no polyfill provided
- update
@types/graphql
to latest version (^0.13.3
)
- fix throwing error when
of => objectType
wasn't provided in abstract resolver class - fix calling
Object.assign
with boolean arguments (#111)
- add support for using type classes in browser (configure webpack to use decorators shim)
- fix swallowing false argument value (#101)
- fix bug with overriding methods from parent resolver class (#95)
- Breaking Change: remove deprecated
ActionData
andFilterActionData
interfaces - add support for resolver classes inheritance
- add
name
decorator option for@Field
and@FieldResolver
decorators that allows to set the schema name different than the property name
- make auth checker feature generic typed (default
string
for backward compatibility)
- attach
MetadataStorage
to global scope (support multiple packages/modules) - rename and deprecate
ActionData
andFilterActionData
interfaces toResolverData
andResolverFilterData
- add support for returning null instead of throwing authorization error (
authMode
property ofbuildSchema
config) - add support for generating object type field in schema from method with
@FieldResolver
- fix bug when converting object scalars to target class instance (#65)
- add support for creating and attaching middlewares, guards and interceptors to fields and resolvers
- Breaking Change: remove deprecated decorators with
GraphQL
prefix and{ array: true }
type option
- add
buildSchemaSync
function to build the schema synchronously (unsafe! without additional errors checks) - update package dependencies
- Breaking Change: update
@types/graphql
to0.13.0
- decorator option
validate
is now merged withbuildSchema
'svalidate
config instead of overwriting it
- fix bug with extending non-TypeGraphQL classes
- add support for GraphQL subscriptions using
graphql-subscriptions
- update package dependencies
- deprecate
{ array: true }
type option
- add
@Info()
decorator for injecting GraphQL resolve info to resolvers - add support for injecting parts of
root
andcontext
objects with@Root("field")
and@Ctx("field")
decorators
- add base support for GraphQL enums using TypeScript enums
- add support for defining GraphQL unions
- add support for importing resolvers from file path glob
- deprecate decorators with
GraphQL
prefix - use@ArgsType
,@InputType
,@InterfaceType
,@ObjectType
and@Resolver
instead
- fix not working array type notation in circular dependencies (correct thunk generation)
- add authorization feature -
@Authorized
decorator andauthChecker
function in schema options (see docs) - add support for defining array type using mongoose-like notation
[Type]
- Breaking Change: remove deprecated
@GraphQLArgumentType
decorator - use@GraphQLArgsType
instead
- add support for defining GraphQL interfaces and implementing it by object types
- add support for extending input, args, object and interface types classes
- add support for implementing GraphQL interfaces without decorators duplication
- Breaking Change: make
buildSchema
async - now it returns a Promise ofGraphQLSchema
- rename and deprecate
@GraphQLArgumentType
decorator - use@GraphQLArgsType
instead
- allow for no args in
@GraphQLResolver
decorator to keep consistency with other resolver classes
- create instance of root object when it's type provided in resolver
- change
Date
scalar names toGraphQLISODateTime
andGraphQLTimestamp
- support only
Date
objects (instances) serialization inGraphQLTimestamp
(and inGraphQLISODateTime
too) - update package dependencies
- add test suite with 92%+ coverage
- Breaking change: switch array
nullable
option behavior from[Type]!
to[Type!]
- add more detailed type reflection error message (parameters support)
- fix
ResolverInterface
resolver function type (allow additional parameters) - add support for named param in
@GraphQLResolver
lambda and for object class as param
- add basic support for automatic arguments and inputs validation using
class-validator
- add interface
ResolverInterface
for type checking of resolver class methods (field resolvers) - update
graphql
dependency from^0.12.3
to^0.13.0
- fix default values for arg/input fields (class property initializers) - use
new
instead ofObject.create
- add support for descriptions in schema (types, args, queries, etc.)
- add support for declaring deprecation reason on object fields and queries/mutations
- fix scalars ID alias (GraphQLID not GraphQLString)
- add support for Date type (built-in scalar)
- add support for custom scalars (and mapping it to TS types)
- change
@Context
decorator name to@Ctx
- fix missing type args in schema when declared in field resolver
- fix missing resolver function when defined as type field method
- fix creating instances of root object when internal fields are Promises (switch from
plainToClass
to vanilla JS) - fix converting field and resolvers args errors while converting gql objects (weird
prototype
stuffs)
- add support for omitting return type when use type options, in selected decorators (
@Field
,@Arg
)
- fix class getter resolvers bug - missing fields from prototype (
plainToClass
bug)