@pothos/plugin-scope-auth
Advanced tools
Comparing version 3.4.0 to 3.4.1
# Change Log | ||
## 3.4.1 | ||
### Patch Changes | ||
- e7d18c41: make error formatter optional for runAuthScopes | ||
## 3.4.0 | ||
@@ -4,0 +10,0 @@ |
@@ -14,3 +14,3 @@ import { FieldKind, FieldNullability, FieldOptionsFromKind, FieldRef, InputFieldMap, InputShapeFromFields, MaybePromise, Normalize, Resolver, RootName, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core'; | ||
interface SchemaBuilder<Types extends SchemaTypes> { | ||
runAuthScopes: (context: Types['Context'], scopes: AuthScopeMap<Types>, unauthorizedError: (result: ForbiddenResult) => Error | string) => MaybePromise<void>; | ||
runAuthScopes: (context: Types['Context'], scopes: AuthScopeMap<Types>, unauthorizedError?: (result: ForbiddenResult) => Error | string) => MaybePromise<void>; | ||
} | ||
@@ -17,0 +17,0 @@ interface BuildSchemaOptions<Types extends SchemaTypes> { |
@@ -14,3 +14,3 @@ import { FieldKind, FieldNullability, FieldOptionsFromKind, FieldRef, InputFieldMap, InputShapeFromFields, MaybePromise, Normalize, Resolver, RootName, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core'; | ||
interface SchemaBuilder<Types extends SchemaTypes> { | ||
runAuthScopes: (context: Types['Context'], scopes: AuthScopeMap<Types>, unauthorizedError: (result: ForbiddenResult) => Error | string) => MaybePromise<void>; | ||
runAuthScopes: (context: Types['Context'], scopes: AuthScopeMap<Types>, unauthorizedError?: (result: ForbiddenResult) => Error | string) => MaybePromise<void>; | ||
} | ||
@@ -17,0 +17,0 @@ interface BuildSchemaOptions<Types extends SchemaTypes> { |
{ | ||
"name": "@pothos/plugin-scope-auth", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "A Pothos plugin for adding scope based authorization checks to your GraphQL Schema", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -48,3 +48,3 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
scopes: AuthScopeMap<Types>, | ||
unauthorizedError: (result: ForbiddenResult) => Error | string, | ||
unauthorizedError?: (result: ForbiddenResult) => Error | string, | ||
) => MaybePromise<void>; | ||
@@ -51,0 +51,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
265476