strawberry-graphql 0.283.0__py3-none-any.whl → 0.284.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of strawberry-graphql might be problematic. Click here for more details.
- strawberry/aiohttp/test/client.py +8 -15
- strawberry/aiohttp/views.py +12 -15
- strawberry/annotation.py +19 -23
- strawberry/asgi/__init__.py +18 -17
- strawberry/asgi/test/client.py +6 -6
- strawberry/chalice/views.py +6 -6
- strawberry/channels/handlers/base.py +7 -8
- strawberry/channels/handlers/http_handler.py +18 -20
- strawberry/channels/handlers/ws_handler.py +10 -12
- strawberry/channels/router.py +3 -4
- strawberry/channels/testing.py +7 -9
- strawberry/cli/commands/codegen.py +7 -7
- strawberry/cli/commands/schema_codegen.py +1 -2
- strawberry/cli/commands/upgrade/__init__.py +1 -3
- strawberry/cli/commands/upgrade/_run_codemod.py +2 -2
- strawberry/codegen/plugins/print_operation.py +2 -2
- strawberry/codegen/plugins/python.py +2 -2
- strawberry/codegen/query_codegen.py +20 -30
- strawberry/codegen/types.py +32 -32
- strawberry/codemods/annotated_unions.py +2 -2
- strawberry/dataloader.py +28 -24
- strawberry/directive.py +6 -7
- strawberry/django/test/client.py +3 -3
- strawberry/django/views.py +16 -19
- strawberry/exceptions/__init__.py +4 -4
- strawberry/exceptions/conflicting_arguments.py +2 -2
- strawberry/exceptions/duplicated_type_name.py +4 -4
- strawberry/exceptions/exception.py +3 -3
- strawberry/exceptions/handler.py +8 -7
- strawberry/exceptions/invalid_argument_type.py +2 -2
- strawberry/exceptions/invalid_superclass_interface.py +2 -2
- strawberry/exceptions/invalid_union_type.py +4 -4
- strawberry/exceptions/missing_arguments_annotations.py +2 -2
- strawberry/exceptions/missing_dependencies.py +2 -4
- strawberry/exceptions/missing_field_annotation.py +2 -2
- strawberry/exceptions/missing_return_annotation.py +2 -2
- strawberry/exceptions/object_is_not_a_class.py +2 -2
- strawberry/exceptions/object_is_not_an_enum.py +2 -2
- strawberry/exceptions/permission_fail_silently_requires_optional.py +2 -2
- strawberry/exceptions/private_strawberry_field.py +2 -2
- strawberry/exceptions/scalar_already_registered.py +2 -2
- strawberry/exceptions/syntax.py +3 -3
- strawberry/exceptions/unresolved_field_type.py +2 -2
- strawberry/exceptions/utils/source_finder.py +25 -25
- strawberry/experimental/pydantic/_compat.py +8 -7
- strawberry/experimental/pydantic/conversion.py +2 -2
- strawberry/experimental/pydantic/conversion_types.py +2 -2
- strawberry/experimental/pydantic/error_type.py +10 -12
- strawberry/experimental/pydantic/fields.py +9 -15
- strawberry/experimental/pydantic/object_type.py +15 -23
- strawberry/experimental/pydantic/utils.py +1 -2
- strawberry/ext/mypy_plugin.py +12 -14
- strawberry/extensions/base_extension.py +2 -1
- strawberry/extensions/context.py +13 -18
- strawberry/extensions/directives.py +3 -1
- strawberry/extensions/field_extension.py +4 -4
- strawberry/extensions/max_aliases.py +1 -3
- strawberry/extensions/parser_cache.py +1 -2
- strawberry/extensions/query_depth_limiter.py +18 -14
- strawberry/extensions/runner.py +2 -2
- strawberry/extensions/tracing/apollo.py +3 -3
- strawberry/extensions/tracing/datadog.py +3 -3
- strawberry/extensions/tracing/opentelemetry.py +6 -8
- strawberry/extensions/tracing/utils.py +3 -1
- strawberry/extensions/utils.py +2 -2
- strawberry/extensions/validation_cache.py +1 -2
- strawberry/fastapi/context.py +6 -6
- strawberry/fastapi/router.py +33 -36
- strawberry/federation/argument.py +4 -5
- strawberry/federation/enum.py +18 -21
- strawberry/federation/field.py +94 -97
- strawberry/federation/object_type.py +56 -58
- strawberry/federation/scalar.py +27 -35
- strawberry/federation/schema.py +15 -16
- strawberry/federation/schema_directive.py +7 -6
- strawberry/federation/schema_directives.py +11 -11
- strawberry/federation/union.py +4 -4
- strawberry/flask/views.py +10 -11
- strawberry/http/__init__.py +14 -14
- strawberry/http/async_base_view.py +23 -28
- strawberry/http/base.py +11 -12
- strawberry/http/ides.py +2 -3
- strawberry/http/sync_base_view.py +11 -13
- strawberry/http/types.py +3 -3
- strawberry/litestar/controller.py +40 -35
- strawberry/permission.py +4 -6
- strawberry/printer/ast_from_value.py +3 -5
- strawberry/printer/printer.py +8 -13
- strawberry/quart/views.py +12 -14
- strawberry/relay/exceptions.py +4 -4
- strawberry/relay/fields.py +33 -32
- strawberry/relay/types.py +31 -34
- strawberry/relay/utils.py +2 -2
- strawberry/resolvers.py +2 -1
- strawberry/sanic/context.py +1 -0
- strawberry/sanic/utils.py +3 -3
- strawberry/sanic/views.py +11 -14
- strawberry/scalars.py +2 -2
- strawberry/schema/_graphql_core.py +5 -5
- strawberry/schema/base.py +32 -33
- strawberry/schema/compat.py +9 -9
- strawberry/schema/config.py +5 -2
- strawberry/schema/exceptions.py +1 -3
- strawberry/schema/name_converter.py +6 -6
- strawberry/schema/schema.py +55 -60
- strawberry/schema/schema_converter.py +27 -22
- strawberry/schema/types/base_scalars.py +1 -1
- strawberry/schema/types/concrete_type.py +5 -5
- strawberry/schema_codegen/__init__.py +3 -3
- strawberry/schema_directive.py +7 -6
- strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +5 -6
- strawberry/subscriptions/protocols/graphql_transport_ws/types.py +20 -20
- strawberry/subscriptions/protocols/graphql_ws/handlers.py +5 -6
- strawberry/subscriptions/protocols/graphql_ws/types.py +14 -14
- strawberry/test/client.py +18 -18
- strawberry/tools/create_type.py +2 -3
- strawberry/types/arguments.py +25 -26
- strawberry/types/auto.py +3 -4
- strawberry/types/base.py +25 -27
- strawberry/types/enum.py +22 -25
- strawberry/types/execution.py +14 -15
- strawberry/types/field.py +108 -108
- strawberry/types/fields/resolver.py +19 -21
- strawberry/types/info.py +5 -11
- strawberry/types/lazy_type.py +2 -3
- strawberry/types/maybe.py +12 -3
- strawberry/types/mutation.py +115 -118
- strawberry/types/nodes.py +2 -2
- strawberry/types/object_type.py +43 -63
- strawberry/types/scalar.py +37 -43
- strawberry/types/union.py +12 -14
- strawberry/utils/aio.py +12 -9
- strawberry/utils/await_maybe.py +3 -3
- strawberry/utils/deprecations.py +2 -2
- strawberry/utils/importer.py +1 -2
- strawberry/utils/inspect.py +4 -6
- strawberry/utils/logging.py +2 -2
- strawberry/utils/operation.py +4 -4
- strawberry/utils/typing.py +18 -83
- {strawberry_graphql-0.283.0.dist-info → strawberry_graphql-0.284.3.dist-info}/METADATA +2 -2
- strawberry_graphql-0.284.3.dist-info/RECORD +243 -0
- strawberry/utils/dataclasses.py +0 -37
- strawberry_graphql-0.283.0.dist-info/RECORD +0 -244
- {strawberry_graphql-0.283.0.dist-info → strawberry_graphql-0.284.3.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.283.0.dist-info → strawberry_graphql-0.284.3.dist-info}/entry_points.txt +0 -0
- {strawberry_graphql-0.283.0.dist-info → strawberry_graphql-0.284.3.dist-info}/licenses/LICENSE +0 -0
strawberry/federation/enum.py
CHANGED
|
@@ -3,9 +3,6 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import (
|
|
4
4
|
TYPE_CHECKING,
|
|
5
5
|
Any,
|
|
6
|
-
Callable,
|
|
7
|
-
Optional,
|
|
8
|
-
Union,
|
|
9
6
|
overload,
|
|
10
7
|
)
|
|
11
8
|
|
|
@@ -13,15 +10,15 @@ from strawberry.types.enum import _process_enum
|
|
|
13
10
|
from strawberry.types.enum import enum_value as base_enum_value
|
|
14
11
|
|
|
15
12
|
if TYPE_CHECKING:
|
|
16
|
-
from collections.abc import Iterable
|
|
13
|
+
from collections.abc import Callable, Iterable
|
|
17
14
|
|
|
18
15
|
from strawberry.enum import EnumType, EnumValueDefinition
|
|
19
16
|
|
|
20
17
|
|
|
21
18
|
def enum_value(
|
|
22
19
|
value: Any,
|
|
23
|
-
name:
|
|
24
|
-
deprecation_reason:
|
|
20
|
+
name: str | None = None,
|
|
21
|
+
deprecation_reason: str | None = None,
|
|
25
22
|
directives: Iterable[object] = (),
|
|
26
23
|
inaccessible: bool = False,
|
|
27
24
|
tags: Iterable[str] = (),
|
|
@@ -48,14 +45,14 @@ def enum_value(
|
|
|
48
45
|
def enum(
|
|
49
46
|
_cls: EnumType,
|
|
50
47
|
*,
|
|
51
|
-
name:
|
|
52
|
-
description:
|
|
48
|
+
name: str | None = None,
|
|
49
|
+
description: str | None = None,
|
|
53
50
|
directives: Iterable[object] = (),
|
|
54
51
|
authenticated: bool = False,
|
|
55
52
|
inaccessible: bool = False,
|
|
56
|
-
policy:
|
|
57
|
-
requires_scopes:
|
|
58
|
-
tags:
|
|
53
|
+
policy: list[list[str]] | None = None,
|
|
54
|
+
requires_scopes: list[list[str]] | None = None,
|
|
55
|
+
tags: Iterable[str] | None = (),
|
|
59
56
|
) -> EnumType: ...
|
|
60
57
|
|
|
61
58
|
|
|
@@ -63,29 +60,29 @@ def enum(
|
|
|
63
60
|
def enum(
|
|
64
61
|
_cls: None = None,
|
|
65
62
|
*,
|
|
66
|
-
name:
|
|
67
|
-
description:
|
|
63
|
+
name: str | None = None,
|
|
64
|
+
description: str | None = None,
|
|
68
65
|
directives: Iterable[object] = (),
|
|
69
66
|
authenticated: bool = False,
|
|
70
67
|
inaccessible: bool = False,
|
|
71
|
-
policy:
|
|
72
|
-
requires_scopes:
|
|
73
|
-
tags:
|
|
68
|
+
policy: list[list[str]] | None = None,
|
|
69
|
+
requires_scopes: list[list[str]] | None = None,
|
|
70
|
+
tags: Iterable[str] | None = (),
|
|
74
71
|
) -> Callable[[EnumType], EnumType]: ...
|
|
75
72
|
|
|
76
73
|
|
|
77
74
|
def enum(
|
|
78
|
-
_cls:
|
|
75
|
+
_cls: EnumType | None = None,
|
|
79
76
|
*,
|
|
80
77
|
name=None,
|
|
81
78
|
description=None,
|
|
82
79
|
directives=(),
|
|
83
80
|
authenticated: bool = False,
|
|
84
81
|
inaccessible: bool = False,
|
|
85
|
-
policy:
|
|
86
|
-
requires_scopes:
|
|
87
|
-
tags:
|
|
88
|
-
) ->
|
|
82
|
+
policy: list[list[str]] | None = None,
|
|
83
|
+
requires_scopes: list[list[str]] | None = None,
|
|
84
|
+
tags: Iterable[str] | None = (),
|
|
85
|
+
) -> EnumType | Callable[[EnumType], EnumType]:
|
|
89
86
|
"""Registers the enum in the GraphQL type system.
|
|
90
87
|
|
|
91
88
|
If name is passed, the name of the GraphQL type will be
|
strawberry/federation/field.py
CHANGED
|
@@ -4,10 +4,7 @@ import dataclasses
|
|
|
4
4
|
from typing import (
|
|
5
5
|
TYPE_CHECKING,
|
|
6
6
|
Any,
|
|
7
|
-
Callable,
|
|
8
|
-
Optional,
|
|
9
7
|
TypeVar,
|
|
10
|
-
Union,
|
|
11
8
|
overload,
|
|
12
9
|
)
|
|
13
10
|
|
|
@@ -15,8 +12,8 @@ from strawberry.types.field import field as base_field
|
|
|
15
12
|
from strawberry.types.unset import UNSET
|
|
16
13
|
|
|
17
14
|
if TYPE_CHECKING:
|
|
18
|
-
from collections.abc import Iterable, Mapping, Sequence
|
|
19
|
-
from
|
|
15
|
+
from collections.abc import Callable, Iterable, Mapping, Sequence
|
|
16
|
+
from typing import Literal
|
|
20
17
|
|
|
21
18
|
from strawberry.extensions.field_extension import FieldExtension
|
|
22
19
|
from strawberry.permission import BasePermission
|
|
@@ -39,28 +36,28 @@ T = TypeVar("T")
|
|
|
39
36
|
def field(
|
|
40
37
|
*,
|
|
41
38
|
resolver: _RESOLVER_TYPE_ASYNC[T],
|
|
42
|
-
name:
|
|
39
|
+
name: str | None = None,
|
|
43
40
|
is_subscription: bool = False,
|
|
44
|
-
description:
|
|
41
|
+
description: str | None = None,
|
|
45
42
|
authenticated: bool = False,
|
|
46
43
|
external: bool = False,
|
|
47
44
|
inaccessible: bool = False,
|
|
48
|
-
policy:
|
|
49
|
-
provides:
|
|
50
|
-
override:
|
|
51
|
-
requires:
|
|
52
|
-
requires_scopes:
|
|
53
|
-
tags:
|
|
45
|
+
policy: list[list[str]] | None = None,
|
|
46
|
+
provides: list[str] | None = None,
|
|
47
|
+
override: Override | str | None = None,
|
|
48
|
+
requires: list[str] | None = None,
|
|
49
|
+
requires_scopes: list[list[str]] | None = None,
|
|
50
|
+
tags: Iterable[str] | None = (),
|
|
54
51
|
shareable: bool = False,
|
|
55
52
|
init: Literal[False] = False,
|
|
56
|
-
permission_classes:
|
|
57
|
-
deprecation_reason:
|
|
53
|
+
permission_classes: list[type[BasePermission]] | None = None,
|
|
54
|
+
deprecation_reason: str | None = None,
|
|
58
55
|
default: Any = dataclasses.MISSING,
|
|
59
|
-
default_factory:
|
|
60
|
-
metadata:
|
|
61
|
-
directives:
|
|
62
|
-
extensions:
|
|
63
|
-
graphql_type:
|
|
56
|
+
default_factory: Callable[..., object] | object = dataclasses.MISSING,
|
|
57
|
+
metadata: Mapping[Any, Any] | None = None,
|
|
58
|
+
directives: Sequence[object] | None = (),
|
|
59
|
+
extensions: list[FieldExtension] | None = None,
|
|
60
|
+
graphql_type: Any | None = None,
|
|
64
61
|
) -> T: ...
|
|
65
62
|
|
|
66
63
|
|
|
@@ -68,56 +65,56 @@ def field(
|
|
|
68
65
|
def field(
|
|
69
66
|
*,
|
|
70
67
|
resolver: _RESOLVER_TYPE_SYNC[T],
|
|
71
|
-
name:
|
|
68
|
+
name: str | None = None,
|
|
72
69
|
is_subscription: bool = False,
|
|
73
|
-
description:
|
|
70
|
+
description: str | None = None,
|
|
74
71
|
authenticated: bool = False,
|
|
75
72
|
external: bool = False,
|
|
76
73
|
inaccessible: bool = False,
|
|
77
|
-
policy:
|
|
78
|
-
provides:
|
|
79
|
-
override:
|
|
80
|
-
requires:
|
|
81
|
-
requires_scopes:
|
|
82
|
-
tags:
|
|
74
|
+
policy: list[list[str]] | None = None,
|
|
75
|
+
provides: list[str] | None = None,
|
|
76
|
+
override: Override | str | None = None,
|
|
77
|
+
requires: list[str] | None = None,
|
|
78
|
+
requires_scopes: list[list[str]] | None = None,
|
|
79
|
+
tags: Iterable[str] | None = (),
|
|
83
80
|
shareable: bool = False,
|
|
84
81
|
init: Literal[False] = False,
|
|
85
|
-
permission_classes:
|
|
86
|
-
deprecation_reason:
|
|
82
|
+
permission_classes: list[type[BasePermission]] | None = None,
|
|
83
|
+
deprecation_reason: str | None = None,
|
|
87
84
|
default: Any = dataclasses.MISSING,
|
|
88
|
-
default_factory:
|
|
89
|
-
metadata:
|
|
90
|
-
directives:
|
|
91
|
-
extensions:
|
|
92
|
-
graphql_type:
|
|
85
|
+
default_factory: Callable[..., object] | object = dataclasses.MISSING,
|
|
86
|
+
metadata: Mapping[Any, Any] | None = None,
|
|
87
|
+
directives: Sequence[object] | None = (),
|
|
88
|
+
extensions: list[FieldExtension] | None = None,
|
|
89
|
+
graphql_type: Any | None = None,
|
|
93
90
|
) -> T: ...
|
|
94
91
|
|
|
95
92
|
|
|
96
93
|
@overload
|
|
97
94
|
def field(
|
|
98
95
|
*,
|
|
99
|
-
name:
|
|
96
|
+
name: str | None = None,
|
|
100
97
|
is_subscription: bool = False,
|
|
101
|
-
description:
|
|
98
|
+
description: str | None = None,
|
|
102
99
|
authenticated: bool = False,
|
|
103
100
|
external: bool = False,
|
|
104
101
|
inaccessible: bool = False,
|
|
105
|
-
policy:
|
|
106
|
-
provides:
|
|
107
|
-
override:
|
|
108
|
-
requires:
|
|
109
|
-
requires_scopes:
|
|
110
|
-
tags:
|
|
102
|
+
policy: list[list[str]] | None = None,
|
|
103
|
+
provides: list[str] | None = None,
|
|
104
|
+
override: Override | str | None = None,
|
|
105
|
+
requires: list[str] | None = None,
|
|
106
|
+
requires_scopes: list[list[str]] | None = None,
|
|
107
|
+
tags: Iterable[str] | None = (),
|
|
111
108
|
shareable: bool = False,
|
|
112
109
|
init: Literal[True] = True,
|
|
113
|
-
permission_classes:
|
|
114
|
-
deprecation_reason:
|
|
110
|
+
permission_classes: list[type[BasePermission]] | None = None,
|
|
111
|
+
deprecation_reason: str | None = None,
|
|
115
112
|
default: Any = dataclasses.MISSING,
|
|
116
|
-
default_factory:
|
|
117
|
-
metadata:
|
|
118
|
-
directives:
|
|
119
|
-
extensions:
|
|
120
|
-
graphql_type:
|
|
113
|
+
default_factory: Callable[..., object] | object = dataclasses.MISSING,
|
|
114
|
+
metadata: Mapping[Any, Any] | None = None,
|
|
115
|
+
directives: Sequence[object] | None = (),
|
|
116
|
+
extensions: list[FieldExtension] | None = None,
|
|
117
|
+
graphql_type: Any | None = None,
|
|
121
118
|
) -> Any: ...
|
|
122
119
|
|
|
123
120
|
|
|
@@ -125,27 +122,27 @@ def field(
|
|
|
125
122
|
def field(
|
|
126
123
|
resolver: _RESOLVER_TYPE_ASYNC[T],
|
|
127
124
|
*,
|
|
128
|
-
name:
|
|
125
|
+
name: str | None = None,
|
|
129
126
|
is_subscription: bool = False,
|
|
130
|
-
description:
|
|
127
|
+
description: str | None = None,
|
|
131
128
|
authenticated: bool = False,
|
|
132
129
|
external: bool = False,
|
|
133
130
|
inaccessible: bool = False,
|
|
134
|
-
policy:
|
|
135
|
-
provides:
|
|
136
|
-
override:
|
|
137
|
-
requires:
|
|
138
|
-
requires_scopes:
|
|
139
|
-
tags:
|
|
131
|
+
policy: list[list[str]] | None = None,
|
|
132
|
+
provides: list[str] | None = None,
|
|
133
|
+
override: Override | str | None = None,
|
|
134
|
+
requires: list[str] | None = None,
|
|
135
|
+
requires_scopes: list[list[str]] | None = None,
|
|
136
|
+
tags: Iterable[str] | None = (),
|
|
140
137
|
shareable: bool = False,
|
|
141
|
-
permission_classes:
|
|
142
|
-
deprecation_reason:
|
|
138
|
+
permission_classes: list[type[BasePermission]] | None = None,
|
|
139
|
+
deprecation_reason: str | None = None,
|
|
143
140
|
default: Any = dataclasses.MISSING,
|
|
144
|
-
default_factory:
|
|
145
|
-
metadata:
|
|
146
|
-
directives:
|
|
147
|
-
extensions:
|
|
148
|
-
graphql_type:
|
|
141
|
+
default_factory: Callable[..., object] | object = dataclasses.MISSING,
|
|
142
|
+
metadata: Mapping[Any, Any] | None = None,
|
|
143
|
+
directives: Sequence[object] | None = (),
|
|
144
|
+
extensions: list[FieldExtension] | None = None,
|
|
145
|
+
graphql_type: Any | None = None,
|
|
149
146
|
) -> StrawberryField: ...
|
|
150
147
|
|
|
151
148
|
|
|
@@ -153,58 +150,58 @@ def field(
|
|
|
153
150
|
def field(
|
|
154
151
|
resolver: _RESOLVER_TYPE_SYNC[T],
|
|
155
152
|
*,
|
|
156
|
-
name:
|
|
153
|
+
name: str | None = None,
|
|
157
154
|
is_subscription: bool = False,
|
|
158
|
-
description:
|
|
155
|
+
description: str | None = None,
|
|
159
156
|
authenticated: bool = False,
|
|
160
157
|
external: bool = False,
|
|
161
158
|
inaccessible: bool = False,
|
|
162
|
-
policy:
|
|
163
|
-
provides:
|
|
164
|
-
override:
|
|
165
|
-
requires:
|
|
166
|
-
requires_scopes:
|
|
167
|
-
tags:
|
|
159
|
+
policy: list[list[str]] | None = None,
|
|
160
|
+
provides: list[str] | None = None,
|
|
161
|
+
override: Override | str | None = None,
|
|
162
|
+
requires: list[str] | None = None,
|
|
163
|
+
requires_scopes: list[list[str]] | None = None,
|
|
164
|
+
tags: Iterable[str] | None = (),
|
|
168
165
|
shareable: bool = False,
|
|
169
|
-
permission_classes:
|
|
170
|
-
deprecation_reason:
|
|
166
|
+
permission_classes: list[type[BasePermission]] | None = None,
|
|
167
|
+
deprecation_reason: str | None = None,
|
|
171
168
|
default: Any = dataclasses.MISSING,
|
|
172
|
-
default_factory:
|
|
173
|
-
metadata:
|
|
174
|
-
directives:
|
|
175
|
-
extensions:
|
|
176
|
-
graphql_type:
|
|
169
|
+
default_factory: Callable[..., object] | object = dataclasses.MISSING,
|
|
170
|
+
metadata: Mapping[Any, Any] | None = None,
|
|
171
|
+
directives: Sequence[object] | None = (),
|
|
172
|
+
extensions: list[FieldExtension] | None = None,
|
|
173
|
+
graphql_type: Any | None = None,
|
|
177
174
|
) -> StrawberryField: ...
|
|
178
175
|
|
|
179
176
|
|
|
180
177
|
def field(
|
|
181
|
-
resolver:
|
|
178
|
+
resolver: _RESOLVER_TYPE[Any] | None = None,
|
|
182
179
|
*,
|
|
183
|
-
name:
|
|
180
|
+
name: str | None = None,
|
|
184
181
|
is_subscription: bool = False,
|
|
185
|
-
description:
|
|
182
|
+
description: str | None = None,
|
|
186
183
|
authenticated: bool = False,
|
|
187
184
|
external: bool = False,
|
|
188
185
|
inaccessible: bool = False,
|
|
189
|
-
policy:
|
|
190
|
-
provides:
|
|
191
|
-
override:
|
|
192
|
-
requires:
|
|
193
|
-
requires_scopes:
|
|
194
|
-
tags:
|
|
186
|
+
policy: list[list[str]] | None = None,
|
|
187
|
+
provides: list[str] | None = None,
|
|
188
|
+
override: Override | str | None = None,
|
|
189
|
+
requires: list[str] | None = None,
|
|
190
|
+
requires_scopes: list[list[str]] | None = None,
|
|
191
|
+
tags: Iterable[str] | None = (),
|
|
195
192
|
shareable: bool = False,
|
|
196
|
-
permission_classes:
|
|
197
|
-
deprecation_reason:
|
|
193
|
+
permission_classes: list[type[BasePermission]] | None = None,
|
|
194
|
+
deprecation_reason: str | None = None,
|
|
198
195
|
default: Any = dataclasses.MISSING,
|
|
199
|
-
default_factory:
|
|
200
|
-
metadata:
|
|
201
|
-
directives:
|
|
202
|
-
extensions:
|
|
203
|
-
graphql_type:
|
|
196
|
+
default_factory: Callable[..., object] | object = dataclasses.MISSING,
|
|
197
|
+
metadata: Mapping[Any, Any] | None = None,
|
|
198
|
+
directives: Sequence[object] | None = (),
|
|
199
|
+
extensions: list[FieldExtension] | None = None,
|
|
200
|
+
graphql_type: Any | None = None,
|
|
204
201
|
# This init parameter is used by PyRight to determine whether this field
|
|
205
202
|
# is added in the constructor or not. It is not used to change
|
|
206
203
|
# any behavior at the moment.
|
|
207
|
-
init: Literal[True, False
|
|
204
|
+
init: Literal[True, False] | None = None,
|
|
208
205
|
) -> Any:
|
|
209
206
|
from .schema_directives import (
|
|
210
207
|
Authenticated,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import builtins
|
|
2
|
-
from collections.abc import Iterable, Sequence
|
|
2
|
+
from collections.abc import Callable, Iterable, Sequence
|
|
3
3
|
from typing import (
|
|
4
4
|
TYPE_CHECKING,
|
|
5
|
-
Callable,
|
|
6
|
-
Optional,
|
|
7
5
|
TypeVar,
|
|
8
6
|
Union,
|
|
9
7
|
overload,
|
|
@@ -25,19 +23,19 @@ T = TypeVar("T", bound=builtins.type)
|
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
def _impl_type(
|
|
28
|
-
cls:
|
|
26
|
+
cls: T | None,
|
|
29
27
|
*,
|
|
30
|
-
name:
|
|
31
|
-
description:
|
|
32
|
-
one_of:
|
|
28
|
+
name: str | None = None,
|
|
29
|
+
description: str | None = None,
|
|
30
|
+
one_of: bool | None = None,
|
|
33
31
|
directives: Iterable[object] = (),
|
|
34
32
|
authenticated: bool = False,
|
|
35
33
|
keys: Iterable[Union["Key", str]] = (),
|
|
36
34
|
extend: bool = False,
|
|
37
35
|
shareable: bool = False,
|
|
38
36
|
inaccessible: bool = UNSET,
|
|
39
|
-
policy:
|
|
40
|
-
requires_scopes:
|
|
37
|
+
policy: list[list[str]] | None = None,
|
|
38
|
+
requires_scopes: list[list[str]] | None = None,
|
|
41
39
|
tags: Iterable[str] = (),
|
|
42
40
|
is_input: bool = False,
|
|
43
41
|
is_interface: bool = False,
|
|
@@ -106,15 +104,15 @@ def _impl_type(
|
|
|
106
104
|
def type(
|
|
107
105
|
cls: T,
|
|
108
106
|
*,
|
|
109
|
-
name:
|
|
110
|
-
description:
|
|
107
|
+
name: str | None = None,
|
|
108
|
+
description: str | None = None,
|
|
111
109
|
directives: Iterable[object] = (),
|
|
112
110
|
authenticated: bool = False,
|
|
113
111
|
extend: bool = False,
|
|
114
112
|
inaccessible: bool = UNSET,
|
|
115
113
|
keys: Iterable[Union["Key", str]] = (),
|
|
116
|
-
policy:
|
|
117
|
-
requires_scopes:
|
|
114
|
+
policy: list[list[str]] | None = None,
|
|
115
|
+
requires_scopes: list[list[str]] | None = None,
|
|
118
116
|
shareable: bool = False,
|
|
119
117
|
tags: Iterable[str] = (),
|
|
120
118
|
) -> T: ...
|
|
@@ -128,32 +126,32 @@ def type(
|
|
|
128
126
|
)
|
|
129
127
|
def type(
|
|
130
128
|
*,
|
|
131
|
-
name:
|
|
132
|
-
description:
|
|
129
|
+
name: str | None = None,
|
|
130
|
+
description: str | None = None,
|
|
133
131
|
directives: Iterable[object] = (),
|
|
134
132
|
authenticated: bool = False,
|
|
135
133
|
extend: bool = False,
|
|
136
134
|
inaccessible: bool = UNSET,
|
|
137
135
|
keys: Iterable[Union["Key", str]] = (),
|
|
138
|
-
policy:
|
|
139
|
-
requires_scopes:
|
|
136
|
+
policy: list[list[str]] | None = None,
|
|
137
|
+
requires_scopes: list[list[str]] | None = None,
|
|
140
138
|
shareable: bool = False,
|
|
141
139
|
tags: Iterable[str] = (),
|
|
142
140
|
) -> Callable[[T], T]: ...
|
|
143
141
|
|
|
144
142
|
|
|
145
143
|
def type(
|
|
146
|
-
cls:
|
|
144
|
+
cls: T | None = None,
|
|
147
145
|
*,
|
|
148
|
-
name:
|
|
149
|
-
description:
|
|
146
|
+
name: str | None = None,
|
|
147
|
+
description: str | None = None,
|
|
150
148
|
directives: Iterable[object] = (),
|
|
151
149
|
authenticated: bool = False,
|
|
152
150
|
extend: bool = False,
|
|
153
151
|
inaccessible: bool = UNSET,
|
|
154
152
|
keys: Iterable[Union["Key", str]] = (),
|
|
155
|
-
policy:
|
|
156
|
-
requires_scopes:
|
|
153
|
+
policy: list[list[str]] | None = None,
|
|
154
|
+
requires_scopes: list[list[str]] | None = None,
|
|
157
155
|
shareable: bool = False,
|
|
158
156
|
tags: Iterable[str] = (),
|
|
159
157
|
):
|
|
@@ -182,9 +180,9 @@ def type(
|
|
|
182
180
|
def input(
|
|
183
181
|
cls: T,
|
|
184
182
|
*,
|
|
185
|
-
name:
|
|
186
|
-
one_of:
|
|
187
|
-
description:
|
|
183
|
+
name: str | None = None,
|
|
184
|
+
one_of: bool | None = None,
|
|
185
|
+
description: str | None = None,
|
|
188
186
|
directives: Sequence[object] = (),
|
|
189
187
|
inaccessible: bool = UNSET,
|
|
190
188
|
tags: Iterable[str] = (),
|
|
@@ -199,9 +197,9 @@ def input(
|
|
|
199
197
|
)
|
|
200
198
|
def input(
|
|
201
199
|
*,
|
|
202
|
-
name:
|
|
203
|
-
description:
|
|
204
|
-
one_of:
|
|
200
|
+
name: str | None = None,
|
|
201
|
+
description: str | None = None,
|
|
202
|
+
one_of: bool | None = None,
|
|
205
203
|
directives: Sequence[object] = (),
|
|
206
204
|
inaccessible: bool = UNSET,
|
|
207
205
|
tags: Iterable[str] = (),
|
|
@@ -209,11 +207,11 @@ def input(
|
|
|
209
207
|
|
|
210
208
|
|
|
211
209
|
def input(
|
|
212
|
-
cls:
|
|
210
|
+
cls: T | None = None,
|
|
213
211
|
*,
|
|
214
|
-
name:
|
|
215
|
-
one_of:
|
|
216
|
-
description:
|
|
212
|
+
name: str | None = None,
|
|
213
|
+
one_of: bool | None = None,
|
|
214
|
+
description: str | None = None,
|
|
217
215
|
directives: Sequence[object] = (),
|
|
218
216
|
inaccessible: bool = UNSET,
|
|
219
217
|
tags: Iterable[str] = (),
|
|
@@ -239,14 +237,14 @@ def input(
|
|
|
239
237
|
def interface(
|
|
240
238
|
cls: T,
|
|
241
239
|
*,
|
|
242
|
-
name:
|
|
243
|
-
description:
|
|
240
|
+
name: str | None = None,
|
|
241
|
+
description: str | None = None,
|
|
244
242
|
directives: Iterable[object] = (),
|
|
245
243
|
authenticated: bool = False,
|
|
246
244
|
inaccessible: bool = UNSET,
|
|
247
245
|
keys: Iterable[Union["Key", str]] = (),
|
|
248
|
-
policy:
|
|
249
|
-
requires_scopes:
|
|
246
|
+
policy: list[list[str]] | None = None,
|
|
247
|
+
requires_scopes: list[list[str]] | None = None,
|
|
250
248
|
tags: Iterable[str] = (),
|
|
251
249
|
) -> T: ...
|
|
252
250
|
|
|
@@ -259,29 +257,29 @@ def interface(
|
|
|
259
257
|
)
|
|
260
258
|
def interface(
|
|
261
259
|
*,
|
|
262
|
-
name:
|
|
263
|
-
description:
|
|
260
|
+
name: str | None = None,
|
|
261
|
+
description: str | None = None,
|
|
264
262
|
directives: Iterable[object] = (),
|
|
265
263
|
authenticated: bool = False,
|
|
266
264
|
inaccessible: bool = UNSET,
|
|
267
265
|
keys: Iterable[Union["Key", str]] = (),
|
|
268
|
-
policy:
|
|
269
|
-
requires_scopes:
|
|
266
|
+
policy: list[list[str]] | None = None,
|
|
267
|
+
requires_scopes: list[list[str]] | None = None,
|
|
270
268
|
tags: Iterable[str] = (),
|
|
271
269
|
) -> Callable[[T], T]: ...
|
|
272
270
|
|
|
273
271
|
|
|
274
272
|
def interface(
|
|
275
|
-
cls:
|
|
273
|
+
cls: T | None = None,
|
|
276
274
|
*,
|
|
277
|
-
name:
|
|
278
|
-
description:
|
|
275
|
+
name: str | None = None,
|
|
276
|
+
description: str | None = None,
|
|
279
277
|
directives: Iterable[object] = (),
|
|
280
278
|
authenticated: bool = False,
|
|
281
279
|
inaccessible: bool = UNSET,
|
|
282
280
|
keys: Iterable[Union["Key", str]] = (),
|
|
283
|
-
policy:
|
|
284
|
-
requires_scopes:
|
|
281
|
+
policy: list[list[str]] | None = None,
|
|
282
|
+
requires_scopes: list[list[str]] | None = None,
|
|
285
283
|
tags: Iterable[str] = (),
|
|
286
284
|
):
|
|
287
285
|
return _impl_type(
|
|
@@ -308,14 +306,14 @@ def interface(
|
|
|
308
306
|
def interface_object(
|
|
309
307
|
cls: T,
|
|
310
308
|
*,
|
|
311
|
-
name:
|
|
312
|
-
description:
|
|
309
|
+
name: str | None = None,
|
|
310
|
+
description: str | None = None,
|
|
313
311
|
directives: Iterable[object] = (),
|
|
314
312
|
authenticated: bool = False,
|
|
315
313
|
inaccessible: bool = UNSET,
|
|
316
314
|
keys: Iterable[Union["Key", str]] = (),
|
|
317
|
-
policy:
|
|
318
|
-
requires_scopes:
|
|
315
|
+
policy: list[list[str]] | None = None,
|
|
316
|
+
requires_scopes: list[list[str]] | None = None,
|
|
319
317
|
tags: Iterable[str] = (),
|
|
320
318
|
) -> T: ...
|
|
321
319
|
|
|
@@ -328,29 +326,29 @@ def interface_object(
|
|
|
328
326
|
)
|
|
329
327
|
def interface_object(
|
|
330
328
|
*,
|
|
331
|
-
name:
|
|
332
|
-
description:
|
|
329
|
+
name: str | None = None,
|
|
330
|
+
description: str | None = None,
|
|
333
331
|
directives: Iterable[object] = (),
|
|
334
332
|
authenticated: bool = False,
|
|
335
333
|
inaccessible: bool = UNSET,
|
|
336
334
|
keys: Iterable[Union["Key", str]] = (),
|
|
337
|
-
policy:
|
|
338
|
-
requires_scopes:
|
|
335
|
+
policy: list[list[str]] | None = None,
|
|
336
|
+
requires_scopes: list[list[str]] | None = None,
|
|
339
337
|
tags: Iterable[str] = (),
|
|
340
338
|
) -> Callable[[T], T]: ...
|
|
341
339
|
|
|
342
340
|
|
|
343
341
|
def interface_object(
|
|
344
|
-
cls:
|
|
342
|
+
cls: T | None = None,
|
|
345
343
|
*,
|
|
346
|
-
name:
|
|
347
|
-
description:
|
|
344
|
+
name: str | None = None,
|
|
345
|
+
description: str | None = None,
|
|
348
346
|
directives: Iterable[object] = (),
|
|
349
347
|
authenticated: bool = False,
|
|
350
348
|
inaccessible: bool = UNSET,
|
|
351
349
|
keys: Iterable[Union["Key", str]] = (),
|
|
352
|
-
policy:
|
|
353
|
-
requires_scopes:
|
|
350
|
+
policy: list[list[str]] | None = None,
|
|
351
|
+
requires_scopes: list[list[str]] | None = None,
|
|
354
352
|
tags: Iterable[str] = (),
|
|
355
353
|
):
|
|
356
354
|
return _impl_type(
|