id
int64
1
6.07M
name
stringlengths
1
295
code
stringlengths
12
426k
language
stringclasses
1 value
source_file
stringlengths
5
202
start_line
int64
1
158k
end_line
int64
1
158k
repo
dict
6,070,401
parse_int_literal
def parse_int_literal(value_node: ValueNode, _variables: Any = None) -> int: """Parse an integer value node in the AST.""" if not isinstance(value_node, IntValueNode): raise GraphQLError( "Int cannot represent non-integer value: " + print_ast(value_node), value_node, ) ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
88
102
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,402
serialize_float
def serialize_float(output_value: Any) -> float: if isinstance(output_value, bool): return 1 if output_value else 0 try: if not output_value and isinstance(output_value, str): output_value = "" raise ValueError num = output_value if isinstance(output_value, float)...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
116
130
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,403
coerce_float
def coerce_float(input_value: Any) -> float: if not ( isinstance(input_value, int) and not isinstance(input_value, bool) ) and not (isinstance(input_value, float) and isfinite(input_value)): raise GraphQLError( "Float cannot represent non numeric value: " + inspect(input_value) ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
133
140
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,404
parse_float_literal
def parse_float_literal(value_node: ValueNode, _variables: Any = None) -> float: """Parse a float value node in the AST.""" if not isinstance(value_node, (FloatValueNode, IntValueNode)): raise GraphQLError( "Float cannot represent non numeric value: " + print_ast(value_node), val...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
143
150
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,405
serialize_string
def serialize_string(output_value: Any) -> str: if isinstance(output_value, str): return output_value if isinstance(output_value, bool): return "true" if output_value else "false" if isinstance(output_value, int) or ( isinstance(output_value, float) and isfinite(output_value) ): ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
165
178
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,406
coerce_string
def coerce_string(input_value: Any) -> str: if not isinstance(input_value, str): raise GraphQLError( "String cannot represent a non string value: " + inspect(input_value) ) return input_value
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
181
186
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,407
parse_string_literal
def parse_string_literal(value_node: ValueNode, _variables: Any = None) -> str: """Parse a string value node in the AST.""" if not isinstance(value_node, StringValueNode): raise GraphQLError( "String cannot represent a non string value: " + print_ast(value_node), value_node, ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
189
196
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,408
serialize_boolean
def serialize_boolean(output_value: Any) -> bool: if isinstance(output_value, bool): return output_value if isinstance(output_value, int) or ( isinstance(output_value, float) and isfinite(output_value) ): return bool(output_value) raise GraphQLError( "Boolean cannot repre...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
211
220
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,409
coerce_boolean
def coerce_boolean(input_value: Any) -> bool: if not isinstance(input_value, bool): raise GraphQLError( "Boolean cannot represent a non boolean value: " + inspect(input_value) ) return input_value
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
223
228
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,410
parse_boolean_literal
def parse_boolean_literal(value_node: ValueNode, _variables: Any = None) -> bool: """Parse a boolean value node in the AST.""" if not isinstance(value_node, BooleanValueNode): raise GraphQLError( "Boolean cannot represent a non boolean value: " + print_ast(value_node), value_node...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
231
238
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,411
serialize_id
def serialize_id(output_value: Any) -> str: if isinstance(output_value, str): return output_value if isinstance(output_value, int) and not isinstance(output_value, bool): return str(output_value) if ( isinstance(output_value, float) and isfinite(output_value) and int(...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
250
265
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,412
coerce_id
def coerce_id(input_value: Any) -> str: if isinstance(input_value, str): return input_value if isinstance(input_value, int) and not isinstance(input_value, bool): return str(input_value) if ( isinstance(input_value, float) and isfinite(input_value) and int(input_value...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
268
279
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,413
parse_id_literal
def parse_id_literal(value_node: ValueNode, _variables: Any = None) -> str: """Parse an ID value node in the AST.""" if not isinstance(value_node, (StringValueNode, IntValueNode)): raise GraphQLError( "ID cannot represent a non-string and non-integer value: " + print_ast(value_no...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
282
290
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,414
is_specified_scalar_type
def is_specified_scalar_type(type_: GraphQLNamedType) -> bool: """Check whether the given named GraphQL type is a specified scalar type.""" return type_.name in specified_scalar_types
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/scalars.py
319
321
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,415
__init__
def __init__( self, query: Optional[GraphQLObjectType] = None, mutation: Optional[GraphQLObjectType] = None, subscription: Optional[GraphQLObjectType] = None, types: Optional[Collection[GraphQLNamedType]] = None, directives: Optional[Collection[GraphQLDirective]] = None, ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
131
291
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,416
to_kwargs
def to_kwargs(self) -> GraphQLSchemaKwargs: return GraphQLSchemaKwargs( query=self.query_type, mutation=self.mutation_type, subscription=self.subscription_type, types=tuple(self.type_map.values()) or None, directives=self.directives, descri...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
293
305
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,417
__copy__
def __copy__(self) -> "GraphQLSchema": # pragma: no cover return self.__class__(**self.to_kwargs())
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
307
308
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,418
__deepcopy__
def __deepcopy__(self, memo_: Dict) -> "GraphQLSchema": from ..type import ( is_introspection_type, is_specified_scalar_type, is_specified_directive, ) type_map: TypeMap = { name: copy(type_) for name, type_ in self.type_map.items() ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
310
342
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,419
get_root_type
def get_root_type(self, operation: OperationType) -> Optional[GraphQLObjectType]: return getattr(self, f"{operation.value}_type")
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
344
345
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,420
get_type
def get_type(self, name: str) -> Optional[GraphQLNamedType]: return self.type_map.get(name)
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
347
348
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,421
get_possible_types
def get_possible_types( self, abstract_type: GraphQLAbstractType ) -> List[GraphQLObjectType]: """Get list of all possible concrete types for given abstract type.""" return ( cast(GraphQLUnionType, abstract_type).types if is_union_type(abstract_type) else ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
350
360
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,422
get_implementations
def get_implementations( self, interface_type: GraphQLInterfaceType ) -> InterfaceImplementations: return self._implementations_map.get( interface_type.name, InterfaceImplementations(objects=[], interfaces=[]) )
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
362
367
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,423
is_sub_type
def is_sub_type( self, abstract_type: GraphQLAbstractType, maybe_sub_type: GraphQLNamedType, ) -> bool: """Check whether a type is a subtype of a given abstract type.""" types = self._sub_type_map.get(abstract_type.name) if types is None: types = set() ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
369
391
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,424
get_directive
def get_directive(self, name: str) -> Optional[GraphQLDirective]: for directive in self.directives: if directive.name == name: return directive return None
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
393
397
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,425
validation_errors
def validation_errors(self) -> Optional[List[GraphQLError]]: return self._validation_errors
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
400
401
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,426
with_initial_types
def with_initial_types(cls, types: Collection[GraphQLType]) -> "TypeSet": return cast(TypeSet, super().fromkeys(types))
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
408
409
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,427
collect_referenced_types
def collect_referenced_types(self, type_: GraphQLType) -> None: """Recursive function supplementing the type starting from an initial type.""" named_type = get_named_type(type_) if named_type in self: return self[named_type] = None collect_referenced_types = self.c...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
411
439
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,428
is_schema
def is_schema(schema: Any) -> bool: """Test if the given value is a GraphQL schema.""" return isinstance(schema, GraphQLSchema)
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
442
444
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,429
assert_schema
def assert_schema(schema: Any) -> GraphQLSchema: if not is_schema(schema): raise TypeError(f"Expected {inspect(schema)} to be a GraphQL schema.") return cast(GraphQLSchema, schema)
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
447
450
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,430
remapped_type
def remapped_type(type_: GraphQLType, type_map: TypeMap) -> GraphQLType: """Get a copy of the given type that uses this type map.""" if is_wrapping_type(type_): type_ = cast(GraphQLWrappingType, type_) return type_.__class__(remapped_type(type_.of_type, type_map)) type_ = cast(GraphQLNamedTy...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
453
459
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,431
remap_named_type
def remap_named_type(type_: GraphQLNamedType, type_map: TypeMap) -> None: """Change all references in the given named type to use this type map.""" if is_union_type(type_): type_ = cast(GraphQLUnionType, type_) type_.types = [ type_map.get(member_type.name, member_type) for member_ty...
python
python-3.10.8.amd64/Lib/site-packages/graphql/type/schema.py
462
491
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,432
subscribe
async def subscribe( schema: GraphQLSchema, document: DocumentNode, root_value: Any = None, context_value: Any = None, variable_values: Optional[Dict[str, Any]] = None, operation_name: Optional[str] = None, field_resolver: Optional[GraphQLFieldResolver] = None, subscribe_field_resolver: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/subscribe.py
29
92
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,433
map_source_to_response
async def map_source_to_response(payload: Any) -> ExecutionResult: """Map source to response. For each payload yielded from a subscription, map it over the normal GraphQL :func:`~graphql.execute` function, with ``payload`` as the ``root_value``. This implements the "MapSourceToResponseE...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/subscribe.py
70
89
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,434
create_source_event_stream
async def create_source_event_stream( schema: GraphQLSchema, document: DocumentNode, root_value: Any = None, context_value: Any = None, variable_values: Optional[Dict[str, Any]] = None, operation_name: Optional[str] = None, subscribe_field_resolver: Optional[GraphQLFieldResolver] = None, ) -...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/subscribe.py
95
160
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,435
execute_subscription
async def execute_subscription(context: ExecutionContext) -> AsyncIterable[Any]: schema = context.schema root_type = schema.subscription_type if root_type is None: raise GraphQLError( "Schema is not configured to execute subscription operation.", context.operation, )...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/subscribe.py
163
212
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,436
get_variable_values
def get_variable_values( schema: GraphQLSchema, var_def_nodes: Collection[VariableDefinitionNode], inputs: Dict[str, Any], max_errors: Optional[int] = None, ) -> CoercedVariableValues: """Get coerced variable values based on provided definitions. Prepares a dict of variable values of the correc...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/values.py
39
68
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,437
on_error
def on_error(error: GraphQLError) -> None: if max_errors is not None and len(errors) >= max_errors: raise GraphQLError( "Too many errors processing variables," " error limit reached. Execution aborted." ) errors.append(error)
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/values.py
53
59
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,438
coerce_variable_values
def coerce_variable_values( schema: GraphQLSchema, var_def_nodes: Collection[VariableDefinitionNode], inputs: Dict[str, Any], on_error: Callable[[GraphQLError], None], ) -> Dict[str, Any]: coerced_values: Dict[str, Any] = {} for var_def_node in var_def_nodes: var_name = var_def_node.vari...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/values.py
71
142
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,439
on_input_value_error
def on_input_value_error( path: List[Union[str, int]], invalid_value: Any, error: GraphQLError ) -> None: invalid_str = inspect(invalid_value) prefix = f"Variable '${var_name}' got invalid value {invalid_str}" if path: prefix += f" at '{var_name}{p...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/values.py
123
136
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,440
get_argument_values
def get_argument_values( type_def: Union[GraphQLField, GraphQLDirective], node: Union[FieldNode, DirectiveNode], variable_values: Optional[Dict[str, Any]] = None, ) -> Dict[str, Any]: """Get coerced argument values based on provided definitions and nodes. Prepares a dict of argument values given a ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/values.py
145
208
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,441
get_directive_values
def get_directive_values( directive_def: GraphQLDirective, node: NodeWithDirective, variable_values: Optional[Dict[str, Any]] = None, ) -> Optional[Dict[str, Any]]: """Get coerced argument values based on provided nodes. Prepares a dict of argument values given a directive definition and an AST nod...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/values.py
223
241
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,442
__init__
def __init__( self, data: Optional[Dict[str, Any]] = None, errors: Optional[List[GraphQLError]] = None, extensions: Optional[Dict[str, Any]] = None, ): self.data = data self.errors = errors self.extensions = extensions
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
121
129
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,443
__repr__
def __repr__(self) -> str: name = self.__class__.__name__ ext = "" if self.extensions is None else f", extensions={self.extensions}" return f"{name}(data={self.data!r}, errors={self.errors!r}{ext})"
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
131
134
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,444
__iter__
def __iter__(self) -> Iterable[Any]: return iter((self.data, self.errors))
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
136
137
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,445
formatted
def formatted(self) -> FormattedExecutionResult: """Get execution result formatted according to the specification.""" formatted: FormattedExecutionResult = {"data": self.data} if self.errors is not None: formatted["errors"] = [error.formatted for error in self.errors] if self...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
140
147
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,446
__eq__
def __eq__(self, other: Any) -> bool: if isinstance(other, dict): if "extensions" not in other: return other == dict(data=self.data, errors=self.errors) return other == dict( data=self.data, errors=self.errors, extensions=self.extensions ) ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
149
165
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,447
__ne__
def __ne__(self, other: Any) -> bool: return not self == other
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
167
168
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,448
__init__
def __init__( self, schema: GraphQLSchema, fragments: Dict[str, FragmentDefinitionNode], root_value: Any, context_value: Any, operation: OperationDefinitionNode, variable_values: Dict[str, Any], field_resolver: GraphQLFieldResolver, type_resolver: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
195
223
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,449
build
def build( cls, schema: GraphQLSchema, document: DocumentNode, root_value: Any = None, context_value: Any = None, raw_variable_values: Optional[Dict[str, Any]] = None, operation_name: Optional[str] = None, field_resolver: Optional[GraphQLFieldResolver] = N...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
226
308
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,450
build_response
def build_response( data: Optional[Dict[str, Any]], errors: List[GraphQLError] ) -> ExecutionResult: """Build response. Given a completed execution context and data, build the (data, errors) response defined by the "Response" section of the GraphQL spec. """ if not e...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
311
326
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,451
execute_operation
def execute_operation( self, operation: OperationDefinitionNode, root_value: Any ) -> Optional[AwaitableOrValue[Any]]: """Execute an operation. Implements the "Executing operations" section of the spec. """ root_type = self.schema.get_root_type(operation.operation) i...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
328
357
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,452
execute_fields_serially
def execute_fields_serially( self, parent_type: GraphQLObjectType, source_value: Any, path: Optional[Path], fields: Dict[str, List[FieldNode]], ) -> AwaitableOrValue[Dict[str, Any]]: """Execute the given fields serially. Implements the "Executing selection se...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
359
411
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,453
await_and_set_result
async def await_and_set_result( results: Awaitable[Dict[str, Any]], response_name: str, result: AwaitableOrValue[Any], ) -> Dict[str, Any]: awaited_results = await results awaited_results[response_name] =...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
382
391
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,454
set_result
async def set_result( results: Dict[str, Any], response_name: str, result: Awaitable, ) -> Dict[str, Any]: results[response_name] = await result return results
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
398
404
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,455
execute_fields
def execute_fields( self, parent_type: GraphQLObjectType, source_value: Any, path: Optional[Path], fields: Dict[str, List[FieldNode]], ) -> AwaitableOrValue[Dict[str, Any]]: """Execute the given fields concurrently. Implements the "Executing selection sets" s...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
413
456
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,456
get_results
async def get_results() -> Dict[str, Any]: results.update( zip( awaitable_fields, await gather(*(results[field] for field in awaitable_fields)), ) ) return results
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
447
454
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,457
build_resolve_info
def build_resolve_info( self, field_def: GraphQLField, field_nodes: List[FieldNode], parent_type: GraphQLObjectType, path: Path, ) -> GraphQLResolveInfo: """Build the GraphQLResolveInfo object. For internal use only.""" # The resolve function's first ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
458
483
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,458
execute_field
def execute_field( self, parent_type: GraphQLObjectType, source: Any, field_nodes: List[FieldNode], path: Path, ) -> AwaitableOrValue[Any]: """Resolve the field on the given source object. Implements the "Executing fields" section of the spec. In par...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
485
559
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,459
await_result
async def await_result() -> Any: try: completed = self.complete_value( return_type, field_nodes, info, path, await result ) if self.is_awaitable(completed): return await co...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
525
536
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,460
await_completed
async def await_completed() -> Any: try: return await completed except Exception as raw_error: error = located_error(raw_error, field_nodes, path.as_list()) self.handle_field_error(error, return_type) ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
545
551
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,461
handle_field_error
def handle_field_error( self, error: GraphQLError, return_type: GraphQLOutputType, ) -> None: # If the field type is non-nullable, then it is resolved without any protection # from errors, however it still properly locates the error. if is_non_null_type(return_type): ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
561
573
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,462
complete_value
def complete_value( self, return_type: GraphQLOutputType, field_nodes: List[FieldNode], info: GraphQLResolveInfo, path: Path, result: Any, ) -> AwaitableOrValue[Any]: """Complete a value. Implements the instructions for completeValue as defined in the...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
575
658
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,463
complete_list_value
def complete_list_value( self, return_type: GraphQLList[GraphQLOutputType], field_nodes: List[FieldNode], info: GraphQLResolveInfo, path: Path, result: Union[AsyncIterable[Any], Iterable[Any]], ) -> AwaitableOrValue[List[Any]]: """Complete a list value. ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
660
765
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,464
async_iterable_to_list
async def async_iterable_to_list( async_result: AsyncIterable[Any], ) -> Any: sync_result = [item async for item in async_result] return self.complete_list_value( return_type, field_nodes, info, path, sync_result ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
676
682
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,465
await_completed
async def await_completed(item: Any, item_path: Path) -> Any: try: completed = self.complete_value( item_type, field_nodes, info, item_path, await item ) if is_awaitable(completed): ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
708
721
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,466
await_completed
async def await_completed(item: Any, item_path: Path) -> Any: try: return await item except Exception as raw_error: error = located_error( raw_error, field_nodes, i...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
731
739
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,467
get_completed_results
async def get_completed_results() -> List[Any]: for index, result in zip( awaitable_indices, await gather( *(completed_results[index] for index in awaitable_indices) ), ): completed_results[index] = result ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
755
763
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,468
complete_leaf_value
def complete_leaf_value(return_type: GraphQLLeafType, result: Any) -> Any: """Complete a leaf value. Complete a Scalar or Enum by serializing to a valid value, returning null if serialization is not possible. """ serialized_result = return_type.serialize(result) if seria...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
768
780
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,469
complete_abstract_value
def complete_abstract_value( self, return_type: GraphQLAbstractType, field_nodes: List[FieldNode], info: GraphQLResolveInfo, path: Path, result: Any, ) -> AwaitableOrValue[Any]: """Complete an abstract value. Complete a value of an abstract type by de...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
782
830
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,470
await_complete_object_value
async def await_complete_object_value() -> Any: value = self.complete_object_value( self.ensure_valid_runtime_type( await runtime_type, # type: ignore return_type, field_nodes, info, ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
801
817
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,471
ensure_valid_runtime_type
def ensure_valid_runtime_type( self, runtime_type_name: Any, return_type: GraphQLAbstractType, field_nodes: List[FieldNode], info: GraphQLResolveInfo, result: Any, ) -> GraphQLObjectType: if runtime_type_name is None: raise GraphQLError( ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
832
891
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,472
complete_object_value
def complete_object_value( self, return_type: GraphQLObjectType, field_nodes: List[FieldNode], info: GraphQLResolveInfo, path: Path, result: Any, ) -> AwaitableOrValue[Dict[str, Any]]: """Complete an Object value by executing all sub-selections.""" # C...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
893
927
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,473
execute_subfields_async
async def execute_subfields_async() -> Dict[str, Any]: if not await is_type_of: # type: ignore raise invalid_return_type_error( return_type, result, field_nodes ) return self.execute_fields( ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
913
920
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,474
collect_subfields
def collect_subfields( self, return_type: GraphQLObjectType, field_nodes: List[FieldNode] ) -> Dict[str, List[FieldNode]]: """Collect subfields. A cached collection of relevant subfields with regard to the return type is kept in the execution context as ``_subfields_cache``. This en...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
929
962
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,475
execute
def execute( schema: GraphQLSchema, document: DocumentNode, root_value: Any = None, context_value: Any = None, variable_values: Optional[Dict[str, Any]] = None, operation_name: Optional[str] = None, field_resolver: Optional[GraphQLFieldResolver] = None, type_resolver: Optional[GraphQLTyp...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
965
1,046
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,476
await_result
async def await_result() -> Any: try: return build_response(await result, errors) # type: ignore except GraphQLError as error: errors.append(error) return build_response(None, errors)
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,034
1,039
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,477
assume_not_awaitable
def assume_not_awaitable(_value: Any) -> bool: """Replacement for isawaitable if everything is assumed to be synchronous.""" return False
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,049
1,051
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,478
execute_sync
def execute_sync( schema: GraphQLSchema, document: DocumentNode, root_value: Any = None, context_value: Any = None, variable_values: Optional[Dict[str, Any]] = None, operation_name: Optional[str] = None, field_resolver: Optional[GraphQLFieldResolver] = None, type_resolver: Optional[Graph...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,054
1,102
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,479
assert_valid_execution_arguments
def assert_valid_execution_arguments( schema: GraphQLSchema, document: DocumentNode, raw_variable_values: Optional[Dict[str, Any]] = None, ) -> None: """Check that the arguments are acceptable. Essential assertions before executing to provide developer feedback for improper use of the GraphQL l...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,105
1,129
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,480
get_field_def
def get_field_def( schema: GraphQLSchema, parent_type: GraphQLObjectType, field_node: FieldNode ) -> GraphQLField: """Get field definition. This method looks up the field on the given type definition. It has special casing for the three introspection fields, ``__schema``, ``__type`, and ``__typename``....
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,132
1,154
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,481
invalid_return_type_error
def invalid_return_type_error( return_type: GraphQLObjectType, result: Any, field_nodes: List[FieldNode] ) -> GraphQLError: """Create a GraphQLError for an invalid return type.""" return GraphQLError( f"Expected value of type '{return_type.name}' but got: {inspect(result)}.", field_nodes, ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,157
1,164
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,482
get_typename
def get_typename(value: Any) -> Optional[str]: """Get the ``__typename`` property of the given value.""" if isinstance(value, Mapping): return value.get("__typename") # need to de-mangle the attribute assumed to be "private" in Python for cls in value.__class__.__mro__: __typename = geta...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,167
1,176
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,483
default_type_resolver
def default_type_resolver( value: Any, info: GraphQLResolveInfo, abstract_type: GraphQLAbstractType ) -> AwaitableOrValue[Optional[str]]: """Default type resolver function. If a resolve_type function is not given, then a default resolve behavior is used which attempts two strategies: First, See if...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,179
1,228
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,484
get_type
async def get_type() -> Optional[str]: is_type_of_results = await gather(*awaitable_is_type_of_results) for is_type_of_result, type_ in zip(is_type_of_results, awaitable_types): if is_type_of_result: return type_.name return None
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,219
1,224
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,485
default_field_resolver
def default_field_resolver(source: Any, info: GraphQLResolveInfo, **args: Any) -> Any: """Default field resolver. If a resolve function is not given, then a default resolve behavior is used which takes the property of the source object of the same name as the field and returns it as the result, or if i...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/execute.py
1,231
1,251
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,486
__init__
def __init__(self, iterable: AsyncIterable, callback: Callable) -> None: self.iterator = iterable.__aiter__() self.callback = callback self._close_event = Event()
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/map_async_iterator.py
21
24
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,487
__aiter__
def __aiter__(self) -> "MapAsyncIterator": """Get the iterator object.""" return self
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/map_async_iterator.py
26
28
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,488
__anext__
async def __anext__(self) -> Any: """Get the next value of the iterator.""" if self.is_closed: if not isasyncgen(self.iterator): raise StopAsyncIteration value = await self.iterator.__anext__() else: aclose = ensure_future(self._close_event.wai...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/map_async_iterator.py
30
65
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,489
athrow
async def athrow( self, type_: Union[BaseException, Type[BaseException]], value: Optional[BaseException] = None, traceback: Optional[TracebackType] = None, ) -> None: """Throw an exception into the asynchronous iterator.""" if self.is_closed: return ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/map_async_iterator.py
67
91
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,490
aclose
async def aclose(self) -> None: """Close the iterator.""" if not self.is_closed: aclose = getattr(self.iterator, "aclose", None) if aclose: try: await aclose() except RuntimeError: pass self.is_cl...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/map_async_iterator.py
93
102
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,491
is_closed
def is_closed(self) -> bool: """Check whether the iterator is closed.""" return self._close_event.is_set()
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/map_async_iterator.py
105
107
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,492
is_closed
def is_closed(self, value: bool) -> None: """Mark the iterator as closed.""" if value: self._close_event.set() else: self._close_event.clear()
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/map_async_iterator.py
110
115
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,493
__init__
def __init__(self, *middlewares: Any): self.middlewares = middlewares self._middleware_resolvers = ( list(get_middleware_resolvers(middlewares)) if middlewares else None ) self._cached_resolvers = {}
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/middleware.py
29
34
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,494
get_field_resolver
def get_field_resolver( self, field_resolver: GraphQLFieldResolver ) -> GraphQLFieldResolver: """Wrap the provided resolver with the middleware. Returns a function that chains the middleware functions with the provided resolver function. """ if self._middleware_resol...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/middleware.py
36
52
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,495
get_middleware_resolvers
def get_middleware_resolvers(middlewares: Tuple[Any, ...]) -> Iterator[Callable]: """Get a list of resolver functions from a list of classes or functions.""" for middleware in middlewares: if isfunction(middleware): yield middleware else: # middleware provided as object with 'resolv...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/middleware.py
55
63
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,496
collect_fields
def collect_fields( schema: GraphQLSchema, fragments: Dict[str, FragmentDefinitionNode], variable_values: Dict[str, Any], runtime_type: GraphQLObjectType, selection_set: SelectionSetNode, ) -> Dict[str, List[FieldNode]]: """Collect fields. Given a selection_set, collects all the fields and ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/collect_fields.py
24
45
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,497
collect_sub_fields
def collect_sub_fields( schema: GraphQLSchema, fragments: Dict[str, FragmentDefinitionNode], variable_values: Dict[str, Any], return_type: GraphQLObjectType, field_nodes: List[FieldNode], ) -> Dict[str, List[FieldNode]]: """Collect sub fields. Given a list of field nodes, collects all the s...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/collect_fields.py
48
79
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,498
collect_fields_impl
def collect_fields_impl( schema: GraphQLSchema, fragments: Dict[str, FragmentDefinitionNode], variable_values: Dict[str, Any], runtime_type: GraphQLObjectType, selection_set: SelectionSetNode, fields: Dict[str, List[FieldNode]], visited_fragment_names: Set[str], ) -> None: """Collect fie...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/collect_fields.py
82
132
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,499
should_include_node
def should_include_node( variable_values: Dict[str, Any], node: Union[FragmentSpreadNode, FieldNode, InlineFragmentNode], ) -> bool: """Check if node should be included Determines if a field should be included based on the @include and @skip directives, where @skip has higher precedence than @inclu...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/collect_fields.py
135
152
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,500
does_fragment_condition_match
def does_fragment_condition_match( schema: GraphQLSchema, fragment: Union[FragmentDefinitionNode, InlineFragmentNode], type_: GraphQLObjectType, ) -> bool: """Determine if a fragment is applicable to the given type.""" type_condition_node = fragment.type_condition if not type_condition_node: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/collect_fields.py
155
169
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }