graphql/graphql.py
async def graphql(
    schema: GraphQLSchema,
    source: Union[str, Source],
    root_value: Any = None,
    context_value: Any = None,
    variable_values: Dict[str, Any] = None,
    operation_name: str = None,
    field_resolver: Callable = None,
    middleware: Middleware = None,
    execution_context_class: Type[ExecutionContext] = ExecutionContext,
) -> ExecutionResult:
    """Execute a GraphQL operation asynchronously.

    This is the primary entry point function for fulfilling GraphQL operations by
    parsing, validating, and executing a GraphQL document along side a GraphQL schema.

    More sophisticated GraphQL servers, such as those which persist queries, may wish
    to separate the validation and execution phases to a static time tooling step,
    and a server runtime step.

    Accepts the following arguments:

    :arg schema:
      The GraphQL type system to use when validating and executing a query.
    :arg source:
      A GraphQL language formatted string representing the requested operation.
    :arg root_value:
      The value provided as the first argument to resolver functions on the top level
      type (e.g. the query object type).
    :arg context_value:
      The context value is provided as an attribute of the second argument
      (the resolve info) to resolver functions. It is used to pass shared information
      useful at any point during query execution, for example the currently logged in
      user and connections to databases or other services.
    :arg variable_values:
      A mapping of variable name to runtime value to use for all variables defined
      in the request string.
    :arg operation_name:
      The name of the operation to use if request string contains multiple possible
      operations. Can be omitted if request string contains only one operation.
    :arg field_resolver:
      A resolver function to use when one is not provided by the schema.
      If not provided, the default field resolver is used (which looks for a value
      or method on the source value with the field's name).
    :arg middleware:
      The middleware to wrap the resolvers with
    :arg execution_context_class:
      The execution context class to use to build the context
    """
    # Always return asynchronously for a consistent API.
    result = graphql_impl(
        schema,
        source,
        root_value,
        context_value,
        variable_values,
        operation_name,
        field_resolver,
        middleware,
        execution_context_class,
    )

    if isawaitable(result):
        return await cast(Awaitable[ExecutionResult], result)

    return cast(ExecutionResult, result)
Execute a GraphQL operation asynchronously.

    This is the primary entry point function for fulfilling GraphQL operations by
    parsing, validating, and executing a GraphQL document along side a GraphQL schema.

    More sophisticated GraphQL servers, such as those which persist queries, may wish
    to separate the validation and execution phases to a static time tooling step,
    and a server runtime step.

    Accepts the following arguments:

    :arg schema:
      The GraphQL type system to use when validating and executing a query.
    :arg source:
      A GraphQL language formatted string representing the requested operation.
    :arg root_value:
      The value provided as the first argument to resolver functions on the top level
      type (e.g. the query object type).
    :arg context_value:
      The context value is provided as an attribute of the second argument
      (the resolve info) to resolver functions. It is used to pass shared information
      useful at any point during query execution, for example the currently logged in
      user and connections to databases or other services.
    :arg variable_values:
      A mapping of variable name to runtime value to use for all variables defined
      in the request string.
    :arg operation_name:
      The name of the operation to use if request string contains multiple possible
      operations. Can be omitted if request string contains only one operation.
    :arg field_resolver:
      A resolver function to use when one is not provided by the schema.
      If not provided, the default field resolver is used (which looks for a value
      or method on the source value with the field's name).
    :arg middleware:
      The middleware to wrap the resolvers with
    :arg execution_context_class:
      The execution context class to use to build the context
    
Execute a GraphQL operation asynchronously.
This is the primary entry point function for fulfilling GraphQL operations by
parsing, validating, and executing a GraphQL document along side a GraphQL schema.

More sophisticated GraphQL servers, such as those which persist queries, may wish
to separate the validation and execution phases to a static time tooling step,
and a server runtime step.

Accepts the following arguments.
Execute a GraphQL operation asynchronously . This is the primary entry point function for fulfilling GraphQL operations by parsing validating and executing a GraphQL document along side a GraphQL schema . More sophisticated GraphQL servers such as those which persist queries may wish to separate the validation and execution phases to a static time tooling step and a server runtime step . Accepts the following arguments .
async def graphql(
    schema: GraphQLSchema,
    source: Union[str, Source],
    root_value: Any = None,
    context_value: Any = None,
    variable_values: Dict[str, Any] = None,
    operation_name: str = None,
    field_resolver: Callable = None,
    middleware: Middleware = None,
    execution_context_class: Type[ExecutionContext] = ExecutionContext,
) -> ExecutionResult:
    result = graphql_impl(
        schema,
        source,
        root_value,
        context_value,
        variable_values,
        operation_name,
        field_resolver,
        middleware,
        execution_context_class,
    )
    if isawaitable(result):
        return await cast(Awaitable[ExecutionResult], result)
    return cast(ExecutionResult, result)
async def graphql ( schema : GraphQLSchema , source : Union [ str , Source ] , root_value : Any = None , context_value : Any = None , variable_values : Dict [ str , Any ] = None , operation_name : str = None , field_resolver : Callable = None , middleware : Middleware = None , execution_context_class : Type [ ExecutionContext ] = ExecutionContext , ) -> ExecutionResult : result = graphql_impl ( schema , source , root_value , context_value , variable_values , operation_name , field_resolver , middleware , execution_context_class , ) if isawaitable ( result ) : return await cast ( Awaitable [ ExecutionResult ] , result ) return cast ( ExecutionResult , result )
Execute a GraphQL operation asynchronously.
Execute a GraphQL operation asynchronously .
"""Execute a GraphQL operation asynchronously.

    This is the primary entry point function for fulfilling GraphQL operations by
    parsing, validating, and executing a GraphQL document along side a GraphQL schema.

    More sophisticated GraphQL servers, such as those which persist queries, may wish
    to separate the validation and execution phases to a static time tooling step,
    and a server runtime step.

    Accepts the following arguments:

    :arg schema:
      The GraphQL type system to use when validating and executing a query.
    :arg source:
      A GraphQL language formatted string representing the requested operation.
    :arg root_value:
      The value provided as the first argument to resolver functions on the top level
      type (e.g. the query object type).
    :arg context_value:
      The context value is provided as an attribute of the second argument
      (the resolve info) to resolver functions. It is used to pass shared information
      useful at any point during query execution, for example the currently logged in
      user and connections to databases or other services.
    :arg variable_values:
      A mapping of variable name to runtime value to use for all variables defined
      in the request string.
    :arg operation_name:
      The name of the operation to use if request string contains multiple possible
      operations. Can be omitted if request string contains only one operation.
    :arg field_resolver:
      A resolver function to use when one is not provided by the schema.
      If not provided, the default field resolver is used (which looks for a value
      or method on the source value with the field's name).
    :arg middleware:
      The middleware to wrap the resolvers with
    :arg execution_context_class:
      The execution context class to use to build the context
    """ # Always return asynchronously for a consistent API.
schema
GraphQLSchema
The GraphQL type system to use when validating and executing a query.
The GraphQL type system to use when validating and executing a query .
source
Union[str, Source]
A GraphQL language formatted string representing the requested operation.
A GraphQL language formatted string representing the requested operation .
root_value
Any
The value provided as the first argument to resolver functions on the top level
type .
The value provided as the first argument to resolver functions on the top level type .
context_value
Any
The context value is provided as an attribute of the second argument
(the resolve info) to resolver functions. It is used to pass shared information
useful at any point during query execution, for example the currently logged in
user and connections to databases or other services.
The context value is provided as an attribute of the second argument ( the resolve info ) to resolver functions . It is used to pass shared information useful at any point during query execution for example the currently logged in user and connections to databases or other services .
variable_values
Dict[str, Any]
A mapping of variable name to runtime value to use for all variables defined
in the request string.
A mapping of variable name to runtime value to use for all variables defined in the request string .
operation_name
str
The name of the operation to use if request string contains multiple possible
operations. Can be omitted if request string contains only one operation.
The name of the operation to use if request string contains multiple possible operations . Can be omitted if request string contains only one operation .
field_resolver
Callable
A resolver function to use when one is not provided by the schema.
If not provided, the default field resolver is used (which looks for a value
or method on the source value with the field's name).
A resolver function to use when one is not provided by the schema . If not provided the default field resolver is used ( which looks for a value or method on the source value with the field ' s name ) .
middleware
Middleware
The middleware to wrap the resolvers with
The middleware to wrap the resolvers with
execution_context_class
Type[ExecutionContext]
The execution context class to use to build the context
The execution context class to use to build the context