Skip to content

Commit

Permalink
Test for list with values
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Jul 28, 2022
1 parent cb8069b commit 3de9f1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_printer/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ class MyInput:
id_number_string: strawberry.ID = strawberry.ID("123")
x: Optional[int] = UNSET
l: List[str] = strawberry.field(default_factory=list)
list_with_values: List[str] = strawberry.field(
default_factory=lambda: ["a", "b"]
)

@strawberry.type
class Query:
Expand All @@ -157,6 +160,7 @@ def search(self, input: MyInput) -> int:
idNumberString: ID! = 123
x: Int
l: [String!]! = []
listWithValues: [String!]! = ["a", "b"]
}
type Query {
Expand Down

0 comments on commit 3de9f1d

Please sign in to comment.