graphql-auth
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -33,3 +33,2 @@ export class ContextError extends Error { | ||
const next = callback ? callback : scope; | ||
let requiredScope = callback ? scope : null; | ||
@@ -41,6 +40,9 @@ return async function(_, __, context, info) { | ||
if (requiredScope && typeof requiredScope === 'function') | ||
let requiredScope = callback ? scope : null; | ||
if (requiredScope && typeof requiredScope === 'function') { | ||
requiredScope = await Promise.resolve().then(() => | ||
requiredScope(_, __, context, info), | ||
); | ||
} | ||
@@ -47,0 +49,0 @@ if ( |
{ | ||
"name": "graphql-auth", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "GraphQL authentication and authorization middleware", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
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
122048
9
117