fix: Allow external errors for graphql shield
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
c935f3f691
commit
96cca96bff
@@ -20,14 +20,19 @@ const isAuthenticated = rule()(async (_parent, _args, req) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const authentication = shield({
|
const authentication = shield(
|
||||||
Query: {
|
{
|
||||||
'*': isAuthenticated,
|
Query: {
|
||||||
|
'*': isAuthenticated,
|
||||||
|
},
|
||||||
|
Mutation: {
|
||||||
|
'*': isAuthenticated,
|
||||||
|
login: allow,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Mutation: {
|
{
|
||||||
'*': isAuthenticated,
|
allowExternalErrors: true,
|
||||||
login: allow,
|
}
|
||||||
},
|
);
|
||||||
});
|
|
||||||
|
|
||||||
export default authentication;
|
export default authentication;
|
||||||
|
Reference in New Issue
Block a user