fix: ensures auth/me relations in gql can be queried
This commit is contained in:
@@ -37,12 +37,14 @@ export default ({ secret, config, collections }: Payload): PassportStrategy => {
|
||||
};
|
||||
}
|
||||
|
||||
const isGraphQL = req.url === config.routes.graphQL;
|
||||
|
||||
const userQuery = await find({
|
||||
where,
|
||||
collection,
|
||||
req,
|
||||
overrideAccess: true,
|
||||
depth: collection.config.auth.depth,
|
||||
depth: isGraphQL ? 0 : collection.config.auth.depth,
|
||||
});
|
||||
|
||||
if (userQuery.docs && userQuery.docs.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user