-
-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue with nullability inference of nested types. (#6230)
Co-authored-by: Anton Tykhyy <atykhyy@gmail.com>
- Loading branch information
1 parent
6283ee9
commit 679cc61
Showing
4 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,7 +144,7 @@ internal static bool CollectNullability( | |
} | ||
|
||
written = buffer.Length; | ||
return false; | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...st/Types.Tests/__snapshots__/CodeFirstTests.Infer_Nullability_From_Nested_Classes.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
schema { | ||
query: QueryNestedClassNullableString | ||
} | ||
|
||
type Example { | ||
inner: Inner! | ||
outer: Outer! | ||
} | ||
|
||
type Inner { | ||
shouldAlsoBeNullable: String! | ||
} | ||
|
||
type Outer { | ||
shouldBeNullable: String! | ||
} | ||
|
||
type QueryNestedClassNullableString { | ||
nestedClassNullableString: Example! | ||
} |