-
-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix codegen crash on nullable lists of non-scalars (#3653)
Co-authored-by: Jacob Allen <[email protected]>
- Loading branch information
1 parent
ffdd85b
commit 5c0f0b0
Showing
6 changed files
with
34 additions
and
6 deletions.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Release type: patch | ||
|
||
Fixes an issue where the codegen tool would crash when working with a nullable list of types. |
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
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,6 @@ | ||
query OperationName { | ||
optionalListOfPeople { | ||
name | ||
age | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/codegen/snapshots/python/nullable_list_of_non_scalars.py
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,8 @@ | ||
from typing import List, Optional | ||
|
||
class OperationNameResultOptionalListOfPeople: | ||
name: str | ||
age: int | ||
|
||
class OperationNameResult: | ||
optional_list_of_people: Optional[List[OperationNameResultOptionalListOfPeople]] |
8 changes: 8 additions & 0 deletions
8
tests/codegen/snapshots/typescript/nullable_list_of_non_scalars.ts
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,8 @@ | ||
type OperationNameResultOptionalListOfPeople = { | ||
name: string | ||
age: number | ||
} | ||
|
||
type OperationNameResult = { | ||
optional_list_of_people: OperationNameResultOptionalListOfPeople[] | undefined | ||
} |