- Breaking Change: make
graphql-jspackages a peer dependencies, bumpgraphqlto^14.1.1and@types/graphqlto^14.0.7(#239) - Breaking Change: remove
useContainerfunction and allow to register container bybuildSchemaoptions (#241) - Breaking Change: change the default
PrintSchemaOptionsoptioncommentDescriptionsto false (no more#comments in SDL) - add support for passing
PrintSchemaOptionsinbuildSchema.emitSchemaFile(e.g.commentDescriptions: trueto restore previous behavior) - add
buildTypeDefsAndResolversutils function for generating apollo-liketypeDefsandresolverspair (#233) - add support for generic types (#255)
- Breaking Change: remove the
formatArgumentValidationErrorhelper 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
graphqlto^14.0.2,graphql-subscriptionsto^1.0.0and@types/graphqlto^14.0.2 - update all other dependencies
- drop support for Node.js v9
- add capability to emit the schema definition file (*.gql) as a
buildSchemaoption - add
emitSchemaDefinitionFilehelper function for emitting the schema SDL
- Breaking Change: change
ClassTypetype and export it in package index - Breaking Change: refactor generic
createUnionTypeto 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-validatora virtual peer dependency and update it to newest0.9.1version - add support for creating scoped containers (#113)
- add reflect-metadata checks and informative error if no polyfill provided
- update
@types/graphqlto latest version (^0.13.3)
- fix throwing error when
of => objectTypewasn't provided in abstract resolver class - fix calling
Object.assignwith 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
ActionDataandFilterActionDatainterfaces - add support for resolver classes inheritance
- add
namedecorator option for@Fieldand@FieldResolverdecorators that allows to set the schema name different than the property name
- make auth checker feature generic typed (default
stringfor backward compatibility)
- attach
MetadataStorageto global scope (support multiple packages/modules) - rename and deprecate
ActionDataandFilterActionDatainterfaces toResolverDataandResolverFilterData
- add support for returning null instead of throwing authorization error (
authModeproperty ofbuildSchemaconfig) - 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
GraphQLprefix and{ array: true }type option
- add
buildSchemaSyncfunction to build the schema synchronously (unsafe! without additional errors checks) - update package dependencies
- Breaking Change: update
@types/graphqlto0.13.0
- decorator option
validateis now merged withbuildSchema'svalidateconfig 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
rootandcontextobjects 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
GraphQLprefix - use@ArgsType,@InputType,@InterfaceType,@ObjectTypeand@Resolverinstead
- fix not working array type notation in circular dependencies (correct thunk generation)
- add authorization feature -
@Authorizeddecorator andauthCheckerfunction in schema options (see docs) - add support for defining array type using mongoose-like notation
[Type] - Breaking Change: remove deprecated
@GraphQLArgumentTypedecorator - use@GraphQLArgsTypeinstead
- 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
buildSchemaasync - now it returns a Promise ofGraphQLSchema - rename and deprecate
@GraphQLArgumentTypedecorator - use@GraphQLArgsTypeinstead
- allow for no args in
@GraphQLResolverdecorator to keep consistency with other resolver classes
- create instance of root object when it's type provided in resolver
- change
Datescalar names toGraphQLISODateTimeandGraphQLTimestamp - support only
Dateobjects (instances) serialization inGraphQLTimestamp(and inGraphQLISODateTimetoo) - update package dependencies
- add test suite with 92%+ coverage
- Breaking change: switch array
nullableoption behavior from[Type]!to[Type!] - add more detailed type reflection error message (parameters support)
- fix
ResolverInterfaceresolver function type (allow additional parameters) - add support for named param in
@GraphQLResolverlambda and for object class as param
- add basic support for automatic arguments and inputs validation using
class-validator - add interface
ResolverInterfacefor type checking of resolver class methods (field resolvers) - update
graphqldependency from^0.12.3to^0.13.0
- fix default values for arg/input fields (class property initializers) - use
newinstead ofObject.create
- add support for descriptions in schema (types, args, queries, etc.)
- add support for declaring depreciation 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
@Contextdecorator 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
plainToClassto vanilla JS) - fix converting field and resolvers args errors while converting gql objects (weird
prototypestuffs)
- add support for omitting return type when use type options, in selected decorators (
@Field,@Arg)
- fix class getter resolvers bug - missing fields from prototype (
plainToClassbug)