You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API_DOCS.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ To use this feature, there are several restrictions. (Please open an issue if yo
132
132
```
133
133
134
134
2. In the response, `properties` are spread at the same level as the `responseKey`. (Check out `getFilmsV2` in [swapi example](./examples/swapi/swapi.js).)
135
-
3. All `properties` must be optional in the response object. The flow types currently don't handle the nullability of these properties correctly, so to enforce this, we recommend a build step to ensure that the underlying types are always set as maybe types.
135
+
3. All `properties` must be optional in the response object. The TypeScript types currently don't handle the nullability of these properties correctly, so to enforce this, we recommend a build step to ensure that the underlying types are always set as maybe types.
136
136
4. The resource must have a one-to-one correspondence between the input "properties" and the output "properties".
137
137
-e.g. if we request property "name", the response must have "name"in it, and no extra data associated with it.
138
138
@@ -158,7 +158,7 @@ resources:
158
158
responseKey: ?string (non-optional when propertyBatchKey is used)
159
159
160
160
typings:
161
-
language: flow
161
+
language: typescript
162
162
embedResourcesType:
163
163
imports: string
164
164
ResourcesType: string
@@ -199,7 +199,7 @@ Use this to generate type definitions for the generated DataLoaders. At this tim
|`language`| Must be 'flow' until we support other options.|
202
+
|`language`| Must be 'typescript' until we support other options. |
203
203
|`embedResourcesType.imports`| Lets you inject an arbitrary import statement into the generated file, to help you write the type statement below. |
204
204
|`embedResourcesType.ResourcesType`| Inject code to describe the shape of the resources object you're going to pass into `getLoaders`. Should start with `type ResourcesType = ...` |
0 commit comments