You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
person_ops.gql: move @check to a field with no side effects.
Adding `@check` to a field with side effects became illegal since cl/756896487. The fix in this commit adds a "query" field (which has no side effects) and, instead, attaches the `@check` directive to that.
This fixes the following 2 test failures in `OperationExecutionErrorsIntegrationTest`:
* `executeMutationFailsWithNonNullDataNonEmptyErrorsDecodingSucceeds`
* `executeMutationFailsWithNonNullDataNonEmptyErrorsDecodingFails`
The test failures looked like this:
```
io.kotest.assertions.MultiAssertionError: The following 2 assertions failed:
1) exception.message
"operation encountered errors during execution: [mutation.createPersonWithPartialFailure.person2: @check is disallowed on side-effect fields unless the operation has @transaction]" should contain the substring "ecxpjy4qfy" with non-abutting text
at com.google.firebase.dataconnect.testutil.TestUtilsKt.shouldContainWithNonAbuttingText(TestUtils.kt:79)
2) exception.response.rawData
Expected [("person1", [("id", "com.google.firebase.dataconnect.OperationExecutionErrorsIntegrationTest.executeMutationFailsWithNonNullDataNonEmptyErrorsDecodingFails_vNGzY61U2l3DkpBiK4s1")]), ("person2", <null>)] but actual was null
at com.google.firebase.dataconnect.testutil.DataConnectOperationExceptionTestUtilsKt.shouldSatisfy(DataConnectOperationExceptionTestUtils.kt:74)
at com.google.firebase.dataconnect.testutil.DataConnectOperationExceptionTestUtilsKt.shouldSatisfy(DataConnectOperationExceptionTestUtils.kt:266)
at com.google.firebase.dataconnect.OperationExecutionErrorsIntegrationTest$executeMutationFailsWithNonNullDataNonEmptyErrorsDecodingFails$1.invokeSuspend(OperationExecutionErrorsIntegrationTest.kt:224)
```
0 commit comments