Skip to content

Commit a5d6b23

Browse files
tyao1facebook-github-bot
authored andcommitted
Shorten relay read time resolver key prefix
Reviewed By: evanyeung Differential Revision: D68988060 fbshipit-source-id: 0cf31cf58d779572a4e8bdadf339595826756506
1 parent 203d8b1 commit a5d6b23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-relay/__tests__/LiveResolvers-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ describe('client-only fragments', () => {
15061506
expect(() => {
15071507
GLOBAL_STORE.dispatch({type: 'INCREMENT'});
15081508
}).toThrowError(
1509-
'Unexpected LiveState value returned from Relay Resolver internal field `RELAY_RESOLVER_LIVE_STATE_VALUE`. It is likely a bug in Relay, or a corrupt state of the relay store state Field Path `counter_suspends_when_odd`. Record `{"__id":"client:1:read_time_resolver:counter_suspends_when_odd","__typename":"__RELAY_RESOLVER__","__resolverError":null,"__resolverValue":{"__LIVE_RESOLVER_SUSPENSE_SENTINEL":true},"__resolverLiveStateDirty":true}`.',
1509+
'Unexpected LiveState value returned from Relay Resolver internal field `RELAY_RESOLVER_LIVE_STATE_VALUE`. It is likely a bug in Relay, or a corrupt state of the relay store state Field Path `counter_suspends_when_odd`. Record `{"__id":"client:1:$r:counter_suspends_when_odd","__typename":"__RELAY_RESOLVER__","__resolverError":null,"__resolverValue":{"__LIVE_RESOLVER_SUSPENSE_SENTINEL":true},"__resolverLiveStateDirty":true}`.',
15101510
);
15111511
// $FlowFixMe[incompatible-use]
15121512
expect(renderer.toJSON()).toEqual('Loading...');

packages/relay-runtime/store/RelayStoreUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const ERRORS_KEY: '__errors' = '__errors';
4545
const MODULE_COMPONENT_KEY_PREFIX = '__module_component_';
4646
const MODULE_OPERATION_KEY_PREFIX = '__module_operation_';
4747

48-
const RELAY_READ_TIME_RESOLVER_KEY_PREFIX = 'read_time_resolver:';
48+
const RELAY_READ_TIME_RESOLVER_KEY_PREFIX = '$r:';
4949

5050
function getArgumentValue(
5151
arg: NormalizationArgument | ReaderArgument,

0 commit comments

Comments
 (0)