Skip to content

Commit

Permalink
docs(readme): better phrasing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEdoRan authored Apr 22, 2023
1 parent 19e374d commit e3c8026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Image example:

## Authenticated mutation

The library also supports creating protected mutations, that will return a `serverError` back if user is not authenticated. You need to make some changes to the above code to be able to use them.
The library also supports creating protected mutations, that will return a `serverError` back if user is not authenticated. You need to make some changes to the above code in order to use them.

First, when creating the safe mutation client, you **must** provide an `async function` called `getAuthData` as an option. You can return anything you want from here. If you find out that the user is not authenticated, you can safely throw an error in this function. It will be caught, and the client will receive a `serverError` response.

Expand Down

0 comments on commit e3c8026

Please sign in to comment.