UNPKG

@graphql-codegen/typescript-nest

Version:

GraphQL Code Generator plugin for generating NestJS compatible types

13 lines (12 loc) 850 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NEST_IMPORT = exports.NEST_PREFIX = exports.SCALARS = exports.FIX_DECORATOR_SIGNATURE = exports.NEST_SCALARS = exports.GRAPHQL_TYPES = exports.SCALAR_REGEX = exports.ARRAY_REGEX = exports.MAYBE_REGEX = void 0; exports.MAYBE_REGEX = /^Maybe<(.*?)>$/; exports.ARRAY_REGEX = /^Array<(.*?)>$/; exports.SCALAR_REGEX = /^Scalars\['(.*?)'\]$/; exports.GRAPHQL_TYPES = ['Query', 'Mutation', 'Subscription']; exports.NEST_SCALARS = ['ID', 'Int', 'Float', 'GraphQLISODateTime', 'GraphQLTimestamp']; exports.FIX_DECORATOR_SIGNATURE = `type FixDecorator<T> = T;`; exports.SCALARS = ['ID', 'String', 'Boolean', 'Int', 'Float']; exports.NEST_PREFIX = 'Nest'; exports.NEST_IMPORT = `import * as ${exports.NEST_PREFIX} from '@nestjs/graphql';\nexport { ${exports.NEST_PREFIX} };`;