Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

type-graphql

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-graphql - npm Package Compare versions

Comparing version 0.11.2 to 0.11.3

8

decorators/Authorized.d.ts

@@ -1,4 +0,4 @@

export declare type MethodOrPropDecorator = MethodDecorator & PropertyDecorator;
export declare function Authorized(): MethodOrPropDecorator;
export declare function Authorized(roles: string[]): MethodOrPropDecorator;
export declare function Authorized(...roles: string[]): MethodOrPropDecorator;
import { MethodAndPropDecorator } from "../types/decorators";
export declare function Authorized(): MethodAndPropDecorator;
export declare function Authorized<RoleType = string>(roles: RoleType[]): MethodAndPropDecorator;
export declare function Authorized<RoleType = string>(...roles: RoleType[]): MethodAndPropDecorator;

@@ -8,3 +8,3 @@ "use strict";

const roles = decorators_1.getArrayFromOverloadedRest(rolesOrRolesArray);
return (prototype, propertyKey) => {
return (prototype, propertyKey, descriptor) => {
if (typeof propertyKey === "symbol") {

@@ -11,0 +11,0 @@ throw new errors_1.SymbolKeysNotSupportedError();

@@ -1,4 +0,3 @@

import { ReturnTypeFunc, AdvancedOptions } from "../types/decorators";
export declare type MethodAndPropDecorator = PropertyDecorator & MethodDecorator;
import { ReturnTypeFunc, AdvancedOptions, MethodAndPropDecorator } from "../types/decorators";
export declare function Field(options?: AdvancedOptions): MethodAndPropDecorator;
export declare function Field(returnTypeFunction?: ReturnTypeFunc, options?: AdvancedOptions): MethodAndPropDecorator;
import { Middleware } from "../interfaces/Middleware";
export declare function UseMiddleware(middlewares: Array<Middleware<any>>): MethodDecorator & PropertyDecorator;
export declare function UseMiddleware(...middlewares: Array<Middleware<any>>): MethodDecorator & PropertyDecorator;
import { MethodAndPropDecorator } from "../types/decorators";
export declare function UseMiddleware(middlewares: Array<Middleware<any>>): MethodAndPropDecorator;
export declare function UseMiddleware(...middlewares: Array<Middleware<any>>): MethodAndPropDecorator;
import { MiddlewareFn } from "../interfaces/Middleware";
import { AuthChecker, AuthMode } from "../interfaces/auth-checker";
export declare function AuthMiddleware(authChecker: AuthChecker, authMode: AuthMode, roles: string[]): MiddlewareFn;
export declare function AuthMiddleware(authChecker: AuthChecker<any, any>, authMode: AuthMode, roles: any[]): MiddlewareFn;
import { ResolverData } from "../types/action-data";
export declare type AuthChecker<ContextType = {}> = (resolverData: ResolverData<ContextType>, roles: string[]) => boolean | Promise<boolean>;
export declare type AuthChecker<ContextType = {}, RoleType = string> = (resolverData: ResolverData<ContextType>, roles: RoleType[]) => boolean | Promise<boolean>;
export declare type AuthMode = "error" | "null";
export interface AuthorizedMetadata {
target: Function;
fieldName: string;
roles: string[];
roles: any[];
}

@@ -12,4 +12,4 @@ import { ParamMetadata } from "./param-metadata";

params?: ParamMetadata[];
roles?: string[];
roles?: any[];
middlewares?: Array<Middleware<any>>;
}

@@ -9,3 +9,3 @@ import { TypeValueThunk, TypeOptions, ClassTypeResolver, SubscriptionFilterFunc } from "../../types/decorators";

params?: ParamMetadata[];
roles?: string[];
roles?: any[];
middlewares?: Array<Middleware<any>>;

@@ -12,0 +12,0 @@ }

{
"name": "type-graphql",
"version": "0.11.2",
"version": "0.11.3",
"main": "./index.js",

@@ -41,4 +41,4 @@ "author": {

"@types/glob": "^5.0.35",
"@types/graphql": "^0.13.0",
"@types/node": "^9.6.7",
"@types/graphql": "^0.13.1",
"@types/node": "^9.6.15",
"class-transformer": "^0.1.9",

@@ -58,4 +58,5 @@ "class-validator": "^0.8.5",

"@types/ws": "^4.0.2",
"apollo-cache-inmemory": "^1.1.12",
"apollo-client": "^2.2.8",
"apollo-cache-inmemory": "^1.2.1",
"apollo-client": "^2.3.1",
"apollo-engine": "^1.1.1",
"apollo-link": "^1.2.2",

@@ -65,4 +66,4 @@ "apollo-link-ws": "^1.0.8",

"graphql-redis-subscriptions": "^1.5.0",
"graphql-tag": "^2.9.1",
"graphql-yoga": "^1.12.1",
"graphql-tag": "^2.9.2",
"graphql-yoga": "^1.13.1",
"gulp-replace": "^0.6.1",

@@ -72,3 +73,3 @@ "gulp-shell": "^0.6.5",

"gulpclass": "^0.1.2",
"husky": "^1.0.0-rc.2",
"husky": "^1.0.0-rc.4",
"ioredis": "^3.2.2",

@@ -79,9 +80,9 @@ "jest": "^22.4.3",

"reflect-metadata": "^0.1.12",
"subscriptions-transport-ws": "^0.9.8",
"ts-jest": "^22.4.4",
"ts-node": "^6.0.1",
"tslint": "^5.9.1",
"tslint-eslint-rules": "^5.1.0",
"typedi": "^0.7.2",
"typeorm": "^0.2.3",
"subscriptions-transport-ws": "^0.9.9",
"ts-jest": "^22.4.6",
"ts-node": "^6.0.3",
"tslint": "^5.10.0",
"tslint-eslint-rules": "^5.2.0",
"typedi": "^0.7.3",
"typeorm": "^0.2.5",
"typeorm-typedi-extensions": "^0.2.1",

@@ -88,0 +89,0 @@ "typescript": "^2.8.3"

@@ -8,3 +8,3 @@ import { PubSubEngine } from "graphql-subscriptions";

export declare function getParams(params: ParamMetadata[], {root, args, context, info}: ResolverData<any>, globalValidate: boolean | ValidatorOptions, pubSub: PubSubEngine): Promise<any[]>;
export declare function applyAuthChecker(middlewares: Array<Middleware<any>>, authMode: AuthMode, authChecker?: AuthChecker, roles?: string[]): void;
export declare function applyAuthChecker(middlewares: Array<Middleware<any>>, authMode: AuthMode, authChecker?: AuthChecker<any, any>, roles?: any[]): void;
export declare function applyMiddlewares(resolverData: ResolverData<any>, middlewares: Array<Middleware<any>>, resolverHandlerFunction: () => any): Promise<any>;

@@ -19,3 +19,3 @@ import { GraphQLScalarType } from "graphql";

validate?: boolean | ValidatorOptions;
authChecker?: AuthChecker;
authChecker?: AuthChecker<any, any>;
authMode?: AuthMode;

@@ -29,3 +29,3 @@ pubSub?: PubSubEngine | PubSubOptions;

static validate: boolean | ValidatorOptions;
static authChecker?: AuthChecker<any>;
static authChecker?: AuthChecker<any, any>;
static authMode: AuthMode;

@@ -32,0 +32,0 @@ static pubSub: PubSubEngine;

@@ -34,1 +34,2 @@ import { GraphQLScalarType } from "graphql";

}
export declare type MethodAndPropDecorator = PropertyDecorator & MethodDecorator;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc