diff --git a/tests/codegen/queries/optional_list_of_people.graphql b/tests/codegen/queries/nullable_list_of_non_scalars.graphql similarity index 62% rename from tests/codegen/queries/optional_list_of_people.graphql rename to tests/codegen/queries/nullable_list_of_non_scalars.graphql index 9c827a9753..8bdedbe6a2 100644 --- a/tests/codegen/queries/optional_list_of_people.graphql +++ b/tests/codegen/queries/nullable_list_of_non_scalars.graphql @@ -1,4 +1,4 @@ -query OptionalListOfPeople { +query OperationName { optionalListOfPeople { name age diff --git a/tests/codegen/snapshots/python/nullable_list_of_non_scalars.py b/tests/codegen/snapshots/python/nullable_list_of_non_scalars.py new file mode 100644 index 0000000000..f5efcaa7f8 --- /dev/null +++ b/tests/codegen/snapshots/python/nullable_list_of_non_scalars.py @@ -0,0 +1,8 @@ +from typing import List, Optional + +class OperationNameResultOptionalListOfPeople: + name: str + age: int + +class OperationNameResult: + optional_list_of_people: Optional[List[OperationNameResultOptionalListOfPeople]] diff --git a/tests/codegen/snapshots/python/optional_list_of_people.py b/tests/codegen/snapshots/python/optional_list_of_people.py deleted file mode 100644 index 6b7e986228..0000000000 --- a/tests/codegen/snapshots/python/optional_list_of_people.py +++ /dev/null @@ -1,8 +0,0 @@ -from typing import List, Optional - -class OptionalListOfPeopleResultOptionalListOfPeople: - name: str - age: int - -class OptionalListOfPeopleResult: - optional_list_of_people: Optional[List[OptionalListOfPeopleResultOptionalListOfPeople]] diff --git a/tests/codegen/snapshots/typescript/nullable_list_of_non_scalars.ts b/tests/codegen/snapshots/typescript/nullable_list_of_non_scalars.ts new file mode 100644 index 0000000000..7498cac29d --- /dev/null +++ b/tests/codegen/snapshots/typescript/nullable_list_of_non_scalars.ts @@ -0,0 +1,8 @@ +type OperationNameResultOptionalListOfPeople = { + name: string + age: number +} + +type OperationNameResult = { + optional_list_of_people: OperationNameResultOptionalListOfPeople[] | undefined +} diff --git a/tests/codegen/snapshots/typescript/optional_list_of_people.ts b/tests/codegen/snapshots/typescript/optional_list_of_people.ts deleted file mode 100644 index 8c9512cd57..0000000000 --- a/tests/codegen/snapshots/typescript/optional_list_of_people.ts +++ /dev/null @@ -1,8 +0,0 @@ -type OptionalListOfPeopleResultOptionalListOfPeople = { - name: string - age: number -} - -type OptionalListOfPeopleResult = { - optional_list_of_people: OptionalListOfPeopleResultOptionalListOfPeople[] | undefined -}