Skip to content

Commit

Permalink
Allow runtime to check @required resolver values
Browse files Browse the repository at this point in the history
Reviewed By: davidmccabe

Differential Revision: D33512408

fbshipit-source-id: 298d6fc3a2d581866145012cf626bbcfef10a9c2
  • Loading branch information
captbaritone authored and facebook-github-bot committed Jan 19, 2022
1 parent d9d8783 commit c844a5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/relay-runtime/store/RelayReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,7 @@ class RelayReader {
if (!RelayFeatureFlags.ENABLE_RELAY_RESOLVERS) {
throw new Error('Relay Resolver fields are not yet supported.');
}
this._readResolverField(selection.field, record, data);
break;
return this._readResolverField(selection.field, record, data);
default:
(selection.field.kind: empty);
invariant(
Expand All @@ -499,7 +498,7 @@ class RelayReader {
field: ReaderRelayResolver,
record: Record,
data: SelectorData,
): void {
): mixed {
const {resolverModule, fragment} = field;
const storageKey = getStorageKey(field, this._variables);
const resolverID = ClientID.generateClientID(
Expand Down Expand Up @@ -575,6 +574,7 @@ class RelayReader {

const applicationName = field.alias ?? field.name;
data[applicationName] = result;
return result;
}

_readClientEdge(
Expand Down

0 comments on commit c844a5b

Please sign in to comment.