Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/modules/pyutils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ PyUtils
.. autoclass:: AbortSignal
.. autoexception:: AbortError
.. autoclass:: AwaitableOrValue
.. autoclass:: BoxedAwaitableOrValue
.. autofunction:: suggestion_list
.. autoclass:: FrozenError
:no-members:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ ignore = [
"I001", # imports do not need to be sorted
]
"src/graphql/execution/*" = [
"ARG002", # allow unused arguments in overridable hook methods
"BLE001", # allow catching blind exception
]
"src/graphql/language/ast.py" = [
Expand Down
12 changes: 0 additions & 12 deletions src/graphql/execution/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .async_iterables import map_async_iterable
from .types import (
CompletedResult,
DeferredFragmentRecord,
ExecutionResult,
ExperimentalIncrementalExecutionResults,
FormattedSubsequentIncrementalExecutionResult,
Expand All @@ -24,10 +23,6 @@
InitialIncrementalExecutionResult,
PendingResult,
SubsequentIncrementalExecutionResult,
StreamRecord,
StreamItemRecord,
StreamItemResult,
StreamItemsResult,
)
from .middleware import MiddlewareManager
from .values import (
Expand All @@ -50,7 +45,6 @@
AsyncWorkFinishedInfo,
ExecutionHooks,
Executor,
GraphQLWrappedResult,
Middleware,
RootSelectionSetExecutor,
)
Expand All @@ -59,7 +53,6 @@
"AbortedGraphQLExecutionError",
"AsyncWorkFinishedInfo",
"CompletedResult",
"DeferredFragmentRecord",
"ExecutionHooks",
"ExecutionResult",
"Executor",
Expand All @@ -71,7 +64,6 @@
"FormattedInitialIncrementalExecutionResult",
"FormattedPendingResult",
"FormattedSubsequentIncrementalExecutionResult",
"GraphQLWrappedResult",
"IncrementalDeferResult",
"IncrementalResult",
"IncrementalStreamResult",
Expand All @@ -80,10 +72,6 @@
"MiddlewareManager",
"PendingResult",
"RootSelectionSetExecutor",
"StreamItemRecord",
"StreamItemResult",
"StreamItemsResult",
"StreamRecord",
"SubsequentIncrementalExecutionResult",
"VariableValues",
"create_source_event_stream",
Expand Down
13 changes: 1 addition & 12 deletions src/graphql/execution/collect_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
FragmentSpreadNode,
InlineFragmentNode,
OperationDefinitionNode,
OperationType,
SelectionSetNode,
)
from ..type import (
Expand Down Expand Up @@ -201,7 +200,7 @@ def collect_fields_impl(
schema,
fragments,
variable_values,
operation,
_operation,
runtime_type,
visited_fragment_names,
hide_suggestions,
Expand All @@ -226,7 +225,6 @@ def collect_fields_impl(
continue

new_defer_usage = get_defer_usage(
operation,
variable_values,
fragment_variable_values,
selection,
Expand Down Expand Up @@ -267,7 +265,6 @@ def collect_fields_impl(
continue

new_defer_usage = get_defer_usage(
operation,
variable_values,
fragment_variable_values,
selection,
Expand Down Expand Up @@ -315,7 +312,6 @@ def collect_fields_impl(


def get_defer_usage(
operation: OperationDefinitionNode,
variable_values: VariableValues,
fragment_variable_values: FragmentVariableValues | None,
node: FragmentSpreadNode | InlineFragmentNode,
Expand All @@ -334,13 +330,6 @@ def get_defer_usage(
if not defer or defer.get("if") is False:
return None

if operation.operation == OperationType.SUBSCRIPTION:
msg = (
"`@defer` directive not supported on subscription operations."
" Disable `@defer` by setting the `if` argument to `false`."
)
raise TypeError(msg)

return DeferUsage(defer.get("label"), parent_defer_usage)


Expand Down
Loading
Loading