sdkagent

graphql-core API reference

361 public APIs from graphql-core (graphql-python/graphql-core) — 103 classes, 152 functions, 106 methods. Signatures extracted by static analysis of the actual source.

Repository: graphql-python/graphql-core

KindCount
Classes103
Functions152
Methods106

API list

classsrc.graphql.error.graphql_error.GraphQLFormattedError
Formatted GraphQL error
classsrc.graphql.error.syntax_error.GraphQLSyntaxError
A GraphQLError representing a syntax error.
funcsrc.graphql.execution.aborted_graphql_execution_error.get_abort_reason_message(reason:Any) -> str
Get the error message for the given abort reason.
classsrc.graphql.execution.collect_fields.CollectFieldsContext
Context for collecting fields.
classsrc.graphql.execution.collect_fields.CollectedFields
Collected fields with new defer usages.
classsrc.graphql.execution.collect_fields.DeferUsage
An optionally labelled linked list of defer usages.
funcsrc.graphql.execution.execute.execute_root_selection_set(executor:Executor) -> AwaitableOrValue[ExecutionResult]
Execute the root selection set.
funcsrc.graphql.execution.execute.execute_subscription_event(executor:Executor) -> AwaitableOrValue[ExecutionResult]
Execute a single subscription event.
classsrc.graphql.execution.executor.Executor
Executor for a validated GraphQL operation.
methodsrc.graphql.execution.executor.Executor.collect_subfields(return_type:GraphQLObjectType, field_details_list:FieldDetailsList) -> CollectedFields
Collect subfields.
methodsrc.graphql.execution.executor.Executor.complete_leaf_value(return_type:GraphQLLeafType, result:Any) -> Any
Complete a leaf value.
methodsrc.graphql.execution.executor.Executor.complete_value(return_type:GraphQLOutputType, field_details_list:FieldDetailsList, info:GraphQLResolveInfo, path:Path, result:Any, position_context:TContext | None) -> AwaitableOrValue[Any]
Complete a value.
methodsrc.graphql.execution.executor.Executor.execute_operation(serially:bool | None=None) -> AwaitableOrValue[ExecutionResult | ExperimentalIncrementalExecutionResults]
Execute an operation.
methodsrc.graphql.execution.executor.Executor.get_stream_usage(field_details_list:FieldDetailsList, path:Path) -> StreamUsage | None
Get stream usage.
classsrc.graphql.execution.executor.StreamUsage
Stream directive usage information
funcsrc.graphql.execution.executor.default_field_resolver(source:Any, info:GraphQLResolveInfo, **args:Any) -> Any
Default field resolver.
funcsrc.graphql.execution.executor.default_type_resolver(value:Any, info:GraphQLResolveInfo, abstract_type:GraphQLAbstractType) -> AwaitableOrValue[str | None]
Default type resolver function.
funcsrc.graphql.execution.executor.get_typename(value:Any) -> str | None
Get the ``__typename`` property of the given value.
funcsrc.graphql.execution.executor.to_nodes(field_details_list:FieldDetailsList) -> list[FieldNode]
Convert a field group to a list of field nodes.
classsrc.graphql.execution.incremental.build_execution_plan.ExecutionPlan
A plan for executing fields.
funcsrc.graphql.execution.incremental.build_execution_plan.get_filtered_defer_usage_set(field_details_list:FieldDetailsList) -> RefSet[DeferUsage]
Get a filtered set of defer usages.
classsrc.graphql.execution.incremental.computation.Computation
A lazily primed, memoized, abortable computation.
methodsrc.graphql.execution.incremental.computation.Computation.abort(reason:BaseException | None=None) -> AwaitableOrValue[None]
Abort the computation with an optional reason.
classsrc.graphql.execution.incremental.incremental_publisher.IncrementalPublisher
Publish incremental results.
classsrc.graphql.execution.incremental.incremental_publisher.IncrementalPublisherContext
The context for incremental publishing.
classsrc.graphql.execution.incremental.work_queue.Group
A group of work with an optional parent group.
classsrc.graphql.execution.incremental.work_queue.GroupFailureEvent
A group failed with an error.
classsrc.graphql.execution.incremental.work_queue.GroupValuesEvent
All values produced for a completed group.
classsrc.graphql.execution.incremental.work_queue.Stream
A stream of work items backed by a queue.
classsrc.graphql.execution.incremental.work_queue.StreamFailureEvent
A stream failed with an error.
classsrc.graphql.execution.incremental.work_queue.StreamQueue
The queue interface a stream must provide.
methodsrc.graphql.execution.incremental.work_queue.StreamQueue.abort(reason:BaseException | None=None) -> Awaitable[None] | None
Abort the stream with an optional reason.
classsrc.graphql.execution.incremental.work_queue.StreamSuccessEvent
A stream completed successfully.
classsrc.graphql.execution.incremental.work_queue.Work
New work produced during execution.
methodsrc.graphql.execution.incremental.work_queue.WorkQueue.cancel(reason:BaseException | None=None) -> None
Cancel all pending work, awaiting any asynchronous cleanup.
classsrc.graphql.execution.incremental.work_queue.WorkTask
A computation belonging to one or more groups.
classsrc.graphql.execution.middleware.MiddlewareManager
Manager for the middleware chain.
classsrc.graphql.execution.types.CompletedResult
Completed execution result
classsrc.graphql.execution.types.ExecutionResult
The result of GraphQL execution.
classsrc.graphql.execution.types.FormattedCompletedResult
Formatted completed execution result
classsrc.graphql.execution.types.FormattedExecutionResult
Formatted execution result
classsrc.graphql.execution.types.FormattedIncrementalDeferResult
Formatted incremental deferred execution result
classsrc.graphql.execution.types.FormattedIncrementalStreamResult
Formatted incremental stream execution result
classsrc.graphql.execution.types.FormattedPendingResult
Formatted pending execution result
classsrc.graphql.execution.types.IncrementalDeferResult
Incremental deferred execution result
classsrc.graphql.execution.types.IncrementalStreamResult
Incremental streamed execution result
classsrc.graphql.execution.types.InitialIncrementalExecutionResult
Initial incremental execution result.
classsrc.graphql.execution.types.PendingResult
Pending execution result
classsrc.graphql.execution.types.SubsequentIncrementalExecutionResult
Subsequent incremental execution result.
classsrc.graphql.language.ast.DefinitionNode
Base class for all definition nodes.
classsrc.graphql.language.ast.ExecutableDefinitionNode
Base class for executable definition nodes.
classsrc.graphql.language.ast.Node
AST nodes
methodsrc.graphql.language.ast.Node.to_dict(locations:bool=False) -> dict
Convert node to a dictionary.
classsrc.graphql.language.ast.NullValueNode
A null value node has no fields.
classsrc.graphql.language.ast.SelectionNode
Base class for selection nodes.
classsrc.graphql.language.ast.TypeDefinitionNode
Base class for type definition nodes.
classsrc.graphql.language.ast.TypeExtensionNode
Base class for type extension nodes.
classsrc.graphql.language.ast.TypeNode
Base class for type nodes.
classsrc.graphql.language.ast.TypeSystemDefinitionNode
Base class for type system definition nodes.
classsrc.graphql.language.ast.ValueNode
Base class for value nodes.
funcsrc.graphql.language.ast.node_class(cls:type[T_Instance]) -> type[T_Instance]
Decorator to define a GraphQL AST Node class.
funcsrc.graphql.language.block_string.is_printable_as_block_string(value:str) -> bool
Check whether the given string is printable as a block string.
funcsrc.graphql.language.block_string.print_block_string(value:str, minimize:bool=False) -> str
Print a block string in the indented block form.
funcsrc.graphql.language.character_classes.is_digit(char:str) -> bool
Check whether char is a digit For internal use by the lexer only.
classsrc.graphql.language.lexer.EscapeSequence
The string value and lexed size of an escape sequence.
methodsrc.graphql.language.lexer.Lexer.advance() -> Token
Advance the token stream to the next non-ignored token.
methodsrc.graphql.language.lexer.Lexer.create_token(kind:TokenKind, start:int, end:int, value:str | None=None) -> Token
Create a token with line and column location information.
methodsrc.graphql.language.lexer.Lexer.lookahead() -> Token
Look ahead and return the next non-ignored token.
methodsrc.graphql.language.lexer.Lexer.print_code_point_at(location:int) -> str
Print the code point at the given location.
methodsrc.graphql.language.lexer.Lexer.read_block_string(start:int) -> Token
Read a block string token from the source file.
methodsrc.graphql.language.lexer.Lexer.read_comment(start:int) -> Token
Read a comment token from the source file.
methodsrc.graphql.language.lexer.Lexer.read_escaped_character(position:int) -> EscapeSequence
Read escaped character sequence
methodsrc.graphql.language.lexer.Lexer.read_escaped_unicode_fixed_width(position:int) -> EscapeSequence
Read escaped unicode with fixed width
methodsrc.graphql.language.lexer.Lexer.read_escaped_unicode_variable_width(position:int) -> EscapeSequence
Read escaped unicode with variable width
methodsrc.graphql.language.lexer.Lexer.read_name(start:int) -> Token
Read an alphanumeric + underscore name from the source.
methodsrc.graphql.language.lexer.Lexer.read_next_token(start:int) -> Token
Get the next token from the source starting at the given position.
methodsrc.graphql.language.lexer.Lexer.read_number(start:int, first_char:str) -> Token
Reads a number token from the source file.
methodsrc.graphql.language.lexer.Lexer.read_string(start:int) -> Token
Read a single-quote string token from the source file.
funcsrc.graphql.language.lexer.is_punctuator_token_kind(kind:TokenKind) -> bool
Check whether the given token kind corresponds to a punctuator.
funcsrc.graphql.language.lexer.is_supplementary_code_point(body:str, location:int) -> bool
Check whether the current location is a supplementary code point.
funcsrc.graphql.language.lexer.is_unicode_scalar_value(char:str) -> bool
Check whether this is a Unicode scalar value.
classsrc.graphql.language.location.FormattedSourceLocation
Formatted source location
classsrc.graphql.language.location.SourceLocation
Represents a location in a Source.
methodsrc.graphql.language.location.SourceLocation.formatted() -> FormattedSourceLocation
Get formatted source location.
classsrc.graphql.language.parser.Parser
GraphQL AST parser.
methodsrc.graphql.language.parser.Parser.advance_lexer() -> None
Advance the lexer.
methodsrc.graphql.language.parser.Parser.any(open_kind:TokenKind, parse_fn:Callable[[], T], close_kind:TokenKind) -> tuple[T, ...]
Fetch any matching nodes, possibly none.
methodsrc.graphql.language.parser.Parser.delimited_many(delimiter_kind:TokenKind, parse_fn:Callable[[], T]) -> tuple[T, ...]
Fetch many delimited nodes.
methodsrc.graphql.language.parser.Parser.expect_keyword(value:str) -> None
Expect the next token to be a given keyword.
methodsrc.graphql.language.parser.Parser.expect_optional_keyword(value:str) -> bool
Expect the next token optionally to be a given keyword.
methodsrc.graphql.language.parser.Parser.expect_optional_token(kind:TokenKind) -> bool
Expect the next token optionally to be of the given kind.
methodsrc.graphql.language.parser.Parser.expect_token(kind:TokenKind) -> Token
Expect the next token to be of the given kind.
methodsrc.graphql.language.parser.Parser.loc(start_token:Token) -> Location | None
Return a location object.
methodsrc.graphql.language.parser.Parser.many(open_kind:TokenKind, parse_fn:Callable[[], T], close_kind:TokenKind) -> tuple[T, ...]
Fetch matching nodes, at least one.
methodsrc.graphql.language.parser.Parser.optional_many(open_kind:TokenKind, parse_fn:Callable[[], T], close_kind:TokenKind) -> tuple[T, ...] | None
Fetch matching nodes, maybe none.
methodsrc.graphql.language.parser.Parser.parse_argument(is_const:bool=False) -> ArgumentNode
Argument[Const]: Name : Value[?Const]
methodsrc.graphql.language.parser.Parser.parse_arguments(is_const:bool) -> tuple[ArgumentNode, ...] | None
Arguments[Const]: (Argument[?Const]+)
methodsrc.graphql.language.parser.Parser.parse_const_argument() -> ConstArgumentNode
Argument[Const]: Name : Value[Const]
methodsrc.graphql.language.parser.Parser.parse_description() -> StringValueNode | None
Description: StringValue
methodsrc.graphql.language.parser.Parser.parse_directive(is_const:bool) -> DirectiveNode
Directive[Const]: @ Name Arguments[?Const]?
methodsrc.graphql.language.parser.Parser.parse_directive_definition() -> DirectiveDefinitionNode
DirectiveDefinition
methodsrc.graphql.language.parser.Parser.parse_directive_definition_extension() -> DirectiveExtensionNode
DirectiveDefinitionExtension
methodsrc.graphql.language.parser.Parser.parse_directive_location() -> NameNode
DirectiveLocation
methodsrc.graphql.language.parser.Parser.parse_directive_locations() -> tuple[NameNode, ...]
DirectiveLocations
methodsrc.graphql.language.parser.Parser.parse_directives(is_const:bool) -> tuple[DirectiveNode, ...] | None
Directives[Const]: Directive[?Const]+
methodsrc.graphql.language.parser.Parser.parse_document() -> DocumentNode
Document: Definition+
methodsrc.graphql.language.parser.Parser.parse_enum_type_definition() -> EnumTypeDefinitionNode
UnionTypeDefinition
methodsrc.graphql.language.parser.Parser.parse_enum_type_extension() -> EnumTypeExtensionNode
EnumTypeExtension
methodsrc.graphql.language.parser.Parser.parse_enum_value_definition() -> EnumValueDefinitionNode
EnumValueDefinition: Description?
methodsrc.graphql.language.parser.Parser.parse_field() -> FieldNode
Field: Alias?
methodsrc.graphql.language.parser.Parser.parse_field_definition() -> FieldDefinitionNode
FieldDefinition
methodsrc.graphql.language.parser.Parser.parse_fields_definition() -> tuple[FieldDefinitionNode, ...] | None
FieldsDefinition: {FieldDefinition+}
methodsrc.graphql.language.parser.Parser.parse_fragment_definition() -> FragmentDefinitionNode
FragmentDefinition
methodsrc.graphql.language.parser.Parser.parse_fragment_name() -> NameNode
FragmentName: Name but not ``on``
methodsrc.graphql.language.parser.Parser.parse_implements_interfaces() -> tuple[NamedTypeNode, ...] | None
ImplementsInterfaces
methodsrc.graphql.language.parser.Parser.parse_input_object_type_definition() -> InputObjectTypeDefinitionNode
InputObjectTypeDefinition
methodsrc.graphql.language.parser.Parser.parse_input_object_type_extension() -> InputObjectTypeExtensionNode
InputObjectTypeExtension
methodsrc.graphql.language.parser.Parser.parse_input_value_def() -> InputValueDefinitionNode
InputValueDefinition
methodsrc.graphql.language.parser.Parser.parse_interface_type_definition() -> InterfaceTypeDefinitionNode
InterfaceTypeDefinition
methodsrc.graphql.language.parser.Parser.parse_interface_type_extension() -> InterfaceTypeExtensionNode
InterfaceTypeExtension
methodsrc.graphql.language.parser.Parser.parse_list(is_const:bool) -> ListValueNode
ListValue[Const]
methodsrc.graphql.language.parser.Parser.parse_name() -> NameNode
Convert a name lex token into a name parse node.
methodsrc.graphql.language.parser.Parser.parse_named_type() -> NamedTypeNode
NamedType: Name
methodsrc.graphql.language.parser.Parser.parse_object(is_const:bool) -> ObjectValueNode
ObjectValue[Const]
methodsrc.graphql.language.parser.Parser.parse_object_type_definition() -> ObjectTypeDefinitionNode
ObjectTypeDefinition
methodsrc.graphql.language.parser.Parser.parse_object_type_extension() -> ObjectTypeExtensionNode
ObjectTypeExtension
methodsrc.graphql.language.parser.Parser.parse_operation_definition() -> OperationDefinitionNode
OperationDefinition
methodsrc.graphql.language.parser.Parser.parse_scalar_type_definition() -> ScalarTypeDefinitionNode
ScalarTypeDefinition: Description?
methodsrc.graphql.language.parser.Parser.parse_scalar_type_extension() -> ScalarTypeExtensionNode
ScalarTypeExtension
methodsrc.graphql.language.parser.Parser.parse_schema_coordinate() -> SchemaCoordinateNode
SchemaCoordinate - Name - Name .
methodsrc.graphql.language.parser.Parser.parse_schema_definition() -> SchemaDefinitionNode
SchemaDefinition
methodsrc.graphql.language.parser.Parser.parse_schema_extension() -> SchemaExtensionNode
SchemaExtension
methodsrc.graphql.language.parser.Parser.parse_selection_set() -> SelectionSetNode
SelectionSet: {Selection+}
methodsrc.graphql.language.parser.Parser.parse_type_condition() -> NamedTypeNode
TypeCondition: NamedType
methodsrc.graphql.language.parser.Parser.parse_type_reference() -> TypeNode
Type: NamedType or ListType or NonNullType
methodsrc.graphql.language.parser.Parser.parse_type_system_extension() -> TypeSystemExtensionNode
TypeSystemExtension
methodsrc.graphql.language.parser.Parser.parse_union_member_types() -> tuple[NamedTypeNode, ...] | None
UnionMemberTypes
methodsrc.graphql.language.parser.Parser.parse_union_type_definition() -> UnionTypeDefinitionNode
UnionTypeDefinition
methodsrc.graphql.language.parser.Parser.parse_union_type_extension() -> UnionTypeExtensionNode
UnionTypeExtension
methodsrc.graphql.language.parser.Parser.parse_variable() -> VariableNode
Variable: $Name
methodsrc.graphql.language.parser.Parser.peek(kind:TokenKind) -> bool
Determine if the next token is of a given kind
methodsrc.graphql.language.parser.Parser.unexpected(at_token:Token | None=None) -> GraphQLError
Create an error when an unexpected lexed token is encountered.
funcsrc.graphql.language.parser.get_token_desc(token:Token) -> str
Describe a token as a string for debugging.
funcsrc.graphql.language.parser.get_token_kind_desc(kind:TokenKind) -> str
Describe a token kind as a string for debugging.
funcsrc.graphql.language.predicates.is_definition_node(node:Node) -> TypeGuard[DefinitionNode]
Check whether the given node represents a definition.
funcsrc.graphql.language.predicates.is_selection_node(node:Node) -> TypeGuard[SelectionNode]
Check whether the given node represents a selection.
funcsrc.graphql.language.predicates.is_type_node(node:Node) -> TypeGuard[TypeNode]
Check whether the given node represents a type.
funcsrc.graphql.language.predicates.is_value_node(node:Node) -> TypeGuard[ValueNode]
Check whether the given node represents a value.
funcsrc.graphql.language.print_location.print_prefixed_lines(*lines:tuple[str, str | None]) -> str
Print lines specified like this: ("prefix", "string")
funcsrc.graphql.language.print_string.print_string(s:str) -> str
Print a string as a GraphQL StringValue literal.
funcsrc.graphql.language.printer.block(strings:Strings | None) -> str
Return strings inside a block.
funcsrc.graphql.language.printer.indent(string:str) -> str
Indent string with two spaces.
funcsrc.graphql.language.printer.is_multiline(string:str) -> bool
Check whether a string consists of multiple lines.
funcsrc.graphql.language.printer.join(strings:Strings | None, separator:str='') -> str
Join strings in a given collection.
funcsrc.graphql.language.printer.print_ast(ast:Node) -> str
Convert an AST into a string.
funcsrc.graphql.language.printer.wrap(start:str, string:str | None, end:str='') -> str
Wrap string inside other strings at start and end.
classsrc.graphql.language.source.Source
A representation of source input to GraphQL.
methodsrc.graphql.language.source.Source.get_location(position:int) -> SourceLocation
Get source location.
funcsrc.graphql.language.source.is_source(source:Any) -> TypeGuard[Source]
Test if the given value is a Source object.
classsrc.graphql.language.token_kind.TokenKind
The different kinds of tokens that the lexer emits
classsrc.graphql.language.visitor.EnterLeaveVisitor
Visitor with functions for entering and leaving.
classsrc.graphql.language.visitor.Stack
A stack for the visit function.
classsrc.graphql.language.visitor.Visitor
Visitor that walks through an AST.
classsrc.graphql.language.visitor.VisitorActionEnum
Special return values for the visitor methods.
funcsrc.graphql.language.visitor.visit(root:Node, visitor:Visitor, visitor_keys:VisitorKeyMap | None=None) -> Any
Visit each node in an AST.
classsrc.graphql.pyutils.cached_property.CachedProperty
A cached property.
funcsrc.graphql.pyutils.convert_case.camel_to_snake(s:str) -> str
Convert from CamelCase to snake_case
classsrc.graphql.pyutils.description.Description
Type checker for human-readable descriptions.
methodsrc.graphql.pyutils.description.Description.isinstance(obj:Any) -> bool
Check whether this is an instance of a description.
methodsrc.graphql.pyutils.description.Description.register(base:type) -> None
Register a class that shall be accepted as a description.
funcsrc.graphql.pyutils.did_you_mean.did_you_mean(suggestions:Sequence[str], sub_message:str | None=None) -> str
Given [ A, B, C ] return ' Did you mean A, B, or C?'
funcsrc.graphql.pyutils.format_list.and_list(items:Sequence[str]) -> str
Given [ A, B, C ] return 'A, B, and C'.
funcsrc.graphql.pyutils.format_list.format_list(conjunction:str, items:Sequence[str]) -> str
Given [ A, B, C ] return 'A, B, (conjunction) C'
funcsrc.graphql.pyutils.format_list.or_list(items:Sequence[str]) -> str
Given [ A, B, C ] return 'A, B, or C'.
funcsrc.graphql.pyutils.gather_with_cancel.gather_with_cancel(*awaitables:Awaitable[Any]) -> list[Any]
Run awaitable objects in the sequence concurrently.
funcsrc.graphql.pyutils.identity_func.identity_func(x:T=DEFAULT_VALUE, *_args:Any) -> T
Return the first received argument.
funcsrc.graphql.pyutils.inspect.inspect(value:Any) -> str
Inspect value and a return string representation for error messages.
funcsrc.graphql.pyutils.inspect.trunc_list(s:list) -> list
Truncate lists to maximum length.
funcsrc.graphql.pyutils.inspect.trunc_str(s:str) -> str
Truncate strings to maximum length.
funcsrc.graphql.pyutils.is_awaitable.is_async_iterable(value:Any) -> TypeGuard[AsyncIterable]
Return True if object is an asynchronous iterable.
funcsrc.graphql.pyutils.is_awaitable.is_awaitable(value:Any) -> TypeGuard[Awaitable]
Return True if object can be passed to an ``await`` expression.
classsrc.graphql.pyutils.path.Path
A generic path of string or integer indices
methodsrc.graphql.pyutils.path.Path.add_key(key:str | int, typename:str | None=None) -> Path
Return a new Path containing the given key.
methodsrc.graphql.pyutils.path.Path.as_list() -> list[str | int]
Return a list of the path keys.
funcsrc.graphql.pyutils.print_path_list.print_path_list(path:Collection[str | int]) -> str
Build a string describing the path.
methodsrc.graphql.pyutils.ref_map.RefMap.get(key:Any, default:Any=None) -> Any
Get the mapped value for the given key.
methodsrc.graphql.pyutils.ref_map.RefMap.items() -> Iterator[tuple[K, V]]
Return an iterator over the key/value-pairs of the map.
methodsrc.graphql.pyutils.ref_map.RefMap.keys() -> Iterator[K]
Return an iterator over the keys of the map.
methodsrc.graphql.pyutils.ref_map.RefMap.update(items:Iterable[tuple[K, V]] | None=None) -> None
Update the map with the given key/value-pairs.
methodsrc.graphql.pyutils.ref_map.RefMap.values() -> Iterator[V]
Return an iterator over the values of the map.
classsrc.graphql.pyutils.ref_set.RefSet
A set like object that allows mutable objects as elements.
methodsrc.graphql.pyutils.ref_set.RefSet.add(value:T) -> None
Add the given item to the set.
methodsrc.graphql.pyutils.ref_set.RefSet.discard(value:T) -> None
Remove the given item from the set if it exists.
methodsrc.graphql.pyutils.ref_set.RefSet.remove(value:T) -> None
Remove the given item from the set.
methodsrc.graphql.pyutils.ref_set.RefSet.update(values:Iterable[T] | None=None) -> None
Update the set with the given items.
classsrc.graphql.pyutils.simple_pub_sub.SimplePubSub
A very simple publish-subscript system.
methodsrc.graphql.pyutils.simple_pub_sub.SimplePubSub.emit(event:Any) -> bool
Emit an event.
methodsrc.graphql.pyutils.simple_pub_sub.SimplePubSub.get_subscriber(transform:Callable | None=None) -> SimplePubSubIterator
Return subscriber iterator
classsrc.graphql.pyutils.simple_pub_sub.SimplePubSubIterator
Async iterator used for subscriptions.
methodsrc.graphql.pyutils.simple_pub_sub.SimplePubSubIterator.aclose() -> None
Close the iterator.
methodsrc.graphql.pyutils.simple_pub_sub.SimplePubSubIterator.empty_queue() -> None
Empty the queue.
methodsrc.graphql.pyutils.simple_pub_sub.SimplePubSubIterator.push_value(event:Any) -> None
Push a new value.
funcsrc.graphql.pyutils.suggestion_list.suggestion_list(input_:str, options:Collection[str]) -> list[str]
Get list with suggestions for a given input.
classsrc.graphql.pyutils.undefined.UndefinedType
Auxiliary class for creating the Undefined singleton.
funcsrc.graphql.type.assert_name.assert_enum_value_name(name:str) -> str
Uphold the spec rules about naming enum values.
funcsrc.graphql.type.assert_name.assert_name(name:str) -> str
Uphold the spec rules about naming.
classsrc.graphql.type.definition.GraphQLArgument
Definition of a GraphQL argument
methodsrc.graphql.type.definition.GraphQLArgument.to_kwargs() -> GraphQLArgumentKwargs
Get corresponding arguments.
classsrc.graphql.type.definition.GraphQLArgumentKwargs
Python arguments for GraphQL arguments
classsrc.graphql.type.definition.GraphQLEnumTypeKwargs
Arguments for GraphQL enum types
classsrc.graphql.type.definition.GraphQLEnumValue
A GraphQL enum value.
methodsrc.graphql.type.definition.GraphQLEnumValue.to_kwargs() -> GraphQLEnumValueKwargs
Get corresponding arguments.
classsrc.graphql.type.definition.GraphQLEnumValueKwargs
Arguments for GraphQL enum values
classsrc.graphql.type.definition.GraphQLField
Definition of a GraphQL field
methodsrc.graphql.type.definition.GraphQLField.to_kwargs() -> GraphQLFieldKwargs
Get corresponding arguments.
classsrc.graphql.type.definition.GraphQLFieldKwargs
Arguments for GraphQL fields
classsrc.graphql.type.definition.GraphQLInputField
Definition of a GraphQL input field
methodsrc.graphql.type.definition.GraphQLInputField.to_kwargs() -> GraphQLInputFieldKwargs
Get corresponding arguments.
classsrc.graphql.type.definition.GraphQLInputFieldKwargs
Arguments for GraphQL input fields
classsrc.graphql.type.definition.GraphQLInputObjectTypeKwargs
Arguments for GraphQL input object types
classsrc.graphql.type.definition.GraphQLInterfaceTypeKwargs
Arguments for GraphQL interface types
classsrc.graphql.type.definition.GraphQLNamedType
Base class for all GraphQL named types
methodsrc.graphql.type.definition.GraphQLNamedType.to_kwargs() -> GraphQLNamedTypeKwargs
Get corresponding arguments.
classsrc.graphql.type.definition.GraphQLNamedTypeKwargs
Arguments for GraphQL named types
classsrc.graphql.type.definition.GraphQLObjectTypeKwargs
Arguments for GraphQL object types
classsrc.graphql.type.definition.GraphQLResolveInfo
Collection of information passed to the resolvers.
classsrc.graphql.type.definition.GraphQLScalarTypeKwargs
Arguments for GraphQL scalar types
classsrc.graphql.type.definition.GraphQLType
Base class for all GraphQL types
classsrc.graphql.type.definition.GraphQLUnionTypeKwargs
Arguments for GraphQL union types
classsrc.graphql.type.definition.GraphQLWrappingType
Base class for all GraphQL wrapping types
funcsrc.graphql.type.definition.assert_abstract_type(type_:Any) -> GraphQLAbstractType
Assert that this is a GraphQL abstract type.
funcsrc.graphql.type.definition.assert_argument(arg:Any) -> GraphQLArgument
Assert that this is a GraphQL argument.
funcsrc.graphql.type.definition.assert_composite_type(type_:Any) -> GraphQLCompositeType
Assert that this is a GraphQL composite type.
funcsrc.graphql.type.definition.assert_enum_type(type_:Any) -> GraphQLEnumType
Assert that this is a GraphQL enum type.
funcsrc.graphql.type.definition.assert_enum_value(value:Any) -> GraphQLEnumValue
Assert that this is a GraphQL enum value.
funcsrc.graphql.type.definition.assert_field(field:Any) -> GraphQLField
Assert that this is a GraphQL field.
funcsrc.graphql.type.definition.assert_input_field(field:Any) -> GraphQLInputField
Assert that this is a GraphQL input field.
funcsrc.graphql.type.definition.assert_input_object_type(type_:Any) -> GraphQLInputObjectType
Assert that this is a GraphQL input type.
funcsrc.graphql.type.definition.assert_input_type(type_:Any) -> GraphQLInputType
Assert that this is a GraphQL input type.
funcsrc.graphql.type.definition.assert_interface_type(type_:Any) -> GraphQLInterfaceType
Assert that this is a GraphQL interface type.
funcsrc.graphql.type.definition.assert_leaf_type(type_:Any) -> GraphQLLeafType
Assert that this is a GraphQL leaf type.
funcsrc.graphql.type.definition.assert_list_type(type_:Any) -> GraphQLList
Assert that this is a GraphQL list type.
funcsrc.graphql.type.definition.assert_named_type(type_:Any) -> GraphQLNamedType
Assert that this is a named GraphQL type.
funcsrc.graphql.type.definition.assert_non_null_type(type_:Any) -> GraphQLNonNull
Assert that this is a non-null GraphQL type.
funcsrc.graphql.type.definition.assert_nullable_type(type_:Any) -> GraphQLNullableType
Assert that this is a nullable GraphQL type.
funcsrc.graphql.type.definition.assert_object_type(type_:Any) -> GraphQLObjectType
Assume that this is a graphql object type
funcsrc.graphql.type.definition.assert_output_type(type_:Any) -> GraphQLOutputType
Assert that this is a GraphQL output type.
funcsrc.graphql.type.definition.assert_scalar_type(type_:Any) -> GraphQLScalarType
Assert that this is a GraphQL scalar type.
funcsrc.graphql.type.definition.assert_type(type_:Any) -> GraphQLType
Assert that this is a GraphQL type.
funcsrc.graphql.type.definition.assert_union_type(type_:Any) -> GraphQLUnionType
Assert that this is a GraphQL union type.
funcsrc.graphql.type.definition.assert_wrapping_type(type_:Any) -> GraphQLWrappingType
Assert that this is a GraphQL wrapping type.
funcsrc.graphql.type.definition.did_you_mean_enum_value(enum_type:GraphQLEnumType, unknown_value_str:str) -> str
Return suggestions for enum value.
funcsrc.graphql.type.definition.is_abstract_type(type_:Any) -> TypeGuard[GraphQLAbstractType]
Check whether this is a GraphQL abstract type.
funcsrc.graphql.type.definition.is_argument(arg:Any) -> TypeGuard[GraphQLArgument]
Check whether this is a GraphQL argument.
funcsrc.graphql.type.definition.is_composite_type(type_:Any) -> TypeGuard[GraphQLCompositeType]
Check whether this is a GraphQL composite type.
funcsrc.graphql.type.definition.is_enum_type(type_:Any) -> TypeGuard[GraphQLEnumType]
Check whether this is a GraphQL enum type.
funcsrc.graphql.type.definition.is_enum_value(value:Any) -> TypeGuard[GraphQLEnumValue]
Check whether this is a GraphQL enum value.
funcsrc.graphql.type.definition.is_field(field:Any) -> TypeGuard[GraphQLField]
Check whether this is a GraphQL field.
funcsrc.graphql.type.definition.is_input_field(field:Any) -> TypeGuard[GraphQLInputField]
Check whether this is a GraphQL input field.
funcsrc.graphql.type.definition.is_input_object_type(type_:Any) -> TypeGuard[GraphQLInputObjectType]
Check whether this is a GraphQL input type.
funcsrc.graphql.type.definition.is_input_type(type_:Any) -> TypeGuard[GraphQLInputType]
Check whether this is a GraphQL input type.
funcsrc.graphql.type.definition.is_interface_type(type_:Any) -> TypeGuard[GraphQLInterfaceType]
Check whether this is a GraphQL interface type.
funcsrc.graphql.type.definition.is_leaf_type(type_:Any) -> TypeGuard[GraphQLLeafType]
Check whether this is a GraphQL leaf type.
funcsrc.graphql.type.definition.is_list_type(type_:Any) -> TypeGuard[GraphQLList]
Check whether this is a GraphQL list type.
funcsrc.graphql.type.definition.is_named_type(type_:Any) -> TypeGuard[GraphQLNamedType]
Check whether this is a named GraphQL type.
funcsrc.graphql.type.definition.is_non_null_type(type_:Any) -> TypeGuard[GraphQLNonNull]
Check whether this is a non-null GraphQL type.
funcsrc.graphql.type.definition.is_nullable_type(type_:Any) -> TypeGuard[GraphQLNullableType]
Check whether this is a nullable GraphQL type.
funcsrc.graphql.type.definition.is_object_type(type_:Any) -> TypeGuard[GraphQLObjectType]
Check whether this is a graphql object type
funcsrc.graphql.type.definition.is_output_type(type_:Any) -> TypeGuard[GraphQLOutputType]
Check whether this is a GraphQL output type.
funcsrc.graphql.type.definition.is_required_argument(arg:GraphQLArgument | GraphQLVariableSignature) -> bool
Check whether the argument is required.
funcsrc.graphql.type.definition.is_required_input_field(field:GraphQLInputField) -> bool
Check whether this is input field is required.
funcsrc.graphql.type.definition.is_scalar_type(type_:Any) -> TypeGuard[GraphQLScalarType]
Check whether this is a GraphQL scalar type.
funcsrc.graphql.type.definition.is_type(type_:Any) -> TypeGuard[GraphQLType]
Check whether this is a GraphQL type.
funcsrc.graphql.type.definition.is_union_type(type_:Any) -> TypeGuard[GraphQLUnionType]
Check whether this is a GraphQL union type.
funcsrc.graphql.type.definition.is_wrapping_type(type_:Any) -> TypeGuard[GraphQLWrappingType]
Check whether this is a GraphQL wrapping type.
funcsrc.graphql.type.definition.resolve_thunk(thunk:Thunk[T]) -> T
Resolve the given thunk.
classsrc.graphql.type.directives.GraphQLDirectiveKwargs
Arguments for GraphQL directives
funcsrc.graphql.type.directives.assert_directive(directive:Any) -> GraphQLDirective
Assert that this is a GraphQL directive.
funcsrc.graphql.type.directives.is_directive(directive:Any) -> TypeGuard[GraphQLDirective]
Check whether this is a GraphQL directive.
classsrc.graphql.type.introspection.TypeKind
Kinds of types
funcsrc.graphql.type.scalars.boolean_value_to_literal(value:Any) -> ConstValueNode | None
Convert a boolean value to a Boolean literal in the AST.
funcsrc.graphql.type.scalars.float_value_to_literal(value:Any) -> ConstValueNode | None
Convert a float value to a Float literal in the AST.
funcsrc.graphql.type.scalars.int_value_to_literal(value:Any) -> ConstValueNode | None
Convert an integer value to an Int literal in the AST.
funcsrc.graphql.type.scalars.parse_boolean_literal(value_node:ValueNode, _variables:Any=None) -> bool
Parse a boolean value node in the AST.
funcsrc.graphql.type.scalars.parse_float_literal(value_node:ValueNode, _variables:Any=None) -> float
Parse a float value node in the AST.
funcsrc.graphql.type.scalars.parse_id_literal(value_node:ValueNode, _variables:Any=None) -> str
Parse an ID value node in the AST.
funcsrc.graphql.type.scalars.parse_int_literal(value_node:ValueNode, _variables:Any=None) -> int
Parse an integer value node in the AST.
funcsrc.graphql.type.scalars.parse_string_literal(value_node:ValueNode, _variables:Any=None) -> str
Parse a string value node in the AST.
funcsrc.graphql.type.scalars.string_value_to_literal(value:Any) -> ConstValueNode | None
Convert a string value to a String literal in the AST.
classsrc.graphql.type.schema.GraphQLSchemaKwargs
Arguments for GraphQL schemas
funcsrc.graphql.type.schema.assert_schema(schema:Any) -> GraphQLSchema
Assert that this is a GraphQL schema.
funcsrc.graphql.type.schema.is_schema(schema:Any) -> TypeGuard[GraphQLSchema]
Check whether this is a GraphQL schema.
funcsrc.graphql.type.schema.remapped_type(type_:GraphQLType, type_map:TypeMap) -> GraphQLType
Get a copy of the given type that uses this type map.
funcsrc.graphql.type.validate.assert_valid_schema(schema:GraphQLSchema) -> None
Utility function which asserts a schema is valid.
funcsrc.graphql.type.validate.validate_schema(schema:GraphQLSchema) -> list[GraphQLError]
Validate a GraphQL schema.
funcsrc.graphql.utilities.ast_from_value.ast_from_value(value:Any, type_:GraphQLInputType) -> ConstValueNode | None
Produce a GraphQL Value AST given a Python object.
funcsrc.graphql.utilities.build_ast_schema.build_ast_schema(document_ast:DocumentNode, assume_valid:bool=False, assume_valid_sdl:bool=False) -> GraphQLSchema
Build a GraphQL Schema from a given AST.
funcsrc.graphql.utilities.coerce_input_value.coerce_input_value(input_value:Any, type_:GraphQLInputType) -> Any
Coerce a Python value given a GraphQL Input Type.
funcsrc.graphql.utilities.concat_ast.concat_ast(asts:Collection[DocumentNode]) -> DocumentNode
Concat ASTs.
classsrc.graphql.utilities.extend_schema.TypeExtensionsMap
Mappings from types to their extensions.
methodsrc.graphql.utilities.extend_schema.TypeExtensionsMap.for_node(node:TEN) -> defaultdict[str, list[TEN]]
Get type extensions map for the given node kind.
classsrc.graphql.utilities.find_schema_changes.BreakingChange
Type and description of a breaking change
classsrc.graphql.utilities.find_schema_changes.BreakingChangeType
Types of breaking changes
classsrc.graphql.utilities.find_schema_changes.DangerousChange
Type and description of a dangerous change
classsrc.graphql.utilities.find_schema_changes.DangerousChangeType
Types of dangerous changes
classsrc.graphql.utilities.find_schema_changes.ListDiff
Tuple with added, removed and persisted list items.
classsrc.graphql.utilities.find_schema_changes.SafeChange
Type and description of a safe change
classsrc.graphql.utilities.find_schema_changes.SafeChangeType
Types of safe changes
funcsrc.graphql.utilities.find_schema_changes.dict_diff(old_dict:dict, new_dict:dict) -> DictDiff
Get differences between two dicts.
funcsrc.graphql.utilities.find_schema_changes.find_breaking_changes(old_schema:GraphQLSchema, new_schema:GraphQLSchema) -> list[BreakingChange]
Find breaking changes.
funcsrc.graphql.utilities.find_schema_changes.find_dangerous_changes(old_schema:GraphQLSchema, new_schema:GraphQLSchema) -> list[DangerousChange]
Find dangerous changes.
funcsrc.graphql.utilities.find_schema_changes.find_schema_changes(old_schema:GraphQLSchema, new_schema:GraphQLSchema) -> list[SchemaChange]
Find schema changes.
funcsrc.graphql.utilities.find_schema_changes.list_diff(old_list:Collection, new_list:Collection) -> ListDiff
Get differences between two lists of named items.
funcsrc.graphql.utilities.get_operation_ast.get_operation_ast(document_ast:DocumentNode, operation_name:str | None=None) -> OperationDefinitionNode | None
Get operation AST node.
funcsrc.graphql.utilities.lexicographic_sort_schema.lexicographic_sort_schema(schema:GraphQLSchema) -> GraphQLSchema
Sort GraphQLSchema.
classsrc.graphql.utilities.map_schema_config.MappedSchemaContext
Context provided to the configuration mappers.
classsrc.graphql.utilities.map_schema_config.SchemaElementKind
The set of GraphQL Schema Elements.
funcsrc.graphql.utilities.print_schema.is_defined_type(type_:GraphQLNamedType) -> bool
Check if the given named GraphQL type is a defined type.
funcsrc.graphql.utilities.print_schema.print_args(args:dict[str, GraphQLArgument], indentation:str='') -> str
Print the given GraphQL arguments.
funcsrc.graphql.utilities.print_schema.print_block(items:list[str]) -> str
Print a block with the given items.
funcsrc.graphql.utilities.print_schema.print_deprecated(reason:str | None) -> str
Print a deprecation reason.
funcsrc.graphql.utilities.print_schema.print_description(def_:GraphQLArgument | GraphQLDirective | GraphQLEnumValue | GraphQLNamedType | GraphQLSchema, indentation:str='', first_in_block:bool=True) -> str
Print a description.
funcsrc.graphql.utilities.print_schema.print_directive(directive:GraphQLDirective) -> str
Print a GraphQL directive.
funcsrc.graphql.utilities.print_schema.print_enum(type_:GraphQLEnumType) -> str
Print a GraphQL enum type.
funcsrc.graphql.utilities.print_schema.print_fields(type_:GraphQLObjectType | GraphQLInterfaceType) -> str
Print the fields of a GraphQL object or interface type.
funcsrc.graphql.utilities.print_schema.print_input_object(type_:GraphQLInputObjectType) -> str
Print a GraphQL input object type.
funcsrc.graphql.utilities.print_schema.print_input_value(name:str, arg:GraphQLArgument) -> str
Print an input value.
funcsrc.graphql.utilities.print_schema.print_interface(type_:GraphQLInterfaceType) -> str
Print a GraphQL interface type.
funcsrc.graphql.utilities.print_schema.print_introspection_schema(schema:GraphQLSchema) -> str
Print the built-in introspection schema in SDL format.
funcsrc.graphql.utilities.print_schema.print_object(type_:GraphQLObjectType) -> str
Print a GraphQL object type.
funcsrc.graphql.utilities.print_schema.print_scalar(type_:GraphQLScalarType) -> str
Print a GraphQL scalar type.
funcsrc.graphql.utilities.print_schema.print_schema(schema:GraphQLSchema) -> str
Print the given GraphQL schema in SDL format.
funcsrc.graphql.utilities.print_schema.print_schema_definition(schema:GraphQLSchema) -> str | None
Print GraphQL schema definitions.
funcsrc.graphql.utilities.print_schema.print_specified_by_url(scalar:GraphQLScalarType) -> str
Print a specification URL.
funcsrc.graphql.utilities.print_schema.print_type(type_:GraphQLNamedType) -> str
Print a named GraphQL type.
funcsrc.graphql.utilities.print_schema.print_union(type_:GraphQLUnionType) -> str
Print a GraphQL union type.
classsrc.graphql.utilities.resolve_schema_coordinate.ResolvedDirective
A directive resolved from a schema coordinate.
classsrc.graphql.utilities.resolve_schema_coordinate.ResolvedField
A field resolved from a schema coordinate.
classsrc.graphql.utilities.resolve_schema_coordinate.ResolvedNamedType
A named type resolved from a schema coordinate.
funcsrc.graphql.utilities.resolve_schema_coordinate.resolve_argument_coordinate(schema:GraphQLSchema, schema_coordinate:ArgumentCoordinateNode) -> ResolvedFieldArgument | None
ArgumentCoordinate : Name .
funcsrc.graphql.utilities.resolve_schema_coordinate.resolve_directive_coordinate(schema:GraphQLSchema, schema_coordinate:DirectiveCoordinateNode) -> ResolvedDirective | None
DirectiveCoordinate : @ Name
funcsrc.graphql.utilities.resolve_schema_coordinate.resolve_type_coordinate(schema:GraphQLSchema, schema_coordinate:TypeCoordinateNode) -> ResolvedNamedType | None
TypeCoordinate : Name
funcsrc.graphql.utilities.separate_operations.collect_transitive_dependencies(collected:set[str], dep_graph:DepGraph, from_name:str) -> None
Collect transitive dependencies.
funcsrc.graphql.utilities.separate_operations.separate_operations(document_ast:DocumentNode) -> dict[str, DocumentNode]
Separate operations in a given AST document.
funcsrc.graphql.utilities.sort_value_node.sort_value_node(value_node:ValueNode) -> ValueNode
Sort ValueNode.
funcsrc.graphql.utilities.strip_ignored_characters.strip_ignored_characters(source:str | Source) -> str
Strip characters that are ignored anyway.
funcsrc.graphql.utilities.type_comparators.is_equal_type(type_a:GraphQLType, type_b:GraphQLType) -> bool
Check whether two types are equal.
classsrc.graphql.utilities.type_info.TypeInfo
Utility class for keeping track of type definitions.
classsrc.graphql.utilities.type_info.TypeInfoVisitor
A visitor which maintains a provided TypeInfo.
classsrc.graphql.utilities.validate_input_value.ValidationContext
Context for validating an input literal.
classsrc.graphql.validation.rules.ASTValidationRule
Visitor for validation of an AST.
methodsrc.graphql.validation.rules.ASTValidationRule.report_error(error:GraphQLError) -> None
Report a GraphQL error.
classsrc.graphql.validation.rules.SDLValidationRule
Visitor for validation of an SDL AST.
classsrc.graphql.validation.rules.ValidationRule
Visitor for validation using a GraphQL schema.
funcsrc.graphql.validation.rules.fields_on_correct_type.get_suggested_field_names(type_:GraphQLOutputType, field_name:str) -> list[str]
Get a list of suggested field names.
funcsrc.graphql.validation.rules.fields_on_correct_type.get_suggested_type_names(schema:GraphQLSchema, type_:GraphQLOutputType, field_name:str) -> list[str]
Get a list of suggested type names.
classsrc.graphql.validation.rules.max_introspection_depth_rule.MaxIntrospectionDepthRule
Checks maximum introspection depth
funcsrc.graphql.validation.validate.assert_valid_sdl(document_ast:DocumentNode) -> None
Assert document is valid SDL.
funcsrc.graphql.validation.validate.assert_valid_sdl_extension(document_ast:DocumentNode, schema:GraphQLSchema) -> None
Assert document is a valid SDL extension.
funcsrc.graphql.validation.validate.validate_sdl(document_ast:DocumentNode, schema_to_extend:GraphQLSchema | None=None, rules:Collection[type[ASTValidationRule]] | None=None) -> list[GraphQLError]
Validate an SDL document.
classsrc.graphql.validation.validation_context.VariableUsage
Variable usage

About this data

These signatures were extracted from the public source of graphql-python/graphql-core using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries