UNPKG

@nestjs/graphql

Version:

Nest - modern, fast, powerful node.js web framework (@graphql)

21 lines (20 loc) 697 B
import { isString } from '@nestjs/common/utils/shared.utils.js'; const defaultOptions = { typeFileNameSuffix: ['.input.ts', '.args.ts', '.entity.ts', '.model.ts'], introspectComments: false, readonly: false, debug: false, esmCompatible: false, }; export const mergePluginOptions = (options = {}) => { if (isString(options.typeFileNameSuffix)) { options.typeFileNameSuffix = [options.typeFileNameSuffix]; } const esmCompatibleWasConfigured = options.esmCompatibleWasConfigured ?? Object.prototype.hasOwnProperty.call(options, 'esmCompatible'); return { ...defaultOptions, ...options, esmCompatibleWasConfigured, }; };