Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61b028d

Browse files
captbaritonefacebook-github-bot
authored andcommitted
Add@catch to client schema extension fields within @throwOnFieldError
Reviewed By: gordyfDifferential Revision: D67815498fbshipit-source-id: 0c28eb3e2502717ef67edd41bd6649032e45937b
1 parent52f5f81 commit61b028d

3 files changed

+20
-10
lines changed

‎packages/relay-runtime/store/__tests__/RelayReader-RelayErrorHandling-test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ describe('RelayReader error fields', () => {
428428
@throwOnFieldError {
429429
me {
430430
astrological_sign {
431-
notes # Not in the store!
431+
# Compiler forces us to use @catch here
432+
notes @catch(to: NULL) # Not in the store!
432433
}
433434
}
434435
}
@@ -441,7 +442,7 @@ describe('RelayReader error fields', () => {
441442
{
442443
fieldPath:'me.astrological_sign.notes',
443444
kind:'missing_expected_data.throw',
444-
handled:false,
445+
handled:true,
445446
owner:
446447
'RelayReaderRelayErrorHandlingTestResolverClientEdgeClientObjectWithMissingDataQuery',
447448
},
@@ -466,7 +467,8 @@ describe('RelayReader error fields', () => {
466467
query RelayReaderRelayErrorHandlingTestResolverClientPluralEdgeClientObjectWithMissingDataQuery
467468
@throwOnFieldError {
468469
all_astrological_signs {
469-
notes # Not in the store!
470+
# Compiler forces us to use @catch here
471+
notes @catch(to: NULL) # Not in the store!
470472
}
471473
}
472474
`;
@@ -476,7 +478,7 @@ describe('RelayReader error fields', () => {
476478
expect(errorResponseFields[i]).toEqual({
477479
fieldPath:`all_astrological_signs.${i}.notes`,
478480
kind:'missing_expected_data.throw',
479-
handled:false,
481+
handled:true,
480482
owner:
481483
'RelayReaderRelayErrorHandlingTestResolverClientPluralEdgeClientObjectWithMissingDataQuery',
482484
});

‎packages/relay-runtime/store/__tests__/__generated__/RelayReaderRelayErrorHandlingTestResolverClientEdgeClientObjectWithMissingDataQuery.graphql.js

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎packages/relay-runtime/store/__tests__/__generated__/RelayReaderRelayErrorHandlingTestResolverClientPluralEdgeClientObjectWithMissingDataQuery.graphql.js

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp