You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: tests/data/expected/main/graphql/annotated_use_default_kwarg.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,18 @@
4
4
5
5
from __future__ importannotations
6
6
7
-
fromtypingimportLiteral, TypeAlias
7
+
fromtypingimportLiteral
8
8
9
9
frompydanticimportBaseModel, Field
10
+
fromtyping_extensionsimportTypeAliasType
10
11
11
-
Boolean: TypeAlias=bool
12
+
Boolean=TypeAliasType("Boolean", bool)
12
13
"""
13
14
The `Boolean` scalar type represents `true` or `false`.
14
15
"""
15
16
16
17
17
-
String: TypeAlias=str
18
+
String=TypeAliasType("String", str)
18
19
"""
19
20
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.
Copy file name to clipboardExpand all lines: tests/data/expected/main/graphql/casing.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,23 +5,24 @@
5
5
from __future__ importannotations
6
6
7
7
fromenumimportEnum
8
-
fromtypingimportLiteral, TypeAlias
8
+
fromtypingimportLiteral
9
9
10
10
frompydanticimportBaseModel, Field
11
+
fromtyping_extensionsimportTypeAliasType
11
12
12
-
Boolean: TypeAlias=bool
13
+
Boolean=TypeAliasType("Boolean", bool)
13
14
"""
14
15
The `Boolean` scalar type represents `true` or `false`.
15
16
"""
16
17
17
18
18
-
Int: TypeAlias=int
19
+
Int=TypeAliasType("Int", int)
19
20
"""
20
21
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
21
22
"""
22
23
23
24
24
-
String: TypeAlias=str
25
+
String=TypeAliasType("String", str)
25
26
"""
26
27
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.
Copy file name to clipboardExpand all lines: tests/data/expected/main/graphql/custom_formatters.py
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,26 +5,27 @@
5
5
# a comment
6
6
from __future__ importannotations
7
7
8
-
fromtypingimportLiteral, TypeAlias
8
+
fromtypingimportLiteral
9
9
10
10
frompydanticimportBaseModel, Field
11
+
fromtyping_extensionsimportTypeAliasType
11
12
12
-
Boolean: TypeAlias=bool
13
+
Boolean=TypeAliasType("Boolean", bool)
13
14
"""
14
15
The `Boolean` scalar type represents `true` or `false`.
15
16
"""
16
17
17
18
18
-
ID: TypeAlias=str
19
+
ID=TypeAliasType("ID", str)
19
20
"""
20
21
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
"""
22
23
23
24
24
-
Long: TypeAlias=str
25
+
Long=TypeAliasType("Long", str)
25
26
26
27
27
-
String: TypeAlias=str
28
+
String=TypeAliasType("String", str)
28
29
"""
29
30
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.
Copy file name to clipboardExpand all lines: tests/data/expected/main/graphql/custom_scalar_types.py
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,26 +4,27 @@
4
4
5
5
from __future__ importannotations
6
6
7
-
fromtypingimportLiteral, TypeAlias
7
+
fromtypingimportLiteral
8
8
9
9
frompydanticimportBaseModel, Field
10
+
fromtyping_extensionsimportTypeAliasType
10
11
11
-
Boolean: TypeAlias=bool
12
+
Boolean=TypeAliasType("Boolean", bool)
12
13
"""
13
14
The `Boolean` scalar type represents `true` or `false`.
14
15
"""
15
16
16
17
17
-
ID: TypeAlias=str
18
+
ID=TypeAliasType("ID", str)
18
19
"""
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.
20
21
"""
21
22
22
23
23
-
Long: TypeAlias=int
24
+
Long=TypeAliasType("Long", int)
24
25
25
26
26
-
String: TypeAlias=str
27
+
String=TypeAliasType("String", str)
27
28
"""
28
29
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.
Copy file name to clipboardExpand all lines: tests/data/expected/main/graphql/default_values_required_use_default.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,24 @@
4
4
5
5
from __future__ importannotations
6
6
7
-
fromtypingimportLiteral, TypeAlias
7
+
fromtypingimportLiteral
8
8
9
9
frompydanticimportBaseModel, Field
10
+
fromtyping_extensionsimportTypeAliasType
10
11
11
-
Boolean: TypeAlias=bool
12
+
Boolean=TypeAliasType("Boolean", bool)
12
13
"""
13
14
The `Boolean` scalar type represents `true` or `false`.
14
15
"""
15
16
16
17
17
-
ID: TypeAlias=str
18
+
ID=TypeAliasType("ID", str)
18
19
"""
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.
20
21
"""
21
22
22
23
23
-
String: TypeAlias=str
24
+
String=TypeAliasType("String", str)
24
25
"""
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.
Copy file name to clipboardExpand all lines: tests/data/expected/main/graphql/different_types_of_fields.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,18 @@
4
4
5
5
from __future__ importannotations
6
6
7
-
fromtypingimportLiteral, TypeAlias
7
+
fromtypingimportLiteral
8
8
9
9
frompydanticimportBaseModel, Field
10
+
fromtyping_extensionsimportTypeAliasType
10
11
11
-
Boolean: TypeAlias=bool
12
+
Boolean=TypeAliasType("Boolean", bool)
12
13
"""
13
14
The `Boolean` scalar type represents `true` or `false`.
14
15
"""
15
16
16
17
17
-
String: TypeAlias=str
18
+
String=TypeAliasType("String", str)
18
19
"""
19
20
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.
0 commit comments