react-relay 11.0.0 → 13.0.0-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. package/ReactRelayContext.js +1 -1
  2. package/ReactRelayContext.js.flow +2 -3
  3. package/ReactRelayFragmentContainer.js.flow +24 -24
  4. package/ReactRelayFragmentMockRenderer.js.flow +1 -1
  5. package/ReactRelayLocalQueryRenderer.js.flow +7 -8
  6. package/ReactRelayPaginationContainer.js.flow +111 -54
  7. package/ReactRelayQueryFetcher.js.flow +9 -10
  8. package/ReactRelayQueryRenderer.js.flow +115 -81
  9. package/ReactRelayRefetchContainer.js.flow +40 -35
  10. package/ReactRelayTestMocker.js.flow +16 -12
  11. package/ReactRelayTypes.js.flow +10 -10
  12. package/RelayContext.js.flow +3 -3
  13. package/__flowtests__/ReactRelayFragmentContainer-flowtest.js.flow +1 -2
  14. package/__flowtests__/ReactRelayPaginationContainer-flowtest.js.flow +12 -7
  15. package/__flowtests__/ReactRelayRefetchContainer-flowtest.js.flow +10 -6
  16. package/__flowtests__/RelayModern-flowtest.js.flow +78 -46
  17. package/__flowtests__/RelayModernFlowtest_badref.graphql.js.flow +5 -4
  18. package/__flowtests__/RelayModernFlowtest_notref.graphql.js.flow +5 -4
  19. package/__flowtests__/RelayModernFlowtest_user.graphql.js.flow +4 -3
  20. package/__flowtests__/RelayModernFlowtest_users.graphql.js.flow +4 -3
  21. package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer.graphql.js.flow +72 -0
  22. package/__flowtests__/__generated__/ReactRelayFragmentContainerFlowtest_viewer2.graphql.js.flow +72 -0
  23. package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtestQuery.graphql.js.flow +227 -0
  24. package/__flowtests__/__generated__/ReactRelayPaginationContainerFlowtest_viewer.graphql.js.flow +164 -0
  25. package/__flowtests__/__generated__/ReactRelayRefetchContainerFlowtestQuery.graphql.js.flow +227 -0
  26. package/__flowtests__/__generated__/ReactRelayRefetchContainerFlowtest_viewer.graphql.js.flow +164 -0
  27. package/__flowtests__/__generated__/RelayModernFlowtest_badref.graphql.js.flow +66 -0
  28. package/__flowtests__/__generated__/RelayModernFlowtest_notref.graphql.js.flow +66 -0
  29. package/__flowtests__/__generated__/RelayModernFlowtest_user.graphql.js.flow +59 -0
  30. package/__flowtests__/__generated__/RelayModernFlowtest_users.graphql.js.flow +61 -0
  31. package/assertFragmentMap.js.flow +2 -2
  32. package/buildReactRelayContainer.js.flow +15 -12
  33. package/getRootVariablesForFragments.js.flow +2 -3
  34. package/hooks.js +1 -1
  35. package/hooks.js.flow +5 -6
  36. package/index.js +1 -1
  37. package/index.js.flow +6 -7
  38. package/jest-react/enqueueTask.js.flow +56 -0
  39. package/jest-react/index.js.flow +12 -0
  40. package/jest-react/internalAct.js.flow +139 -0
  41. package/legacy.js +1 -1
  42. package/lib/ReactRelayFragmentContainer.js +21 -15
  43. package/lib/ReactRelayFragmentMockRenderer.js +2 -2
  44. package/lib/ReactRelayLocalQueryRenderer.js +7 -8
  45. package/lib/ReactRelayPaginationContainer.js +92 -30
  46. package/lib/ReactRelayQueryFetcher.js +3 -3
  47. package/lib/ReactRelayQueryRenderer.js +86 -53
  48. package/lib/ReactRelayRefetchContainer.js +36 -21
  49. package/lib/ReactRelayTestMocker.js +7 -6
  50. package/lib/RelayContext.js +3 -2
  51. package/lib/assertFragmentMap.js +3 -2
  52. package/lib/buildReactRelayContainer.js +14 -11
  53. package/lib/hooks.js +5 -5
  54. package/lib/index.js +7 -7
  55. package/lib/jest-react/enqueueTask.js +53 -0
  56. package/lib/jest-react/index.js +13 -0
  57. package/lib/jest-react/internalAct.js +116 -0
  58. package/lib/multi-actor/ActorChange.js +30 -0
  59. package/lib/multi-actor/index.js +11 -0
  60. package/lib/multi-actor/useRelayActorEnvironment.js +29 -0
  61. package/lib/relay-hooks/EntryPointContainer.react.js +3 -3
  62. package/lib/relay-hooks/FragmentResource.js +351 -94
  63. package/lib/relay-hooks/LRUCache.js +1 -1
  64. package/lib/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js +4 -4
  65. package/lib/relay-hooks/MatchContainer.js +1 -1
  66. package/lib/relay-hooks/QueryResource.js +172 -29
  67. package/lib/relay-hooks/RelayEnvironmentProvider.js +5 -3
  68. package/lib/relay-hooks/SuspenseResource.js +130 -0
  69. package/lib/relay-hooks/loadQuery.js +42 -20
  70. package/lib/relay-hooks/preloadQuery_DEPRECATED.js +24 -15
  71. package/lib/relay-hooks/useBlockingPaginationFragment.js +4 -5
  72. package/lib/relay-hooks/useEntryPointLoader.js +2 -2
  73. package/lib/relay-hooks/useFetchTrackingRef.js +2 -1
  74. package/lib/relay-hooks/useFragment.js +8 -7
  75. package/lib/relay-hooks/useFragmentNode.js +4 -4
  76. package/lib/relay-hooks/useIsOperationNodeActive.js +3 -3
  77. package/lib/relay-hooks/useLazyLoadQuery.js +3 -3
  78. package/lib/relay-hooks/useLazyLoadQueryNode.js +10 -4
  79. package/lib/relay-hooks/useLoadMoreFunction.js +6 -8
  80. package/lib/relay-hooks/useMemoOperationDescriptor.js +2 -2
  81. package/lib/relay-hooks/useMemoVariables.js +2 -2
  82. package/lib/relay-hooks/useMutation.js +17 -6
  83. package/lib/relay-hooks/usePaginationFragment.js +2 -3
  84. package/lib/relay-hooks/usePreloadedQuery.js +8 -7
  85. package/lib/relay-hooks/useQueryLoader.js +30 -10
  86. package/lib/relay-hooks/useRefetchableFragmentNode.js +12 -14
  87. package/lib/relay-hooks/useRelayEnvironment.js +3 -3
  88. package/lib/relay-hooks/useStaticFragmentNodeWarning.js +2 -2
  89. package/lib/relay-hooks/useSubscribeToInvalidationState.js +2 -1
  90. package/lib/relay-hooks/useSubscription.js +10 -7
  91. package/multi-actor/ActorChange.js.flow +58 -0
  92. package/multi-actor/index.js.flow +14 -0
  93. package/multi-actor/useRelayActorEnvironment.js.flow +49 -0
  94. package/package.json +3 -2
  95. package/react-relay-hooks.js +2 -2
  96. package/react-relay-hooks.min.js +2 -2
  97. package/react-relay-legacy.js +2 -2
  98. package/react-relay-legacy.min.js +2 -2
  99. package/react-relay.js +2 -2
  100. package/react-relay.min.js +2 -2
  101. package/relay-hooks/EntryPointContainer.react.js.flow +8 -15
  102. package/relay-hooks/EntryPointTypes.flow.js.flow +24 -25
  103. package/relay-hooks/FragmentResource.js.flow +376 -95
  104. package/relay-hooks/LazyLoadEntryPointContainer_DEPRECATED.react.js.flow +32 -46
  105. package/relay-hooks/MatchContainer.js.flow +3 -2
  106. package/relay-hooks/QueryResource.js.flow +216 -25
  107. package/relay-hooks/RelayEnvironmentProvider.js.flow +14 -4
  108. package/relay-hooks/SuspenseResource.js.flow +115 -0
  109. package/relay-hooks/__flowtests__/EntryPointTypes/EntryPointElementConfig-flowtest.js.flow +4 -3
  110. package/relay-hooks/__flowtests__/EntryPointTypes/NestedEntrypoints-flowtest.js.flow +1 -1
  111. package/relay-hooks/__flowtests__/useBlockingPaginationFragment-flowtest.js.flow +10 -9
  112. package/relay-hooks/__flowtests__/useFragment-flowtest.js.flow +8 -7
  113. package/relay-hooks/__flowtests__/usePaginationFragment-flowtest.js.flow +10 -9
  114. package/relay-hooks/__flowtests__/useRefetchableFragment-flowtest.js.flow +10 -9
  115. package/relay-hooks/__flowtests__/utils.js.flow +8 -12
  116. package/relay-hooks/loadEntryPoint.js.flow +6 -12
  117. package/relay-hooks/loadQuery.js.flow +49 -31
  118. package/relay-hooks/preloadQuery_DEPRECATED.js.flow +30 -21
  119. package/relay-hooks/prepareEntryPoint_DEPRECATED.js.flow +6 -12
  120. package/relay-hooks/useBlockingPaginationFragment.js.flow +13 -11
  121. package/relay-hooks/useEntryPointLoader.js.flow +7 -10
  122. package/relay-hooks/useFetchTrackingRef.js.flow +2 -2
  123. package/relay-hooks/useFragment.js.flow +26 -46
  124. package/relay-hooks/useFragmentNode.js.flow +5 -7
  125. package/relay-hooks/useIsOperationNodeActive.js.flow +3 -5
  126. package/relay-hooks/useIsParentQueryActive.js.flow +3 -4
  127. package/relay-hooks/useLazyLoadQuery.js.flow +9 -10
  128. package/relay-hooks/useLazyLoadQueryNode.js.flow +19 -13
  129. package/relay-hooks/useLoadMoreFunction.js.flow +20 -27
  130. package/relay-hooks/useMemoOperationDescriptor.js.flow +5 -7
  131. package/relay-hooks/useMemoVariables.js.flow +6 -6
  132. package/relay-hooks/useMutation.js.flow +26 -26
  133. package/relay-hooks/usePaginationFragment.js.flow +38 -44
  134. package/relay-hooks/usePreloadedQuery.js.flow +18 -14
  135. package/relay-hooks/useQueryLoader.js.flow +41 -22
  136. package/relay-hooks/useRefetchableFragment.js.flow +7 -8
  137. package/relay-hooks/useRefetchableFragmentNode.js.flow +24 -30
  138. package/relay-hooks/useRelayEnvironment.js.flow +2 -4
  139. package/relay-hooks/useStaticFragmentNodeWarning.js.flow +2 -3
  140. package/relay-hooks/useSubscribeToInvalidationState.js.flow +3 -6
  141. package/relay-hooks/useSubscription.js.flow +20 -10
  142. package/lib/relay-hooks/getPaginationMetadata.js +0 -41
  143. package/lib/relay-hooks/getPaginationVariables.js +0 -66
  144. package/lib/relay-hooks/getRefetchMetadata.js +0 -36
  145. package/lib/relay-hooks/getValueAtPath.js +0 -51
  146. package/relay-hooks/getPaginationMetadata.js.flow +0 -74
  147. package/relay-hooks/getPaginationVariables.js.flow +0 -108
  148. package/relay-hooks/getRefetchMetadata.js.flow +0 -80
  149. package/relay-hooks/getValueAtPath.js.flow +0 -46
@@ -12,15 +12,6 @@
12
12
 
13
13
  'use strict';
14
14
 
15
- const React = require('react');
16
-
17
- declare function nullthrows<T>(x: ?T): T;
18
-
19
- const {
20
- createContainer: createFragmentContainer,
21
- } = require('../ReactRelayFragmentContainer');
22
- const {graphql} = require('relay-runtime');
23
-
24
15
  import type {$FragmentRef} from '../ReactRelayTypes';
25
16
  import type {RelayModernFlowtest_badref} from './RelayModernFlowtest_badref.graphql';
26
17
  import type {RelayModernFlowtest_notref} from './RelayModernFlowtest_notref.graphql';
@@ -33,6 +24,14 @@ import type {
33
24
  RelayModernFlowtest_users$ref,
34
25
  } from './RelayModernFlowtest_users.graphql';
35
26
 
27
+ const {
28
+ createContainer: createFragmentContainer,
29
+ } = require('../ReactRelayFragmentContainer');
30
+ const React = require('react');
31
+ const {graphql} = require('relay-runtime');
32
+
33
+ declare function nullthrows<T>(x: ?T): T;
34
+
36
35
  class NotReferencedTest_ extends React.Component<{
37
36
  notref: RelayModernFlowtest_notref,
38
37
  ...
@@ -97,7 +96,7 @@ class SingularTest extends React.Component<{
97
96
  return null;
98
97
  }
99
98
  }
100
- SingularTest = createFragmentContainer(SingularTest, {
99
+ const SingularTestFragment = createFragmentContainer(SingularTest, {
101
100
  user: graphql`
102
101
  fragment RelayModernFlowtest_user on User {
103
102
  name
@@ -120,7 +119,7 @@ class PluralTest extends React.Component<{
120
119
  return null;
121
120
  }
122
121
  }
123
- PluralTest = createFragmentContainer(PluralTest, {
122
+ const PluralTestFragment = createFragmentContainer(PluralTest, {
124
123
  users: graphql`
125
124
  fragment RelayModernFlowtest_users on User @relay(plural: true) {
126
125
  name
@@ -129,46 +128,71 @@ PluralTest = createFragmentContainer(PluralTest, {
129
128
  });
130
129
 
131
130
  declare var aUserRef: {
132
- +$fragmentRefs: RelayModernFlowtest_user$ref,
131
+ +$fragmentSpreads: RelayModernFlowtest_user$ref,
133
132
  ...
134
133
  };
135
134
 
136
135
  declare var oneOfUsersRef: {
137
- +$fragmentRefs: RelayModernFlowtest_users$ref,
136
+ +$fragmentSpreads: RelayModernFlowtest_users$ref,
138
137
  ...
139
138
  };
140
139
 
141
140
  declare var usersRef: $ReadOnlyArray<{
142
- +$fragmentRefs: RelayModernFlowtest_users$ref,
141
+ +$fragmentSpreads: RelayModernFlowtest_users$ref,
143
142
  ...
144
143
  }>;
145
144
 
146
145
  declare var nonUserRef: {
147
- +$fragmentRefs: {thing: true, ...},
146
+ +$fragmentSpreads: {thing: true, ...},
148
147
  ...
149
148
  };
150
149
 
151
150
  function cb(): void {}
152
151
 
153
- // $FlowExpectedError - can't pass null for user
154
- <SingularTest onClick={cb} string="x" user={null} nullableUser={null} />;
152
+ <SingularTestFragment
153
+ onClick={cb}
154
+ string="x"
155
+ // $FlowExpectedError - can't pass null for user
156
+ user={null}
157
+ nullableUser={null}
158
+ />;
155
159
  // $FlowExpectedError - user is required
156
- <SingularTest onClick={cb} string="x" nullableUser={null} />;
157
- // $FlowExpectedError - can't pass non-user ref for user
158
- <SingularTest onClick={cb} string="x" user={nonUserRef} nullableUser={null} />;
159
- // $FlowExpectedError - `cb` prop is not a function
160
- <SingularTest onClick="cb" string="x" user={aUserRef} nullableUser={null} />;
161
- // $FlowExpectedError - `string` prop is not a string
162
- <SingularTest onClick={cb} string={1} user={aUserRef} nullableUser={null} />;
163
-
164
- <SingularTest onClick={cb} string="x" user={aUserRef} nullableUser={null} />;
165
- <SingularTest
160
+ <SingularTestFragment onClick={cb} string="x" nullableUser={null} />;
161
+ <SingularTestFragment
162
+ onClick={cb}
163
+ string="x"
164
+ // $FlowExpectedError - can't pass non-user ref for user
165
+ user={nonUserRef}
166
+ nullableUser={null}
167
+ />;
168
+ <SingularTestFragment
169
+ // $FlowExpectedError - `cb` prop is not a function
170
+ onClick="cb"
171
+ string="x"
172
+ user={aUserRef}
173
+ nullableUser={null}
174
+ />;
175
+ <SingularTestFragment
176
+ onClick={cb}
177
+ // $FlowExpectedError - `string` prop is not a string
178
+ string={1}
179
+ user={aUserRef}
180
+ nullableUser={null}
181
+ />;
182
+
183
+ <SingularTestFragment
184
+ onClick={cb}
185
+ string="x"
186
+ user={aUserRef}
187
+ nullableUser={null}
188
+ />;
189
+ <SingularTestFragment
166
190
  onClick={cb}
167
191
  string="x"
168
192
  user={aUserRef}
169
193
  nullableUser={aUserRef}
170
194
  />;
171
- <SingularTest
195
+ <SingularTestFragment
172
196
  onClick={cb}
173
197
  string="x"
174
198
  user={aUserRef}
@@ -177,7 +201,7 @@ function cb(): void {}
177
201
  />;
178
202
 
179
203
  // $FlowExpectedError - onClick is required
180
- <SingularTest
204
+ <SingularTestFragment
181
205
  string="x"
182
206
  user={aUserRef}
183
207
  nullableUser={null}
@@ -186,13 +210,13 @@ function cb(): void {}
186
210
  />;
187
211
 
188
212
  declare var aComplexUserRef: {
189
- +$fragmentRefs: {thing1: true, ...} & RelayModernFlowtest_user$ref & {
213
+ +$fragmentSpreads: {thing1: true, ...} & RelayModernFlowtest_user$ref & {
190
214
  thing2: true,
191
215
  ...
192
216
  },
193
217
  ...
194
218
  };
195
- <SingularTest
219
+ <SingularTestFragment
196
220
  string="x"
197
221
  onClick={cb}
198
222
  user={aComplexUserRef}
@@ -201,34 +225,42 @@ declare var aComplexUserRef: {
201
225
  />;
202
226
 
203
227
  // $FlowExpectedError - can't pass null for user
204
- <PluralTest users={null} nullableUsers={null} />;
228
+ <PluralTestFragment users={null} nullableUsers={null} />;
205
229
  // $FlowExpectedError - users is required
206
- <PluralTest nullableUsers={null} />;
230
+ <PluralTestFragment nullableUsers={null} />;
207
231
  // $FlowExpectedError - can't pass non-user refs for user
208
- <PluralTest users={[nonUserRef]} nullableUsers={null} />;
232
+ <PluralTestFragment users={[nonUserRef]} nullableUsers={null} />;
209
233
 
210
- <PluralTest users={usersRef} nullableUsers={null} />;
234
+ <PluralTestFragment users={usersRef} nullableUsers={null} />;
211
235
 
212
- <PluralTest
236
+ <PluralTestFragment
213
237
  users={([oneOfUsersRef]: Array<typeof oneOfUsersRef>)}
214
238
  nullableUsers={null}
215
239
  />;
216
- <PluralTest users={[oneOfUsersRef]} nullableUsers={null} />;
240
+ <PluralTestFragment users={[oneOfUsersRef]} nullableUsers={null} />;
217
241
 
218
- <PluralTest users={usersRef} nullableUsers={[oneOfUsersRef]} />;
219
- <PluralTest users={usersRef} nullableUsers={null} optionalUsers={usersRef} />;
220
- // $FlowExpectedError - optional, not nullable!
221
- <PluralTest users={usersRef} nullableUsers={null} optionalUsers={null} />;
242
+ <PluralTestFragment users={usersRef} nullableUsers={[oneOfUsersRef]} />;
243
+ <PluralTestFragment
244
+ users={usersRef}
245
+ nullableUsers={null}
246
+ optionalUsers={usersRef}
247
+ />;
248
+ <PluralTestFragment
249
+ users={usersRef}
250
+ nullableUsers={null}
251
+ // $FlowExpectedError - optional, not nullable!
252
+ optionalUsers={null}
253
+ />;
222
254
 
223
255
  class AnyTest extends React.Component<{|
224
256
  anything: any,
225
257
  |}> {}
226
258
  const AnyTestContainer = createFragmentContainer(AnyTest, {});
227
259
 
228
- <AnyTest anything={42} />;
229
- <AnyTest anything={null} />;
230
- <AnyTest anything={() => {}} />;
260
+ <AnyTestContainer anything={42} />;
261
+ <AnyTestContainer anything={null} />;
262
+ <AnyTestContainer anything={() => {}} />;
231
263
  // $FlowExpectedError - any other prop can not be passed
232
- <AnyTest anything={null} anythingElse={42} />;
264
+ <AnyTestContainer anything={null} anythingElse={42} />;
233
265
  // $FlowExpectedError - anything has to be passed
234
- <AnyTest />;
266
+ <AnyTestContainer />;
@@ -13,10 +13,11 @@
13
13
  'use strict';
14
14
 
15
15
  import type {RelayModernFlowtest_user$ref} from './RelayModernFlowtest_user.graphql';
16
- import type {FragmentReference} from 'relay-runtime';
17
- declare export opaque type RelayModernFlowtest_badref$ref: FragmentReference;
16
+ import type {FragmentType} from 'relay-runtime';
17
+
18
+ declare export opaque type RelayModernFlowtest_badref$ref: FragmentType;
18
19
  export type RelayModernFlowtest_badref = {|
19
20
  +id: string,
20
- +$fragmentRefs: RelayModernFlowtest_user$ref,
21
- +$refType: RelayModernFlowtest_badref$ref,
21
+ +$fragmentSpreads: RelayModernFlowtest_user$ref,
22
+ +$fragmentType: RelayModernFlowtest_badref$ref,
22
23
  |};
@@ -13,10 +13,11 @@
13
13
  'use strict';
14
14
 
15
15
  import type {RelayModernFlowtest_user$ref} from './RelayModernFlowtest_user.graphql';
16
- import type {FragmentReference} from 'relay-runtime';
17
- declare export opaque type RelayModernFlowtest_notref$ref: FragmentReference;
16
+ import type {FragmentType} from 'relay-runtime';
17
+
18
+ declare export opaque type RelayModernFlowtest_notref$ref: FragmentType;
18
19
  export type RelayModernFlowtest_notref = {|
19
20
  +id: string,
20
- +$fragmentRefs: RelayModernFlowtest_user$ref,
21
- +$refType: RelayModernFlowtest_notref$ref,
21
+ +$fragmentSpreads: RelayModernFlowtest_user$ref,
22
+ +$fragmentType: RelayModernFlowtest_notref$ref,
22
23
  |};
@@ -12,9 +12,10 @@
12
12
 
13
13
  'use strict';
14
14
 
15
- import type {FragmentReference} from 'relay-runtime';
16
- declare export opaque type RelayModernFlowtest_user$ref: FragmentReference;
15
+ import type {FragmentType} from 'relay-runtime';
16
+
17
+ declare export opaque type RelayModernFlowtest_user$ref: FragmentType;
17
18
  export type RelayModernFlowtest_user = {|
18
19
  +name: ?string,
19
- +$refType: RelayModernFlowtest_user$ref,
20
+ +$fragmentType: RelayModernFlowtest_user$ref,
20
21
  |};
@@ -12,9 +12,10 @@
12
12
 
13
13
  'use strict';
14
14
 
15
- import type {FragmentReference} from 'relay-runtime';
16
- declare export opaque type RelayModernFlowtest_users$ref: FragmentReference;
15
+ import type {FragmentType} from 'relay-runtime';
16
+
17
+ declare export opaque type RelayModernFlowtest_users$ref: FragmentType;
17
18
  export type RelayModernFlowtest_users = $ReadOnlyArray<{|
18
19
  +name: ?string,
19
- +$refType: RelayModernFlowtest_users$ref,
20
+ +$fragmentType: RelayModernFlowtest_users$ref,
20
21
  |}>;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @generated SignedSource<<19f712deffd1a0e40df03d0125844de6>>
8
+ * @flow
9
+ * @lightSyntaxTransform
10
+ * @nogrep
11
+ */
12
+
13
+ /* eslint-disable */
14
+
15
+ 'use strict';
16
+
17
+ /*::
18
+ import type { Fragment, ReaderFragment } from 'relay-runtime';
19
+ import type { FragmentType } from "relay-runtime";
20
+ declare export opaque type ReactRelayFragmentContainerFlowtest_viewer$fragmentType: FragmentType;
21
+ export type ReactRelayFragmentContainerFlowtest_viewer$ref = ReactRelayFragmentContainerFlowtest_viewer$fragmentType;
22
+ export type ReactRelayFragmentContainerFlowtest_viewer$data = {|
23
+ +actor: ?{|
24
+ +id: string,
25
+ |},
26
+ +$fragmentType: ReactRelayFragmentContainerFlowtest_viewer$fragmentType,
27
+ |};
28
+ export type ReactRelayFragmentContainerFlowtest_viewer = ReactRelayFragmentContainerFlowtest_viewer$data;
29
+ export type ReactRelayFragmentContainerFlowtest_viewer$key = {
30
+ +$data?: ReactRelayFragmentContainerFlowtest_viewer$data,
31
+ +$fragmentSpreads: ReactRelayFragmentContainerFlowtest_viewer$fragmentType,
32
+ ...
33
+ };
34
+ */
35
+
36
+ var node/*: ReaderFragment*/ = {
37
+ "argumentDefinitions": [],
38
+ "kind": "Fragment",
39
+ "metadata": null,
40
+ "name": "ReactRelayFragmentContainerFlowtest_viewer",
41
+ "selections": [
42
+ {
43
+ "alias": null,
44
+ "args": null,
45
+ "concreteType": null,
46
+ "kind": "LinkedField",
47
+ "name": "actor",
48
+ "plural": false,
49
+ "selections": [
50
+ {
51
+ "alias": null,
52
+ "args": null,
53
+ "kind": "ScalarField",
54
+ "name": "id",
55
+ "storageKey": null
56
+ }
57
+ ],
58
+ "storageKey": null
59
+ }
60
+ ],
61
+ "type": "Viewer",
62
+ "abstractKey": null
63
+ };
64
+
65
+ if (__DEV__) {
66
+ (node/*: any*/).hash = "75147ebd599fe1c406f2dfc7abb164f8";
67
+ }
68
+
69
+ module.exports = ((node/*: any*/)/*: Fragment<
70
+ ReactRelayFragmentContainerFlowtest_viewer$fragmentType,
71
+ ReactRelayFragmentContainerFlowtest_viewer$data,
72
+ >*/);
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @generated SignedSource<<88137405f8de7a0ced4a2af2bbf32a29>>
8
+ * @flow
9
+ * @lightSyntaxTransform
10
+ * @nogrep
11
+ */
12
+
13
+ /* eslint-disable */
14
+
15
+ 'use strict';
16
+
17
+ /*::
18
+ import type { Fragment, ReaderFragment } from 'relay-runtime';
19
+ import type { FragmentType } from "relay-runtime";
20
+ declare export opaque type ReactRelayFragmentContainerFlowtest_viewer2$fragmentType: FragmentType;
21
+ export type ReactRelayFragmentContainerFlowtest_viewer2$ref = ReactRelayFragmentContainerFlowtest_viewer2$fragmentType;
22
+ export type ReactRelayFragmentContainerFlowtest_viewer2$data = {|
23
+ +actor: ?{|
24
+ +id: string,
25
+ |},
26
+ +$fragmentType: ReactRelayFragmentContainerFlowtest_viewer2$fragmentType,
27
+ |};
28
+ export type ReactRelayFragmentContainerFlowtest_viewer2 = ReactRelayFragmentContainerFlowtest_viewer2$data;
29
+ export type ReactRelayFragmentContainerFlowtest_viewer2$key = {
30
+ +$data?: ReactRelayFragmentContainerFlowtest_viewer2$data,
31
+ +$fragmentSpreads: ReactRelayFragmentContainerFlowtest_viewer2$fragmentType,
32
+ ...
33
+ };
34
+ */
35
+
36
+ var node/*: ReaderFragment*/ = {
37
+ "argumentDefinitions": [],
38
+ "kind": "Fragment",
39
+ "metadata": null,
40
+ "name": "ReactRelayFragmentContainerFlowtest_viewer2",
41
+ "selections": [
42
+ {
43
+ "alias": null,
44
+ "args": null,
45
+ "concreteType": null,
46
+ "kind": "LinkedField",
47
+ "name": "actor",
48
+ "plural": false,
49
+ "selections": [
50
+ {
51
+ "alias": null,
52
+ "args": null,
53
+ "kind": "ScalarField",
54
+ "name": "id",
55
+ "storageKey": null
56
+ }
57
+ ],
58
+ "storageKey": null
59
+ }
60
+ ],
61
+ "type": "Viewer",
62
+ "abstractKey": null
63
+ };
64
+
65
+ if (__DEV__) {
66
+ (node/*: any*/).hash = "0f55965b7c9aca0d661ebdd96c70e384";
67
+ }
68
+
69
+ module.exports = ((node/*: any*/)/*: Fragment<
70
+ ReactRelayFragmentContainerFlowtest_viewer2$fragmentType,
71
+ ReactRelayFragmentContainerFlowtest_viewer2$data,
72
+ >*/);
@@ -0,0 +1,227 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @generated SignedSource<<5522fec854de09ce0ae6f0046e721cd8>>
8
+ * @flow
9
+ * @lightSyntaxTransform
10
+ * @nogrep
11
+ */
12
+
13
+ /* eslint-disable */
14
+
15
+ 'use strict';
16
+
17
+ /*::
18
+ import type { ConcreteRequest, Query } from 'relay-runtime';
19
+ type ReactRelayPaginationContainerFlowtest_viewer$fragmentType = any;
20
+ export type ReactRelayPaginationContainerFlowtestQuery$variables = {|
21
+ count: number,
22
+ cursor?: ?string,
23
+ |};
24
+ export type ReactRelayPaginationContainerFlowtestQueryVariables = ReactRelayPaginationContainerFlowtestQuery$variables;
25
+ export type ReactRelayPaginationContainerFlowtestQuery$data = {|
26
+ +viewer: ?{|
27
+ +$fragmentSpreads: ReactRelayPaginationContainerFlowtest_viewer$fragmentType,
28
+ |},
29
+ |};
30
+ export type ReactRelayPaginationContainerFlowtestQueryResponse = ReactRelayPaginationContainerFlowtestQuery$data;
31
+ export type ReactRelayPaginationContainerFlowtestQuery = {|
32
+ variables: ReactRelayPaginationContainerFlowtestQueryVariables,
33
+ response: ReactRelayPaginationContainerFlowtestQuery$data,
34
+ |};
35
+ */
36
+
37
+ var node/*: ConcreteRequest*/ = (function(){
38
+ var v0 = [
39
+ {
40
+ "defaultValue": null,
41
+ "kind": "LocalArgument",
42
+ "name": "count"
43
+ },
44
+ {
45
+ "defaultValue": null,
46
+ "kind": "LocalArgument",
47
+ "name": "cursor"
48
+ }
49
+ ],
50
+ v1 = [
51
+ {
52
+ "kind": "Variable",
53
+ "name": "after",
54
+ "variableName": "cursor"
55
+ },
56
+ {
57
+ "kind": "Variable",
58
+ "name": "first",
59
+ "variableName": "count"
60
+ }
61
+ ],
62
+ v2 = {
63
+ "alias": null,
64
+ "args": null,
65
+ "kind": "ScalarField",
66
+ "name": "id",
67
+ "storageKey": null
68
+ };
69
+ return {
70
+ "fragment": {
71
+ "argumentDefinitions": (v0/*: any*/),
72
+ "kind": "Fragment",
73
+ "metadata": null,
74
+ "name": "ReactRelayPaginationContainerFlowtestQuery",
75
+ "selections": [
76
+ {
77
+ "alias": null,
78
+ "args": null,
79
+ "concreteType": "Viewer",
80
+ "kind": "LinkedField",
81
+ "name": "viewer",
82
+ "plural": false,
83
+ "selections": [
84
+ {
85
+ "args": null,
86
+ "kind": "FragmentSpread",
87
+ "name": "ReactRelayPaginationContainerFlowtest_viewer"
88
+ }
89
+ ],
90
+ "storageKey": null
91
+ }
92
+ ],
93
+ "type": "Query",
94
+ "abstractKey": null
95
+ },
96
+ "kind": "Request",
97
+ "operation": {
98
+ "argumentDefinitions": (v0/*: any*/),
99
+ "kind": "Operation",
100
+ "name": "ReactRelayPaginationContainerFlowtestQuery",
101
+ "selections": [
102
+ {
103
+ "alias": null,
104
+ "args": null,
105
+ "concreteType": "Viewer",
106
+ "kind": "LinkedField",
107
+ "name": "viewer",
108
+ "plural": false,
109
+ "selections": [
110
+ {
111
+ "alias": null,
112
+ "args": null,
113
+ "concreteType": "User",
114
+ "kind": "LinkedField",
115
+ "name": "account_user",
116
+ "plural": false,
117
+ "selections": [
118
+ {
119
+ "alias": null,
120
+ "args": (v1/*: any*/),
121
+ "concreteType": "FriendsConnection",
122
+ "kind": "LinkedField",
123
+ "name": "friends",
124
+ "plural": false,
125
+ "selections": [
126
+ {
127
+ "alias": null,
128
+ "args": null,
129
+ "concreteType": "FriendsEdge",
130
+ "kind": "LinkedField",
131
+ "name": "edges",
132
+ "plural": true,
133
+ "selections": [
134
+ {
135
+ "alias": null,
136
+ "args": null,
137
+ "concreteType": "User",
138
+ "kind": "LinkedField",
139
+ "name": "node",
140
+ "plural": false,
141
+ "selections": [
142
+ {
143
+ "alias": null,
144
+ "args": null,
145
+ "kind": "ScalarField",
146
+ "name": "__typename",
147
+ "storageKey": null
148
+ },
149
+ (v2/*: any*/)
150
+ ],
151
+ "storageKey": null
152
+ },
153
+ {
154
+ "alias": null,
155
+ "args": null,
156
+ "kind": "ScalarField",
157
+ "name": "cursor",
158
+ "storageKey": null
159
+ }
160
+ ],
161
+ "storageKey": null
162
+ },
163
+ {
164
+ "alias": null,
165
+ "args": null,
166
+ "concreteType": "PageInfo",
167
+ "kind": "LinkedField",
168
+ "name": "pageInfo",
169
+ "plural": false,
170
+ "selections": [
171
+ {
172
+ "alias": null,
173
+ "args": null,
174
+ "kind": "ScalarField",
175
+ "name": "endCursor",
176
+ "storageKey": null
177
+ },
178
+ {
179
+ "alias": null,
180
+ "args": null,
181
+ "kind": "ScalarField",
182
+ "name": "hasNextPage",
183
+ "storageKey": null
184
+ }
185
+ ],
186
+ "storageKey": null
187
+ }
188
+ ],
189
+ "storageKey": null
190
+ },
191
+ {
192
+ "alias": null,
193
+ "args": (v1/*: any*/),
194
+ "filters": null,
195
+ "handle": "connection",
196
+ "key": "ReactRelayPaginationContainerFlowtest_viewer__friends",
197
+ "kind": "LinkedHandle",
198
+ "name": "friends"
199
+ },
200
+ (v2/*: any*/)
201
+ ],
202
+ "storageKey": null
203
+ }
204
+ ],
205
+ "storageKey": null
206
+ }
207
+ ]
208
+ },
209
+ "params": {
210
+ "cacheID": "92bf8d4e1f48e0016fbd6499173b3f39",
211
+ "id": null,
212
+ "metadata": {},
213
+ "name": "ReactRelayPaginationContainerFlowtestQuery",
214
+ "operationKind": "query",
215
+ "text": "query ReactRelayPaginationContainerFlowtestQuery(\n $count: Int!\n $cursor: ID\n) {\n viewer {\n ...ReactRelayPaginationContainerFlowtest_viewer\n }\n}\n\nfragment ReactRelayPaginationContainerFlowtest_viewer on Viewer {\n account_user {\n friends(after: $cursor, first: $count) {\n edges {\n node {\n __typename\n id\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n id\n }\n}\n"
216
+ }
217
+ };
218
+ })();
219
+
220
+ if (__DEV__) {
221
+ (node/*: any*/).hash = "712afeafa1f51bfe391719629a0fcea0";
222
+ }
223
+
224
+ module.exports = ((node/*: any*/)/*: Query<
225
+ ReactRelayPaginationContainerFlowtestQuery$variables,
226
+ ReactRelayPaginationContainerFlowtestQuery$data,
227
+ >*/);