Skip to content

Commit 096b772

Browse files
Undo changes to resolver and updatable types
1 parent c4df407 commit 096b772

File tree

265 files changed

+663
-665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+663
-665
lines changed

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/client_mutation_resolver.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type Query {
3030
==================================== OUTPUT ===================================
3131
//- __generated__/barMutation.graphql.js
3232
/**
33-
* <auto-generated> SignedSource<<c9045b1c950e83cede402f0b4626a7c8>>
33+
* <auto-generated> SignedSource<<7f1de50339842bab9cecc72c6fbc076f>>
3434
* @flow
3535
* @lightSyntaxTransform
3636
* @nogrep
@@ -45,7 +45,7 @@ import type { ClientRequest, Mutation } from 'relay-runtime';
4545
import {foo_mutation as mutationFooMutationResolverType} from "../foo.js";
4646
// Type assertion validating that `mutationFooMutationResolverType` resolver is correctly implemented.
4747
// A type error here indicates that the type signature of the resolver module is incorrect.
48-
(mutationFooMutationResolverType: () => boolean | null);
48+
(mutationFooMutationResolverType: () => ?boolean);
4949
export type barMutation$variables = {||};
5050
export type barMutation$data = {|
5151
+foo_mutation: ?boolean,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/client_mutation_resolver_different_mutation_ok.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default node;
104104

105105
//- __generated__/barMutation.graphql.js
106106
/**
107-
* <auto-generated> SignedSource<<31cc6cb3ca0668ffe6884f2da3893466>>
107+
* <auto-generated> SignedSource<<6f79ca8d7718498c480388c5b22a5130>>
108108
* @flow
109109
* @lightSyntaxTransform
110110
* @nogrep
@@ -119,7 +119,7 @@ import type { ClientRequest, Mutation } from 'relay-runtime';
119119
import {baz_mutation as notCalledMutationBazMutationResolverType} from "../foo.js";
120120
// Type assertion validating that `notCalledMutationBazMutationResolverType` resolver is correctly implemented.
121121
// A type error here indicates that the type signature of the resolver module is incorrect.
122-
(notCalledMutationBazMutationResolverType: () => boolean | null);
122+
(notCalledMutationBazMutationResolverType: () => ?boolean);
123123
export type barMutation$variables = {||};
124124
export type barMutation$data = {|
125125
+baz_mutation: ?boolean,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/client_schema_extension_interface_uses_resolver_type.expected

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default ((node/*: any*/)/*: Fragment<
176176

177177
//- __generated__/PersonComponentQuery.graphql.js
178178
/**
179-
* <auto-generated> SignedSource<<f9584e3f61d57da807edbde8546b4278>>
179+
* <auto-generated> SignedSource<<6c11d65c79f10f8cbe664d4735a1fb15>>
180180
* @flow
181181
* @lightSyntaxTransform
182182
* @nogrep
@@ -195,15 +195,15 @@ import {admin as adminAdminResolverType} from "Admin";
195195
// A type error here indicates that the type signature of the resolver module is incorrect.
196196
(adminAdminResolverType: (
197197
__relay_model_instance: Admin____relay_model_instance$data['__relay_model_instance'],
198-
) => {|
198+
) => ?{|
199199
+id: DataID,
200-
|} | null);
200+
|});
201201
import {boss as queryBossResolverType} from "Admin";
202202
// Type assertion validating that `queryBossResolverType` resolver is correctly implemented.
203203
// A type error here indicates that the type signature of the resolver module is incorrect.
204-
(queryBossResolverType: () => {|
204+
(queryBossResolverType: () => ?{|
205205
+id: DataID,
206-
|} | null);
206+
|});
207207
export type PersonComponentQuery$variables = {||};
208208
export type PersonComponentQuery$data = {|
209209
+boss: ?{|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/exec_resolvers_directive_with_root_fragment.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default node;
116116

117117
//- __generated__/UserFooFragment.graphql.js
118118
/**
119-
* <auto-generated> SignedSource<<c6276bdf3c443a503812bf90a2089b08>>
119+
* <auto-generated> SignedSource<<843aee583dbf963998562b8559b43846>>
120120
* @flow
121121
* @lightSyntaxTransform
122122
* @nogrep
@@ -132,7 +132,7 @@ import type { FragmentType } from "relay-runtime";
132132
import {bar as userBarResolverType} from "User_bar";
133133
// Type assertion validating that `userBarResolverType` resolver is correctly implemented.
134134
// A type error here indicates that the type signature of the resolver module is incorrect.
135-
(userBarResolverType: () => mixed | null);
135+
(userBarResolverType: () => ?mixed);
136136
declare export opaque type UserFooFragment$fragmentType: FragmentType;
137137
export type UserFooFragment$data = {|
138138
+bar: ?ReturnType<typeof userBarResolverType>,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/multiple_resolvers_on_interface_of_all_strong_model_type.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default ((node/*: any*/)/*: Fragment<
183183

184184
//- __generated__/PersonComponentQuery.graphql.js
185185
/**
186-
* <auto-generated> SignedSource<<63481a634199f0ea7757f9e303b9a3c8>>
186+
* <auto-generated> SignedSource<<e0022cdfb92fda66bd256d91ed716cdc>>
187187
* @flow
188188
* @lightSyntaxTransform
189189
* @nogrep
@@ -202,13 +202,13 @@ import {description as iActorDescriptionResolverType} from "IActorResolvers";
202202
// A type error here indicates that the type signature of the resolver module is incorrect.
203203
(iActorDescriptionResolverType: (
204204
model: Admin____relay_model_instance$data['__relay_model_instance'] | User____relay_model_instance$data['__relay_model_instance'],
205-
) => string | null);
205+
) => ?string);
206206
import {name as iPersonNameResolverType} from "IPersonResolvers";
207207
// Type assertion validating that `iPersonNameResolverType` resolver is correctly implemented.
208208
// A type error here indicates that the type signature of the resolver module is incorrect.
209209
(iPersonNameResolverType: (
210210
model: Admin____relay_model_instance$data['__relay_model_instance'] | User____relay_model_instance$data['__relay_model_instance'],
211-
) => string | null);
211+
) => ?string);
212212
export type PersonComponentQuery$variables = {||};
213213
export type PersonComponentQuery$data = {|
214214
+actor: ?{|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/relay_resolvers_in_throw_on_field_error.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default ((node/*: any*/)/*: Fragment<
164164

165165
//- __generated__/fooQuery.graphql.js
166166
/**
167-
* <auto-generated> SignedSource<<31bc07f2b00ed403e2ce86668617d4b8>>
167+
* <auto-generated> SignedSource<<993d76639831b1e563cb29101f10f1c9>>
168168
* @flow
169169
* @lightSyntaxTransform
170170
* @nogrep
@@ -180,9 +180,9 @@ import type { DataID } from "relay-runtime";
180180
import {clientUser as queryClientUserResolverType} from "foo";
181181
// Type assertion validating that `queryClientUserResolverType` resolver is correctly implemented.
182182
// A type error here indicates that the type signature of the resolver module is incorrect.
183-
(queryClientUserResolverType: () => {|
183+
(queryClientUserResolverType: () => ?{|
184184
+id: DataID,
185-
|} | null);
185+
|});
186186
export type fooQuery$variables = {||};
187187
export type fooQuery$data = {|
188188
+clientUser: {|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_on_interface_of_all_strong_model_type.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export default ((node/*: any*/)/*: Fragment<
168168

169169
//- __generated__/PersonComponentFragment.graphql.js
170170
/**
171-
* <auto-generated> SignedSource<<6ae25904008fca5dd338ee1e53ed18d2>>
171+
* <auto-generated> SignedSource<<fa447cade5f346d21f24221645ca4842>>
172172
* @flow
173173
* @lightSyntaxTransform
174174
* @nogrep
@@ -188,7 +188,7 @@ import {name as iPersonNameResolverType} from "IPersonResolvers";
188188
// A type error here indicates that the type signature of the resolver module is incorrect.
189189
(iPersonNameResolverType: (
190190
model: Admin____relay_model_instance$data['__relay_model_instance'] | User____relay_model_instance$data['__relay_model_instance'],
191-
) => string | null);
191+
) => ?string);
192192
declare export opaque type PersonComponentFragment$fragmentType: FragmentType;
193193
export type PersonComponentFragment$data = {|
194194
+name: ?string,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_on_interface_of_all_strong_model_type_including_cse.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default ((node/*: any*/)/*: Fragment<
173173

174174
//- __generated__/PersonComponentFragment.graphql.js
175175
/**
176-
* <auto-generated> SignedSource<<f8340424d128087ea7c608c7e5e24f14>>
176+
* <auto-generated> SignedSource<<ff024ab8938010ee748b9b92881c35c4>>
177177
* @flow
178178
* @lightSyntaxTransform
179179
* @nogrep
@@ -193,7 +193,7 @@ import {name as iPersonNameResolverType} from "IPersonResolvers";
193193
// A type error here indicates that the type signature of the resolver module is incorrect.
194194
(iPersonNameResolverType: (
195195
model: Admin____relay_model_instance$data['__relay_model_instance'] | User____relay_model_instance$data['__relay_model_instance'],
196-
) => string | null);
196+
) => ?string);
197197
declare export opaque type PersonComponentFragment$fragmentType: FragmentType;
198198
export type PersonComponentFragment$data = {|
199199
+name: ?string,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_on_interface_of_all_strong_model_type_with_root_fragment.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default ((node/*: any*/)/*: Fragment<
171171

172172
//- __generated__/IPersonResolversFragment.graphql.js
173173
/**
174-
* <auto-generated> SignedSource<<3039ac5c36d275852823d4328779d54d>>
174+
* <auto-generated> SignedSource<<a8e223129204a517e8ac13f1a97bff8e>>
175175
* @flow
176176
* @lightSyntaxTransform
177177
* @nogrep
@@ -189,7 +189,7 @@ import {name as iPersonNameResolverType} from "IPersonResolvers";
189189
// A type error here indicates that the type signature of the resolver module is incorrect.
190190
(iPersonNameResolverType: (
191191
rootKey: IPersonResolversFragment$key,
192-
) => string | null);
192+
) => ?string);
193193
declare export opaque type IPersonResolversFragment$fragmentType: FragmentType;
194194
export type IPersonResolversFragment$data = {|
195195
+name: ?string,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_on_interface_of_all_weak_model_type.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default ((node/*: any*/)/*: Fragment<
102102

103103
//- __generated__/PersonComponentFragment.graphql.js
104104
/**
105-
* <auto-generated> SignedSource<<6ae25904008fca5dd338ee1e53ed18d2>>
105+
* <auto-generated> SignedSource<<fa447cade5f346d21f24221645ca4842>>
106106
* @flow
107107
* @lightSyntaxTransform
108108
* @nogrep
@@ -122,7 +122,7 @@ import {name as iPersonNameResolverType} from "IPersonResolvers";
122122
// A type error here indicates that the type signature of the resolver module is incorrect.
123123
(iPersonNameResolverType: (
124124
model: Admin____relay_model_instance$data['__relay_model_instance'] | User____relay_model_instance$data['__relay_model_instance'],
125-
) => string | null);
125+
) => ?string);
126126
declare export opaque type PersonComponentFragment$fragmentType: FragmentType;
127127
export type PersonComponentFragment$data = {|
128128
+name: ?string,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_client_schema_extension_enum.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum Status {
4545
==================================== OUTPUT ===================================
4646
//- __generated__/SomeComponentFragment.graphql.js
4747
/**
48-
* <auto-generated> SignedSource<<b800d4461e6cc7083332e61bd4bbf503>>
48+
* <auto-generated> SignedSource<<ba8106a4f59c87af82497d36f2d48470>>
4949
* @flow
5050
* @lightSyntaxTransform
5151
* @nogrep
@@ -65,7 +65,7 @@ import {status as userStatusResolverType} from "UserTypeResolvers";
6565
// A type error here indicates that the type signature of the resolver module is incorrect.
6666
(userStatusResolverType: (
6767
__relay_model_instance: User____relay_model_instance$data['__relay_model_instance'],
68-
) => Status | null);
68+
) => ?Status);
6969
declare export opaque type SomeComponentFragment$fragmentType: FragmentType;
7070
export type SomeComponentFragment$data = {|
7171
+status: ?Status,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_enum_with_enum_suffix.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ enum Status {
4646
==================================== OUTPUT ===================================
4747
//- __generated__/SomeComponentFragment.graphql.js
4848
/**
49-
* <auto-generated> SignedSource<<b800d4461e6cc7083332e61bd4bbf503>>
49+
* <auto-generated> SignedSource<<ba8106a4f59c87af82497d36f2d48470>>
5050
* @flow
5151
* @lightSyntaxTransform
5252
* @nogrep
@@ -66,7 +66,7 @@ import {status as userStatusResolverType} from "UserTypeResolvers";
6666
// A type error here indicates that the type signature of the resolver module is incorrect.
6767
(userStatusResolverType: (
6868
__relay_model_instance: User____relay_model_instance$data['__relay_model_instance'],
69-
) => Status | null);
69+
) => ?Status);
7070
declare export opaque type SomeComponentFragment$fragmentType: FragmentType;
7171
export type SomeComponentFragment$data = {|
7272
+status: ?Status,

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_interface_of_all_live_model_type.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default ((node/*: any*/)/*: Fragment<
179179

180180
//- __generated__/QueryComponentQuery.graphql.js
181181
/**
182-
* <auto-generated> SignedSource<<a4143f18505c4ac8a21d41a42f95aad1>>
182+
* <auto-generated> SignedSource<<039b56847e2dfd47111f7874367eec4c>>
183183
* @flow
184184
* @lightSyntaxTransform
185185
* @nogrep
@@ -195,10 +195,10 @@ import type { DataID } from "relay-runtime";
195195
import {person as queryPersonResolverType} from "QueryResolvers";
196196
// Type assertion validating that `queryPersonResolverType` resolver is correctly implemented.
197197
// A type error here indicates that the type signature of the resolver module is incorrect.
198-
(queryPersonResolverType: () => {|
198+
(queryPersonResolverType: () => ?{|
199199
+__typename: "Admin" | "User",
200200
+id: DataID,
201-
|} | null);
201+
|});
202202
export type QueryComponentQuery$variables = {||};
203203
export type QueryComponentQuery$data = {|
204204
+person: ?{|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_interface_of_all_strong_model_type.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export default ((node/*: any*/)/*: Fragment<
177177

178178
//- __generated__/PersonComponentQuery.graphql.js
179179
/**
180-
* <auto-generated> SignedSource<<f7a0b2ed2db4475c2995d88ddceb7de4>>
180+
* <auto-generated> SignedSource<<82abcf281482a29fac0483ffd358760a>>
181181
* @flow
182182
* @lightSyntaxTransform
183183
* @nogrep
@@ -193,10 +193,10 @@ import type { DataID } from "relay-runtime";
193193
import {person as queryPersonResolverType} from "QueryResolvers";
194194
// Type assertion validating that `queryPersonResolverType` resolver is correctly implemented.
195195
// A type error here indicates that the type signature of the resolver module is incorrect.
196-
(queryPersonResolverType: () => {|
196+
(queryPersonResolverType: () => ?{|
197197
+__typename: "Admin" | "User",
198198
+id: DataID,
199-
|} | null);
199+
|});
200200
export type PersonComponentQuery$variables = {||};
201201
export type PersonComponentQuery$data = {|
202202
+person: ?{|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_interface_of_all_strong_model_type_including_cse.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export default ((node/*: any*/)/*: Fragment<
182182

183183
//- __generated__/PersonComponentQuery.graphql.js
184184
/**
185-
* <auto-generated> SignedSource<<e648cd6b4864dbebd6f925a6141c619e>>
185+
* <auto-generated> SignedSource<<2250f9a6d065f577c499160ece6f071f>>
186186
* @flow
187187
* @lightSyntaxTransform
188188
* @nogrep
@@ -198,10 +198,10 @@ import type { DataID } from "relay-runtime";
198198
import {person as queryPersonResolverType} from "QueryResolvers";
199199
// Type assertion validating that `queryPersonResolverType` resolver is correctly implemented.
200200
// A type error here indicates that the type signature of the resolver module is incorrect.
201-
(queryPersonResolverType: () => {|
201+
(queryPersonResolverType: () => ?{|
202202
+__typename: "Admin" | "User" | "Visitor",
203203
+id: DataID,
204-
|} | null);
204+
|});
205205
export type PersonComponentQuery$variables = {||};
206206
export type PersonComponentQuery$data = {|
207207
+person: ?{|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_interface_of_all_weak_model_type.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default ((node/*: any*/)/*: Fragment<
113113

114114
//- __generated__/QueryComponentQuery.graphql.js
115115
/**
116-
* <auto-generated> SignedSource<<39a6f90dac3aa0fee8284f8358435b25>>
116+
* <auto-generated> SignedSource<<1e557ef442e027c83b6204650e80e65f>>
117117
* @flow
118118
* @lightSyntaxTransform
119119
* @nogrep
@@ -128,7 +128,7 @@ import type { ClientRequest, ClientQuery } from 'relay-runtime';
128128
import {person as queryPersonResolverType} from "QueryResolvers";
129129
// Type assertion validating that `queryPersonResolverType` resolver is correctly implemented.
130130
// A type error here indicates that the type signature of the resolver module is incorrect.
131-
(queryPersonResolverType: () => Query__person$normalization | null);
131+
(queryPersonResolverType: () => ?Query__person$normalization);
132132
import type { Query__person$normalization } from "Query__person$normalization.graphql";
133133
export type QueryComponentQuery$variables = {||};
134134
export type QueryComponentQuery$data = {|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_interface_of_live_and_non_live_strong_model_type.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export default ((node/*: any*/)/*: Fragment<
178178

179179
//- __generated__/QueryComponentQuery.graphql.js
180180
/**
181-
* <auto-generated> SignedSource<<712c7fb44362dac9f0978c3f085aeaef>>
181+
* <auto-generated> SignedSource<<5b3a040936e731b1c6d0976643c9fbe8>>
182182
* @flow
183183
* @lightSyntaxTransform
184184
* @nogrep
@@ -194,10 +194,10 @@ import type { DataID } from "relay-runtime";
194194
import {person as queryPersonResolverType} from "QueryResolvers";
195195
// Type assertion validating that `queryPersonResolverType` resolver is correctly implemented.
196196
// A type error here indicates that the type signature of the resolver module is incorrect.
197-
(queryPersonResolverType: () => {|
197+
(queryPersonResolverType: () => ?{|
198198
+__typename: "Admin" | "User",
199199
+id: DataID,
200-
|} | null);
200+
|});
201201
export type QueryComponentQuery$variables = {||};
202202
export type QueryComponentQuery$data = {|
203203
+person: ?{|

compiler/crates/relay-compiler/tests/relay_compiler_integration/fixtures/resolver_returns_union_of_cse.expected

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ union Person = User | Admin
5757
==================================== OUTPUT ===================================
5858
//- __generated__/PersonComponentQuery.graphql.js
5959
/**
60-
* <auto-generated> SignedSource<<5ba21634369f9783ae8b2946a17e2052>>
60+
* <auto-generated> SignedSource<<140d4139905c84426daa58015486e9c1>>
6161
* @flow
6262
* @lightSyntaxTransform
6363
* @nogrep
@@ -73,18 +73,18 @@ import type { DataID } from "relay-runtime";
7373
import {name as adminNameResolverType} from "AdminTypeResolvers";
7474
// Type assertion validating that `adminNameResolverType` resolver is correctly implemented.
7575
// A type error here indicates that the type signature of the resolver module is incorrect.
76-
(adminNameResolverType: () => string | null);
76+
(adminNameResolverType: () => ?string);
7777
import {person as queryPersonResolverType} from "QueryResolvers";
7878
// Type assertion validating that `queryPersonResolverType` resolver is correctly implemented.
7979
// A type error here indicates that the type signature of the resolver module is incorrect.
80-
(queryPersonResolverType: () => {|
80+
(queryPersonResolverType: () => ?{|
8181
+__typename: "Admin" | "User",
8282
+id: DataID,
83-
|} | null);
83+
|});
8484
import {name as userNameResolverType} from "UserTypeResolvers";
8585
// Type assertion validating that `userNameResolverType` resolver is correctly implemented.
8686
// A type error here indicates that the type signature of the resolver module is incorrect.
87-
(userNameResolverType: () => string | null);
87+
(userNameResolverType: () => ?string);
8888
export type PersonComponentQuery$variables = {||};
8989
export type PersonComponentQuery$data = {|
9090
+person: ?{|

0 commit comments

Comments
 (0)