type-graphql
Advanced tools
Comparing version 0.18.0-beta.14 to 0.18.0-beta.15
@@ -0,0 +0,0 @@ /* |
import { GraphQLScalarType } from "graphql"; | ||
import { ValidatorOptions } from "class-validator"; | ||
import type { ValidatorOptions } from "class-validator"; | ||
import { ResolverFilterData, ClassType, ResolverTopicData, Complexity, TypeResolver } from "../interfaces"; | ||
@@ -4,0 +4,0 @@ export interface RecursiveArray<TValue> extends Array<RecursiveArray<TValue> | TValue> { |
import { ClassType } from "../interfaces"; | ||
import { UnionFromClasses } from "../helpers/utils"; | ||
import { ResolveTypeOptions } from "./types"; | ||
export interface UnionTypeConfig<TClassTypes extends ClassType[]> extends ResolveTypeOptions<UnionFromClasses<TClassTypes>> { | ||
export interface UnionTypeConfig<TClassTypes extends readonly ClassType[]> extends ResolveTypeOptions<UnionFromClasses<TClassTypes>> { | ||
name: string; | ||
description?: string; | ||
/** | ||
* The direct array syntax is deprecated. | ||
* Use the function syntax `() => TClassTypes` instead. | ||
*/ | ||
types: TClassTypes | (() => TClassTypes); | ||
types: () => TClassTypes; | ||
} | ||
export declare function createUnionType<T extends ClassType[]>(config: UnionTypeConfig<T>): UnionFromClasses<T>; | ||
export declare function createUnionType<T extends readonly ClassType[]>(config: UnionTypeConfig<T>): UnionFromClasses<T>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const getMetadataStorage_1 = require("../metadata/getMetadataStorage"); | ||
function createUnionType({ name, description, types: classTypesOrClassTypesFn, resolveType, }) { | ||
function createUnionType({ name, description, types, resolveType, }) { | ||
const unionMetadataSymbol = getMetadataStorage_1.getMetadataStorage().collectUnionMetadata({ | ||
name, | ||
description, | ||
getClassTypes: typeof classTypesOrClassTypesFn === "function" | ||
? classTypesOrClassTypesFn | ||
: () => classTypesOrClassTypesFn, | ||
getClassTypes: types, | ||
resolveType, | ||
@@ -12,0 +10,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import { ValidationError } from "class-validator"; | ||
import type { ValidationError } from "class-validator"; | ||
export declare class ArgumentValidationError extends Error { | ||
@@ -3,0 +3,0 @@ validationErrors: ValidationError[]; |
@@ -1,2 +0,2 @@ | ||
export declare type ArrayElements<TArray extends any[]> = TArray extends Array<infer TElement> ? TElement : never; | ||
export declare type UnionFromClasses<TClassesArray extends any[]> = InstanceType<ArrayElements<TClassesArray>>; | ||
export declare type ArrayElements<TArray extends ReadonlyArray<any>> = TArray extends ReadonlyArray<infer TElement> ? TElement : never; | ||
export declare type UnionFromClasses<TClassesArray extends ReadonlyArray<any>> = InstanceType<ArrayElements<TClassesArray>>; |
export * from "./decorators"; | ||
export * from "./scalars"; | ||
export * from "./errors"; | ||
export * from "./interfaces"; | ||
export * from "./metadata"; | ||
export * from "./scalars"; | ||
export * from "./utils"; | ||
export { PubSubEngine } from "graphql-subscriptions"; |
@@ -5,6 +5,7 @@ "use strict"; | ||
tslib_1.__exportStar(require("./decorators"), exports); | ||
tslib_1.__exportStar(require("./errors"), exports); | ||
tslib_1.__exportStar(require("./metadata"), exports); | ||
tslib_1.__exportStar(require("./scalars"), exports); | ||
tslib_1.__exportStar(require("./errors"), exports); | ||
tslib_1.__exportStar(require("./utils"), exports); | ||
var graphql_subscriptions_1 = require("graphql-subscriptions"); | ||
exports.PubSubEngine = graphql_subscriptions_1.PubSubEngine; |
@@ -1,2 +0,1 @@ | ||
export { MiddlewareFn, NextFn, MiddlewareInterface } from "./Middleware"; | ||
export * from "./AuthChecker"; | ||
@@ -6,2 +5,4 @@ export * from "./ClassType"; | ||
export * from "./Maybe"; | ||
export { MiddlewareFn, NextFn, MiddlewareInterface } from "./Middleware"; | ||
export * from "./NonEmptyArray"; | ||
export * from "./Publisher"; | ||
@@ -8,0 +9,0 @@ export * from "./ResolverData"; |
@@ -1,2 +0,2 @@ | ||
import { ValidatorOptions } from "class-validator"; | ||
import type { ValidatorOptions } from "class-validator"; | ||
import { TypeValueThunk, TypeOptions } from "../../decorators/types"; | ||
@@ -3,0 +3,0 @@ import { ResolverData } from "../../interfaces"; |
@@ -22,5 +22,5 @@ import { ResolverMetadata, ClassMetadata, ExtensionsClassMetadata, ExtensionsFieldMetadata, FieldMetadata, ParamMetadata, FieldResolverMetadata, AuthorizedMetadata, EnumMetadata, UnionMetadata, UnionMetadataWithSymbol, ResolverClassMetadata, SubscriptionResolverMetadata, MiddlewareMetadata } from "./definitions"; | ||
fieldExtensions: ExtensionsFieldMetadata[]; | ||
private resolverClasses; | ||
private fields; | ||
private params; | ||
resolverClasses: ResolverClassMetadata[]; | ||
fields: FieldMetadata[]; | ||
params: ParamMetadata[]; | ||
constructor(); | ||
@@ -27,0 +27,0 @@ collectQueryHandlerMetadata(definition: ResolverMetadata): void; |
import { PubSubEngine } from "graphql-subscriptions"; | ||
import { ValidatorOptions } from "class-validator"; | ||
import type { ValidatorOptions } from "class-validator"; | ||
import { ParamMetadata } from "../metadata/definitions"; | ||
@@ -4,0 +4,0 @@ import { ResolverData, AuthChecker, AuthMode } from "../interfaces"; |
@@ -1,2 +0,2 @@ | ||
import { ValidatorOptions } from "class-validator"; | ||
import type { ValidatorOptions } from "class-validator"; | ||
export declare function validateArg<T extends Object>(arg: T | undefined, globalValidate: boolean | ValidatorOptions, argValidate?: boolean | ValidatorOptions): Promise<T | undefined>; |
import { GraphQLScalarType } from "graphql"; | ||
import { ValidatorOptions } from "class-validator"; | ||
import type { ValidatorOptions } from "class-validator"; | ||
import { PubSubEngine, PubSubOptions } from "graphql-subscriptions"; | ||
@@ -4,0 +4,0 @@ import { AuthChecker, AuthMode } from "../interfaces"; |
import { GraphQLSchema } from "graphql"; | ||
import { SchemaGeneratorOptions } from "../schema/schema-generator"; | ||
import { PrintSchemaOptions } from "./emitSchemaDefinitionFile"; | ||
import { NonEmptyArray } from "./types"; | ||
import { NonEmptyArray } from "../interfaces/NonEmptyArray"; | ||
interface EmitSchemaFileOptions extends Partial<PrintSchemaOptions> { | ||
@@ -6,0 +6,0 @@ path?: string; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare type Without<FirstType, SecondType> = { | ||
[KeyType in Exclude<keyof FirstType, keyof SecondType>]?: never; | ||
}; | ||
export declare type MergeExclusive<FirstType, SecondType> = (FirstType | SecondType) extends object ? (Without<FirstType, SecondType> & SecondType) | (Without<SecondType, FirstType> & FirstType) : FirstType | SecondType; | ||
export declare type NonEmptyArray<TItem> = [TItem, ...TItem[]]; | ||
export declare type MergeExclusive<FirstType, SecondType> = FirstType | SecondType extends object ? (Without<FirstType, SecondType> & SecondType) | (Without<SecondType, FirstType> & FirstType) : FirstType | SecondType; |
{ | ||
"name": "type-graphql", | ||
"version": "0.18.0-beta.14", | ||
"version": "0.18.0-beta.15", | ||
"author": { | ||
@@ -13,3 +13,6 @@ "name": "Michał Lytek", | ||
"test:watch": "jest --watch", | ||
"check": "tsc --noEmit", | ||
"format": "prettier --write \"{src,tests,examples}/**/*.{ts,js}\" \"docs/**/*.md\"", | ||
"check:format": "prettier --check \"{src,tests,examples}/**/*.{ts,js}\" \"docs/**/*.md\"", | ||
"check:type": "tsc --noEmit", | ||
"check": "npm run check:format && npm run check:type", | ||
"lint": "tslint --project tsconfig.json", | ||
@@ -22,3 +25,4 @@ "verify": "npm run check && npm run lint", | ||
"peerDependencies": { | ||
"graphql": "^14.6.0" | ||
"graphql": "^14.6.0", | ||
"class-validator": ">=0.9.1" | ||
}, | ||
@@ -29,3 +33,2 @@ "dependencies": { | ||
"@types/semver": "^7.1.0", | ||
"class-validator": ">=0.9.1", | ||
"glob": "^7.1.6", | ||
@@ -46,5 +49,5 @@ "graphql-query-complexity": "^0.4.1", | ||
"@types/jest": "^25.1.4", | ||
"@types/mongoose": "^5.7.6", | ||
"@types/node": "^13.9.1", | ||
"@types/rimraf": "^2.0.3", | ||
"@types/mongoose": "^5.7.8", | ||
"@types/node": "^13.9.5", | ||
"@types/rimraf": "^3.0.0", | ||
"apollo-cache-control": "^0.9.0", | ||
@@ -55,2 +58,3 @@ "apollo-engine": "^1.1.2", | ||
"class-transformer": "^0.2.3", | ||
"class-validator": "^0.12.0-rc.0", | ||
"del": "^5.1.0", | ||
@@ -67,12 +71,12 @@ "express": "^4.17.1", | ||
"husky": "^4.2.3", | ||
"ioredis": "^4.16.0", | ||
"jest": "^25.1.0", | ||
"lint-staged": "^10.0.8", | ||
"mongoose": "^5.9.4", | ||
"ioredis": "^4.16.1", | ||
"jest": "^25.2.3", | ||
"lint-staged": "^10.0.9", | ||
"mongoose": "^5.9.6", | ||
"mysql": "^2.18.1", | ||
"prettier": "^1.19.1", | ||
"prettier": "^2.0.2", | ||
"reflect-metadata": "^0.1.13", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^25.2.1", | ||
"ts-node": "^8.6.2", | ||
"ts-node": "^8.8.1", | ||
"tslint": "^6.1.0", | ||
@@ -94,12 +98,9 @@ "tslint-config-prettier": "^1.18.0", | ||
"tslint --fix", | ||
"prettier --write", | ||
"git add" | ||
"prettier --write" | ||
], | ||
"{src,tests,examples}/**/*.js": [ | ||
"prettier --write", | ||
"git add" | ||
"prettier --write" | ||
], | ||
"docs/**/*.md": [ | ||
"prettier --write", | ||
"git add" | ||
"prettier --write" | ||
] | ||
@@ -106,0 +107,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183167
220
3817
45
- Removedclass-validator@>=0.9.1