Skip to content

Commit d84ec41

Browse files
committed
fix README.md
1 parent f39068c commit d84ec41

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,17 @@ Consider the following resource that returns information about users:
110110
const getUserInfo = (args: {
111111
user_ids: Array<number>,
112112
locale: string,
113-
include_private_info?: boolean,
113+
include_slow_fields?: boolean,
114114
}): Promise<Array<UserInfo>> => fetch('/userInfo', args);
115115
```
116116

117117
This is a [batch resource](https://www.codementor.io/blog/batch-endpoints-6olbjay1hd) that accepts a list of users (`user_ids`) and returns a list of corresponding user objects (`Array<UserInfo>`).
118118

119-
For the DataLoader version of this, we'll want to instead ask for a _single_ user
119+
For the DataLoader version of this, we'll want to instead ask for a **single** user
120120
object at a time. This means we need to transform the interface in the following
121121
ways:
122122

123-
1. Call `.load` with the same arguments, but switch "user*ids" to "user_id".
124-
(\_Because we're only asking for the one user!*)
123+
1. Call `.load` with the same arguments, but switch "user_ids" to "user_id".
125124

126125
2. Return a _single_ `UserInfo` object from `.load`, instead of an _array_ of
127126
`UserInfo` objects.

images/demo.png

5.67 KB
Loading

0 commit comments

Comments
 (0)