Create GraphQL schema and resolvers with TypeScript, using classes and decorators!
name
arguments (#1284)name
argument string contain a double underscore (__
) when using buildTypeDefsAndResolvers()
(#1309)graphql-scalars
peer dependency to ^1.22.4
type-graphql/shim
(and /node_modules/type-graphql/build/typings/shim.ts
)graphql-js
peer dependency to ^16.8.1
@graphql-yoga
instead of graphql-subscriptions
as the subscriptions enginePubSub
implementation into buildSchema
option when using @Subscription
@PubSub
in favor of directly importing created PubSub
implementationPublisher
and PubSubEngine
typesResolverFilterData
into SubscriptionHandlerData
and ResolverTopicData
into SubscribeResolverData
@Field
of @Args
@Arg
validateFn
option of @Arg
and @Args
decorators@Subscription
decorator optiongraphql-js
peer dependency to ^16.7.1
ArgumentValidationError
and replace UnauthorizedError
and ForbiddenError
with AuthenticationError
, AuthorizationError
that are extending GraphQLError
to let the error details be accessible in the extensions
propertyClassType
constraint from ClassType<T = any>
to ClassType<T extends object = object>
in order to make it work properly with new TS featuresdateScalarMode
option from buildSchema
graphql-scalars
package a peer dependency and use date scalars from it instead of custom onesGraphQLISODateTime
scalar has now a name DateTimeISO
ValidatorFn
signature from ValidatorFn<TArgs>
to ValidatorFn<TContext>
type-graphql
package (CJS and ESM versions)ValidatorFn
to accept array of values (instead of only object | undefined
)AuthChecker
type is now "function or class" - update to AuthCheckerFn
if the function form is needed in the codegraphql-js
peer dependency to ^16.6.0
buildSchemaSync
is now also checking the generated schema for errorsvalidate
option of buildSchema
is set to false
by default - integration with class-validator
has to be turned on explicitlyvalidate
option of buildSchema
doesn't accept anymore a custom validation function - use validateFn
option instead@Authorized
decorator (#935)buildTypeDefsAndResolvers
function (#803)implements
option of @ObjectType
decorator (#1425)defaultValue
is provided and remove ConflictingDefaultWithNullableError
error (#751)@Field({ name: "..." })
class-validator
peer dependency to >=0.14.0
resolvers: string[]
build schema option)isAbstract
legacy decorator optionAuthChecker
type is now "function or class" - update to AuthCheckerFn
if the function form is needed in the code@Authorized
decorator (#935)buildTypeDefsAndResolvers
function (#803)defaultValue
is provided and remove ConflictingDefaultWithNullableError
error (#751)@Field({ name: "..." })
graphql-js
peer dependency to ^15.5.0
resolveType
function returns undefined
or null
(#731)validate
option to buildSchema
GraphQLISODateTime
and GraphQLTimestamp
scalars@FieldResolver
when that resolvers classes aren't provided in resolvers
arrayCannotDetermineGraphQLTypeError
error messagegraphql-js
peer dependency to ^15.3.0
graphql-query-complexity
dependency to ^0.7.0
and drop support for fieldConfigEstimator
(use fieldExtensionsEstimator
instead)sortedSchema
option in PrintSchemaOptions
and emit sorted schema file by defaultclass-validator
a peer dependency of version >=0.12.0
that needs to be installed manually (#366)CannotDetermineTypeError
and make other error messages more detailed and specific[Item]
) is requiredTypeResolver
interface to match with GraphQLTypeResolver
from graphql-js
@Directive()
decorator (#369)@Extensions
decorator for putting metadata into GraphQL types config (#521){ autoRegisterImplementations: false }
option to prevent automatic emitting in schema all the object types that implements used interface type (#595)createResolversMap
utility that generates apollo-like resolvers object.get()
method returns a Promise
of resolver instancetslib
, graphql-query-complexity
)GraphQLTimestamp
and GraphQLISODateTime
scalars when returned value is not a Date
instance - now it throws explicit error insteadname
option on interface fields (#567)authChecker
during subscribe phase for subscriptions (#578)buildSchema
resolveType
is used@InputType
or @ObjectType
classes (#626)DepreciationOptions
interface