relay-runtime 0.0.0-main-48e33513 → 0.0.0-main-e77cae69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/experimental.js
CHANGED
package/index.js
CHANGED
|
@@ -37,7 +37,7 @@ const validateMutation = require('./validateMutation');
|
|
|
37
37
|
const invariant = require('invariant');
|
|
38
38
|
const warning = require('warning');
|
|
39
39
|
|
|
40
|
-
export type MutationConfig<TMutation: MutationParameters> = {
|
|
40
|
+
export type MutationConfig<TMutation: MutationParameters> = $ReadOnly<{
|
|
41
41
|
cacheConfig?: CacheConfig,
|
|
42
42
|
configs?: Array<DeclarativeMutationConfig>,
|
|
43
43
|
mutation: GraphQLTaggedNode,
|
|
@@ -57,9 +57,9 @@ export type MutationConfig<TMutation: MutationParameters> = {
|
|
|
57
57
|
updater?: ?SelectorStoreUpdater<TMutation['response']>,
|
|
58
58
|
uploadables?: UploadableMap,
|
|
59
59
|
variables: TMutation['variables'],
|
|
60
|
-
}
|
|
60
|
+
}>;
|
|
61
61
|
|
|
62
|
-
export type CommitMutationConfig<TVariables, TData, TRawResponse> = {
|
|
62
|
+
export type CommitMutationConfig<TVariables, TData, TRawResponse> = $ReadOnly<{
|
|
63
63
|
cacheConfig?: CacheConfig,
|
|
64
64
|
configs?: Array<DeclarativeMutationConfig>,
|
|
65
65
|
mutation: Mutation<TVariables, TData, TRawResponse>,
|
|
@@ -72,7 +72,7 @@ export type CommitMutationConfig<TVariables, TData, TRawResponse> = {
|
|
|
72
72
|
updater?: ?SelectorStoreUpdater<TData>,
|
|
73
73
|
uploadables?: UploadableMap,
|
|
74
74
|
variables: TVariables,
|
|
75
|
-
}
|
|
75
|
+
}>;
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Higher-level helper function to execute a mutation against a specific
|
package/package.json
CHANGED
|
@@ -41,16 +41,17 @@ export type SubscriptionParameters = {
|
|
|
41
41
|
* Updated Flow type that makes use of typed graphql tagged literals with
|
|
42
42
|
* type information.
|
|
43
43
|
*/
|
|
44
|
-
export type GraphQLSubscriptionConfig<TVariables, TData, TRawResponse> =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
export type GraphQLSubscriptionConfig<TVariables, TData, TRawResponse> =
|
|
45
|
+
$ReadOnly<{
|
|
46
|
+
configs?: Array<DeclarativeMutationConfig>,
|
|
47
|
+
cacheConfig?: CacheConfig,
|
|
48
|
+
subscription: GraphQLSubscription<TVariables, TData, TRawResponse>,
|
|
49
|
+
variables: TVariables,
|
|
50
|
+
onCompleted?: ?() => void,
|
|
51
|
+
onError?: ?(error: Error) => void,
|
|
52
|
+
onNext?: ?(response: ?TData) => void,
|
|
53
|
+
updater?: ?SelectorStoreUpdater<TData>,
|
|
54
|
+
}>;
|
|
54
55
|
|
|
55
56
|
function requestSubscription<TVariables: Variables, TData, TRawResponse>(
|
|
56
57
|
environment: IEnvironment,
|