<s> """<STR_LIT>""" <EOL> from . base import ExecutionResult <EOL> from . executor import Executor <EOL> from . middlewares . sync import SynchronousExecutionMiddleware <EOL> def execute ( schema , root , ast , operation_name = '<STR_LIT>' , args = None ) : <EOL> """<STR_LIT>""" <EOL> return get_default_executor ( ) . execute ( schema , ast , root , args , operation_name , validate_ast = False ) <EOL> _default_executor = None <EOL> def get_default_executor ( ) : <EOL> """<STR_LIT>""" <EOL> global _default_executor <EOL> if _default_executor is None : <EOL> _default_executor = Executor ( [ SynchronousExecutionMiddleware ( ) ] ) <EOL> return _default_executor <EOL> def set_default_executor ( executor ) : <EOL> """<STR_LIT>""" <EOL> assert isinstance ( executor , Executor ) or executor is None <EOL> global _default_executor <EOL> _default_executor = executor <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] </s>
