fix: ensures auth/me relations in gql can be queried

This commit is contained in:
James
2022-07-08 10:25:00 -07:00
parent 567d8c19bf
commit 01bc1fef1e

View File

@@ -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) {