|
| 1 | +# generated by datamodel-codegen: |
| 2 | +# filename: empty_list_default.graphql |
| 3 | +# timestamp: 2019-07-26T00:00:00+00:00 |
| 4 | + |
| 5 | +from __future__ import annotations |
| 6 | + |
| 7 | +from typing import Literal |
| 8 | + |
| 9 | +from pydantic import BaseModel, Field |
| 10 | +from typing_extensions import TypeAliasType |
| 11 | + |
| 12 | +Boolean = TypeAliasType("Boolean", bool) |
| 13 | +""" |
| 14 | +The `Boolean` scalar type represents `true` or `false`. |
| 15 | +""" |
| 16 | + |
| 17 | + |
| 18 | +ID = TypeAliasType("ID", str) |
| 19 | +""" |
| 20 | +The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. |
| 21 | +""" |
| 22 | + |
| 23 | + |
| 24 | +String = TypeAliasType("String", str) |
| 25 | +""" |
| 26 | +The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. |
| 27 | +""" |
| 28 | + |
| 29 | + |
| 30 | +class ItemInput(BaseModel): |
| 31 | + id: ID |
| 32 | + typename__: Literal['ItemInput'] | None = Field('ItemInput', alias='__typename') |
| 33 | + |
| 34 | + |
| 35 | +class TestInput(BaseModel): |
| 36 | + nullableList: list[String] | None = Field( |
| 37 | + default_factory=list, description='Nullable list with empty default' |
| 38 | + ) |
| 39 | + requiredItems: list[ItemInput] = Field( |
| 40 | + default_factory=list, description='Required list of items with empty default' |
| 41 | + ) |
| 42 | + requiredList: list[String] = Field( |
| 43 | + default_factory=list, description='Required list with empty default' |
| 44 | + ) |
| 45 | + typename__: Literal['TestInput'] | None = Field('TestInput', alias='__typename') |
0 commit comments