import { identity } from '../../utils' ; import * as Exception from '../../exception' ; const nestJS = require ( 'nesthydrationjs' ) ( ) ; export const LiteralArray = 'LiteralArray' ; nestJS . registerType ( LiteralArray , identity ) ; export function graph < T > ( rows , definition ) { try { const result = nestJS . nest ( rows , [ definition ] ) ; return result as T [ ] ; } catch ( e ) { throw Exception . GraphFailed ( e ) ; } }