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,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;