Repository navigation
Conversation
|
Alternatively we could always unwrap non-null first? |
|
Have not looked into it further, but what about nullability inside list and list of lists? |
|
@andimarek I added a more comprehensive test across different type combinations in 2e21d2a. I only found the case when a I moved the branch for unwrapping non-null types up so that the control flow is closer to the spec, rather than the extra |
Test ReportTest Results
|
|
It seems like moving the branches around caused some changes in test branch coverage metrics. I added some tests for the missing branches as well to get things unblocked in 38e843e. |
|
@andimarek gentle nudge to take a look over the chagnes |
|
To add confidence that this is inline with the spec we landed additional tests in the reference implementation of GraphQL to verify this behavior is valid as well. |
According to the spec IsValidImplementationFieldType(), concrete type fields are able to strengthen the nullability guarantees made by an interface type field.
This mostly happens, except when the field is a
Uniontype.This change moves the branch for
isNonNullup so that non-null unions fall-through hit the unwrap case first. This is closer to how the specification is written.