Repository navigation
Conversation
Test ReportTest Results
Code Coverage (Java 25)
Changed Class Coverage (4 classes)
|
|
Reviewed 1. [P1] Nested directive failures abort the whole operation. The new query($flag: Boolean = true) {
ok
parent { child @skip(if: $flag) }
}I verified that both Subscription handling also remains incomplete. For: subscription($flag: Boolean = true) {
event { child @skip(if: $flag) }
}with the same variables, a source publisher containing two events emits no GraphQL results: the subscriber receives 2. [P2] Preserve the source location and execution path. The message-only exception has neither Relationship to #4522: that PR forces field argument coercion before invoking a data fetcher, within the existing field-error handling. It preserves sibling data and null propagation. This PR addresses directive arguments during field collection, so the changes complement each other; #4522 does not cover this path. The remaining work is to establish consistent coercion-error handling at the field-collection boundaries, rather than simply substituting another exception class. Coverage: the two added tests cover only root fields. Their |
|
agreed on both, reworked in bbeed5b.
tests in |
spock, SkipAndInclude,
query($flag: Boolean = true) { field @skip(if: $flag) }executed with{"flag": null}:the
@skip/@includeifargument isBoolean!, but a nullable variable with a non-null default value is a legal usage in that non-null position (the spec's IsVariableUsageAllowed), so the query passes validation. when the client then sends an explicitnull, the coerced value is null andgetIfValuedoes(boolean) variables.get(name), so the unboxing throws an uncaught NPE straight out of execution. the identical query written with$flag: Boolean!already returns a proper coercion error, and so does a null variable in a non-null list item or input field; the directiveifargument is the one non-null position that was missed. the same NPE fires for@include, for nested fields, and fromExecutableNormalizedOperationFactory.getIfValuenow raises anAbortExecutionException(surfaced as a normal query error withdata: null) when the resolved variable value is null for the non-nullifargument, so the response carries an error instead of a thrown exception. the without-variables normalization path (variables == null) still returns null to defer the decision, so valid inputs, including the applied-default case, are unchanged.