Added documentation about the disposable.
Summary: Closes
@@ -10,6 +10,10 @@ const {requestSubscription} = require('react-relay');
type Variables = {[name: string]: any};
+type Disposable = {
+ dispose(): void,
+};
+
requestSubscription(
environment: Environment,
config: {
@@ -21,8 +25,9 @@ requestSubscription(
updater?: ?(store: RecordSourceSelectorProxy, data: SelectorData) => void,
configs?: Array<DeclarativeMutationConfig>,
},
-);
+) => Disposable;
```
+The function returns a `Disposable` on which you could call `dispose()` to cancel the refetch.
Now let's take a closer look at the `config`:
