From 4f337369388af17dcf0e62cacb4843ce070d70de Mon Sep 17 00:00:00 2001 From: Dominic Saadi <32992335+jtoar@users.noreply.github.com> Date: Fri, 18 Mar 2022 16:58:50 +0900 Subject: [PATCH] copy over fix from learn PR 218 See https://github.com/redwoodjs/learn.redwoodjs.com/pull/218. --- docs/docs/tutorial2/role-based-authorization-control-rbac.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/tutorial2/role-based-authorization-control-rbac.md b/docs/docs/tutorial2/role-based-authorization-control-rbac.md index dec88734ca90..b7c5fc92b731 100644 --- a/docs/docs/tutorial2/role-based-authorization-control-rbac.md +++ b/docs/docs/tutorial2/role-based-authorization-control-rbac.md @@ -491,7 +491,9 @@ Remember: never trust the client! We need to lock down the backend to be sure th Recall in Part 1 of the tutorial we used a [directive](https://redwoodjs.com/docs/directives) `@requireAuth` to be sure that someone was logged in before allowing them to access a given GraphQL query or mutation. It turns out that `@requireAuth` can take an optional `roles` argument: -```javascript {29} +```javascript {31} +// api/src/graphql/comments.sdl.js + export const schema = gql` type Comment { id: Int!