# Buggy code
def _preheat(schema_name: str) -> "GraphQLSchema":
    """
    Loads the SDL and converts it to a GraphQLSchema instance before baking
    each registered objects of this schema.
    :param schema_name: name of the schema to treat
    :type schema_name: str
    :return: a pre-baked GraphQLSchema instance
    :rtype: GraphQLSchema
    """
    schema_info = SchemaRegistry.find_schema_info(schema_name)
    sdl = schema_info["sdl"]

    schema = schema_from_sdl(sdl, schema_name=schema_name)

    for object_ids in _SCHEMA_OBJECT_IDS:
        for obj in schema_info.get(object_ids, {}).values():
            obj.bake(schema)

    schema_info["inst"] = schema

    return schema


# Traceback (KeyError)
Traceback (most recent call last):
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette/schema/schema.py", line 348, in get_field_by_name
return self.type_definitions[parent_name].find_field(field_name)
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette/types/object.py", line 125, in find_field
return self.implemented_fields[name]
KeyError: 'world'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/morse/Documents/GitHub/play-tartiflette/src/__main__.py", line 54, in <module>
run()
File "/Users/morse/Documents/GitHub/play-tartiflette/src/__main__.py", line 52, in run
web.run_app(app, port=8090,)
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/aiohttp/web.py", line 415, in run_app
reuse_port=reuse_port))
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/aiohttp/web.py", line 287, in _run_app
await runner.setup()
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/aiohttp/web_runner.py", line 203, in setup
self._server = await self._make_server()
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/aiohttp/web_runner.py", line 302, in _make_server
await self._app.startup()
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/aiohttp/web_app.py", line 389, in startup
await self.on_startup.send(self)
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/aiohttp/signals.py", line 34, in send
await receiver(*args, **kwargs)  # type: ignore
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette_aiohttp/__init__.py", line 97, in _cook_on_startup
sdl=sdl, schema_name=schema_name, modules=modules
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette/engine.py", line 250, in cook
schema_name, custom_default_resolver, custom_default_type_resolver
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette/schema/bakery.py", line 65, in bake
schema = SchemaBakery._preheat(schema_name)
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette/schema/bakery.py", line 39, in _preheat
obj.bake(schema)
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette/resolver/resolver.py", line 67, in bake
field = schema.get_field_by_name(self.name)
File "/Users/morse/.pyenv/versions/3.7.2/lib/python3.7/site-packages/tartiflette/schema/schema.py", line 351, in get_field_by_name
f"field `{name}` was not found in GraphQL schema."
tartiflette.types.exceptions.tartiflette.UnknownSchemaFieldResolver: field `Query.world` was not found in GraphQL schema.

# Fixed code
def _preheat(schema_name: str) -> "GraphQLSchema":
    """
    Loads the SDL and converts it to a GraphQLSchema instance before baking
    each registered objects of this schema.
    :param schema_name: name of the schema to treat
    :type schema_name: str
    :return: a pre-baked GraphQLSchema instance
    :rtype: GraphQLSchema
    """
    schema_info = SchemaRegistry.find_schema_info(schema_name)
    sdl = schema_info["sdl"]
    schema = schema_from_sdl(sdl, schema_name=schema_name)
    schema_info["inst"] = schema
    return schema