fix: Allow external errors for graphql shield

This commit is contained in:
Faruk AYDIN
2022-03-06 01:09:00 +03:00
committed by Ömer Faruk Aydın
parent c935f3f691
commit 96cca96bff

View File

@@ -20,7 +20,8 @@ const isAuthenticated = rule()(async (_parent, _args, req) => {
} }
}); });
const authentication = shield({ const authentication = shield(
{
Query: { Query: {
'*': isAuthenticated, '*': isAuthenticated,
}, },
@@ -28,6 +29,10 @@ const authentication = shield({
'*': isAuthenticated, '*': isAuthenticated,
login: allow, login: allow,
}, },
}); },
{
allowExternalErrors: true,
}
);
export default authentication; export default authentication;