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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-48e33513
2
+ * Relay v0.0.0-main-e77cae69
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-48e33513
2
+ * Relay v0.0.0-main-e77cae69
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "relay-runtime",
3
3
  "description": "A core runtime for building GraphQL-driven applications.",
4
- "version": "0.0.0-main-48e33513",
4
+ "version": "0.0.0-main-e77cae69",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay"
@@ -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
- configs?: Array<DeclarativeMutationConfig>,
46
- cacheConfig?: CacheConfig,
47
- subscription: GraphQLSubscription<TVariables, TData, TRawResponse>,
48
- variables: TVariables,
49
- onCompleted?: ?() => void,
50
- onError?: ?(error: Error) => void,
51
- onNext?: ?(response: ?TData) => void,
52
- updater?: ?SelectorStoreUpdater<TData>,
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,