Skip to content

Commit 9d3eb49

Browse files
author
Prosper Otemuyiwa
authored
Merge pull request apollographql#160 from apollographql/lorensr-patch-1
Fix typo in access-control.md
2 parents 6121233 + 08b032b commit 9d3eb49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/source/guides/access-control.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ This example is a field in our schema named `users` that returns a list of users
101101

102102
One choice to make when building out our resolvers is what an unauthorized field should return. In some use cases, returning `null` here is perfectly valid. Alternatives to this would be to return an empty array, `[]` or to throw an error, telling the client that they’re not allowed to access that field. For the sake of simplicity, we just returned `[]` in this example.
103103

104-
Now let’s expand that example a little further, and only allow users with an `admin` role to look at our user list. After all, we probably don’t just anyone to have access to all our users.
104+
Now let’s expand that example a little further, and only allow users with an `admin` role to look at our user list. After all, we probably don’t want just anyone to have access to all our users.
105105

106106
```js
107107
users: (root, args, context) => {
@@ -225,4 +225,4 @@ export const generateUserModel = ({ req }) => ({
225225
});
226226
```
227227
228-
If your REST endpoint is already backed by some form of authorization, this cuts down a lot of the logic that needs to get built in the GraphQL layer. This can be a great option when building a GraphQL API over an existing REST API that has everything you need already built in.
228+
If your REST endpoint is already backed by some form of authorization, this cuts down a lot of the logic that needs to get built in the GraphQL layer. This can be a great option when building a GraphQL API over an existing REST API that has everything you need already built in.

0 commit comments

Comments
 (0)