File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed
experimental-live-resolvers Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import type {
26
26
27
27
const recycleNodesInto = require ( '../util/recycleNodesInto' ) ;
28
28
const { RELAY_LIVE_RESOLVER } = require ( '../util/RelayConcreteNode' ) ;
29
- const RelayFeatureFlags = require ( '../util/RelayFeatureFlags' ) ;
30
29
const shallowFreeze = require ( '../util/shallowFreeze' ) ;
31
30
const { generateClientID} = require ( './ClientID' ) ;
32
31
const RelayModernRecord = require ( './RelayModernRecord' ) ;
@@ -174,9 +173,7 @@ class RecordResolverCache implements ResolverCache {
174
173
linkedRecord = RelayModernRecord . create ( linkedID , '__RELAY_RESOLVER__' ) ;
175
174
176
175
const evaluationResult = evaluate ( ) ;
177
- if ( RelayFeatureFlags . ENABLE_SHALLOW_FREEZE_RESOLVER_VALUES ) {
178
- shallowFreeze ( evaluationResult . resolverResult ) ;
179
- }
176
+ shallowFreeze ( evaluationResult . resolverResult ) ;
180
177
RelayModernRecord . setValue (
181
178
linkedRecord ,
182
179
RELAY_RESOLVER_VALUE_KEY ,
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ import type {LiveState} from 'relay-runtime';
36
36
37
37
const recycleNodesInto = require ( '../../util/recycleNodesInto' ) ;
38
38
const { RELAY_LIVE_RESOLVER } = require ( '../../util/RelayConcreteNode' ) ;
39
- const RelayFeatureFlags = require ( '../../util/RelayFeatureFlags' ) ;
40
39
const shallowFreeze = require ( '../../util/shallowFreeze' ) ;
41
40
const { generateClientID, generateClientObjectClientID} = require ( '../ClientID' ) ;
42
41
const RelayModernRecord = require ( '../RelayModernRecord' ) ;
@@ -610,18 +609,14 @@ class LiveResolverCache implements ResolverCache {
610
609
nextOutputTypeRecordIDs ,
611
610
) ;
612
611
613
- if ( RelayFeatureFlags . ENABLE_SHALLOW_FREEZE_RESOLVER_VALUES ) {
614
- shallowFreeze ( resolverValue ) ;
615
- }
612
+ shallowFreeze ( resolverValue ) ;
616
613
RelayModernRecord . setValue (
617
614
resolverRecord ,
618
615
RELAY_RESOLVER_VALUE_KEY ,
619
616
resolverValue ,
620
617
) ;
621
618
} else {
622
- if ( RelayFeatureFlags . ENABLE_SHALLOW_FREEZE_RESOLVER_VALUES ) {
623
- shallowFreeze ( value ) ;
624
- }
619
+ shallowFreeze ( value ) ;
625
620
// For "classic" resolvers (or if the value is nullish), we are just setting their
626
621
// value as is.
627
622
RelayModernRecord . setValue (
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ export type FeatureFlags = {
28
28
STRING_INTERN_LEVEL : number ,
29
29
LOG_MISSING_RECORDS_IN_PROD : boolean ,
30
30
ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE : boolean ,
31
- ENABLE_SHALLOW_FREEZE_RESOLVER_VALUES : boolean ,
32
31
33
32
// Configure RelayStoreSubscriptions to mark a subscription as affected by an
34
33
// update if there are any overlapping IDs other than ROOT_ID or VIWER_ID,
@@ -69,7 +68,6 @@ const RelayFeatureFlags: FeatureFlags = {
69
68
ENABLE_FIELD_ERROR_HANDLING : false ,
70
69
ENABLE_FIELD_ERROR_HANDLING_THROW_BY_DEFAULT : false ,
71
70
ENABLE_FIELD_ERROR_HANDLING_CATCH_DIRECTIVE : false ,
72
- ENABLE_SHALLOW_FREEZE_RESOLVER_VALUES : true ,
73
71
} ;
74
72
75
73
module . exports = RelayFeatureFlags ;
You can’t perform that action at this time.
0 commit comments