nestjs-relay icon indicating copy to clipboard operation
nestjs-relay copied to clipboard

Allows use of ResolvedGlobalId with class-transformer library

Open JimAllanson opened this issue 3 years ago • 0 comments

The ResolvedGlobalId class currently requires constructor parameters. This causes an error when used with the class-transformer library, as this library attempts to initialise classes without contructor arguments, setting properties individually afterwards. This causes an issue when trying to use a ResolvedGlobalId as an argument, e.g.

async resolveNode( resolvedGlobalId: ResolvedGlobalId){...

Making this parameter optional allows it to work correctly with the class-transformer library while maintaining the current custom scalar logic.

JimAllanson avatar Aug 02 '21 14:08 JimAllanson