Do not verify token during tests
This commit is contained in:
@@ -28,6 +28,10 @@ const dataSources = () => ({
|
||||
});
|
||||
|
||||
const context = async ({ req }) => {
|
||||
if (process.env.NODE_ENV == 'test') {
|
||||
return { auth: 'testuser' };
|
||||
}
|
||||
|
||||
const authHeader = req.headers.authorization || '';
|
||||
if (authHeader.startsWith('Bearer ')) {
|
||||
const token = authHeader.substring(7, authHeader.length);
|
||||
|
||||
Reference in New Issue
Block a user