We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Can't get DataLoader to work
Hello! I'm trying examples from this page https://strawberry.rocks/docs/guides/dataloaders.
Running the following code on Python 3.8:
```python
import strawberry
from strawberry.dataloader import DataLoader
from typing import List


@strawberry.type
class User:
    id: strawberry.ID


async def load_users(keys) -> List[User]:
    return [User(id=key) for key in keys]

loader = DataLoader(load_fn=load_users)


@strawberry.type
class Query:
    @strawberry.field
    async def get_user(self, id: strawberry.ID) -> User:
        return await loader.load(id)


schema = strawberry.Schema(query=Query)
```
I get the following error message:
```
Task <Task pending name='Task-8' coro=<ExecutionContext.resolve_field.<locals>.await_result() 
running at /Users/-/Documents/src/dataservice-poc/virtualenv/lib/python3.8/site-packages/graphql/execution/execute.py:625> 
cb=[gather.<locals>._done_callback() at /usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py:758]> 
got Future <Future pending> attached to a different loop
```

When I try my own code (which is pretty much the same, but the loader is real - it reads data from the db) I get this: "RuntimeError: await wasn't used with future".

I'm stuck, don't really know where to look. I thought Strawberry is supposed to manage async processing, but looks like it doesn't work that way. Any help would be greatly appreciated.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `strawberry/cli/commands/server.py`
Content:
```
1 import importlib
2 import sys
3 
4 import click
5 import hupper
6 import uvicorn
7 from starlette.applications import Starlette
8 from starlette.middleware.cors import CORSMiddleware
9 
10 from strawberry import Schema
11 from strawberry.asgi import GraphQL
12 from strawberry.utils.importer import import_module_symbol
13 
14 
15 @click.command("server", short_help="Starts debug server")
16 @click.argument("schema", type=str)
17 @click.option("-h", "--host", default="0.0.0.0", type=str)
18 @click.option("-p", "--port", default=8000, type=int)
19 @click.option(
20     "--app-dir",
21     default=".",
22     type=str,
23     show_default=True,
24     help=(
25         "Look for the module in the specified directory, by adding this to the "
26         "PYTHONPATH. Defaults to the current working directory. "
27         "Works the same as `--app-dir` in uvicorn."
28     ),
29 )
30 def server(schema, host, port, app_dir):
31     sys.path.insert(0, app_dir)
32 
33     try:
34         schema_symbol = import_module_symbol(schema, default_symbol_name="schema")
35     except (ImportError, AttributeError) as exc:
36         message = str(exc)
37         raise click.BadArgumentUsage(message)
38 
39     if not isinstance(schema_symbol, Schema):
40         message = "The `schema` must be an instance of strawberry.Schema"
41         raise click.BadArgumentUsage(message)
42 
43     reloader = hupper.start_reloader("strawberry.cli.run", verbose=False)
44     schema_module = importlib.import_module(schema_symbol.__module__)
45     reloader.watch_files([schema_module.__file__])
46 
47     app = Starlette(debug=True)
48     app.add_middleware(
49         CORSMiddleware, allow_headers=["*"], allow_origins=["*"], allow_methods=["*"]
50     )
51 
52     graphql_app = GraphQL(schema_symbol, debug=True)
53 
54     paths = ["/", "/graphql"]
55     for path in paths:
56         app.add_route(path, graphql_app)
57         app.add_websocket_route(path, graphql_app)
58 
59     print(f"Running strawberry on http://{host}:{port}/ 🍓")
60     uvicorn.run(app, host=host, port=port, log_level="error")
61
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/strawberry/cli/commands/server.py b/strawberry/cli/commands/server.py
--- a/strawberry/cli/commands/server.py
+++ b/strawberry/cli/commands/server.py
@@ -57,4 +57,4 @@
         app.add_websocket_route(path, graphql_app)
 
     print(f"Running strawberry on http://{host}:{port}/ 🍓")
-    uvicorn.run(app, host=host, port=port, log_level="error")
+    uvicorn.run(app, loop="none", host=host, port=port, log_level="error")

{"golden_diff": "diff --git a/strawberry/cli/commands/server.py b/strawberry/cli/commands/server.py\n--- a/strawberry/cli/commands/server.py\n+++ b/strawberry/cli/commands/server.py\n@@ -57,4 +57,4 @@\n         app.add_websocket_route(path, graphql_app)\n \n     print(f\"Running strawberry on http://{host}:{port}/ \ud83c\udf53\")\n-    uvicorn.run(app, host=host, port=port, log_level=\"error\")\n+    uvicorn.run(app, loop=\"none\", host=host, port=port, log_level=\"error\")\n", "issue": "Can't get DataLoader to work\nHello! I'm trying examples from this page https://strawberry.rocks/docs/guides/dataloaders.\r\nRunning the following code on Python 3.8:\r\n```python\r\nimport strawberry\r\nfrom strawberry.dataloader import DataLoader\r\nfrom typing import List\r\n\r\n\r\n@strawberry.type\r\nclass User:\r\n    id: strawberry.ID\r\n\r\n\r\nasync def load_users(keys) -> List[User]:\r\n    return [User(id=key) for key in keys]\r\n\r\nloader = DataLoader(load_fn=load_users)\r\n\r\n\r\n@strawberry.type\r\nclass Query:\r\n    @strawberry.field\r\n    async def get_user(self, id: strawberry.ID) -> User:\r\n        return await loader.load(id)\r\n\r\n\r\nschema = strawberry.Schema(query=Query)\r\n```\r\nI get the following error message:\r\n```\r\nTask <Task pending name='Task-8' coro=<ExecutionContext.resolve_field.<locals>.await_result() \r\nrunning at /Users/-/Documents/src/dataservice-poc/virtualenv/lib/python3.8/site-packages/graphql/execution/execute.py:625> \r\ncb=[gather.<locals>._done_callback() at /usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py:758]> \r\ngot Future <Future pending> attached to a different loop\r\n```\r\n\r\nWhen I try my own code (which is pretty much the same, but the loader is real - it reads data from the db) I get this: \"RuntimeError: await wasn't used with future\".\r\n\r\nI'm stuck, don't really know where to look. I thought Strawberry is supposed to manage async processing, but looks like it doesn't work that way. Any help would be greatly appreciated.\n", "before_files": [{"content": "import importlib\nimport sys\n\nimport click\nimport hupper\nimport uvicorn\nfrom starlette.applications import Starlette\nfrom starlette.middleware.cors import CORSMiddleware\n\nfrom strawberry import Schema\nfrom strawberry.asgi import GraphQL\nfrom strawberry.utils.importer import import_module_symbol\n\n\n@click.command(\"server\", short_help=\"Starts debug server\")\n@click.argument(\"schema\", type=str)\n@click.option(\"-h\", \"--host\", default=\"0.0.0.0\", type=str)\n@click.option(\"-p\", \"--port\", default=8000, type=int)\n@click.option(\n    \"--app-dir\",\n    default=\".\",\n    type=str,\n    show_default=True,\n    help=(\n        \"Look for the module in the specified directory, by adding this to the \"\n        \"PYTHONPATH. Defaults to the current working directory. \"\n        \"Works the same as `--app-dir` in uvicorn.\"\n    ),\n)\ndef server(schema, host, port, app_dir):\n    sys.path.insert(0, app_dir)\n\n    try:\n        schema_symbol = import_module_symbol(schema, default_symbol_name=\"schema\")\n    except (ImportError, AttributeError) as exc:\n        message = str(exc)\n        raise click.BadArgumentUsage(message)\n\n    if not isinstance(schema_symbol, Schema):\n        message = \"The `schema` must be an instance of strawberry.Schema\"\n        raise click.BadArgumentUsage(message)\n\n    reloader = hupper.start_reloader(\"strawberry.cli.run\", verbose=False)\n    schema_module = importlib.import_module(schema_symbol.__module__)\n    reloader.watch_files([schema_module.__file__])\n\n    app = Starlette(debug=True)\n    app.add_middleware(\n        CORSMiddleware, allow_headers=[\"*\"], allow_origins=[\"*\"], allow_methods=[\"*\"]\n    )\n\n    graphql_app = GraphQL(schema_symbol, debug=True)\n\n    paths = [\"/\", \"/graphql\"]\n    for path in paths:\n        app.add_route(path, graphql_app)\n        app.add_websocket_route(path, graphql_app)\n\n    print(f\"Running strawberry on http://{host}:{port}/ \ud83c\udf53\")\n    uvicorn.run(app, host=host, port=port, log_level=\"error\")\n", "path": "strawberry/cli/commands/server.py"}], "after_files": [{"content": "import importlib\nimport sys\n\nimport click\nimport hupper\nimport uvicorn\nfrom starlette.applications import Starlette\nfrom starlette.middleware.cors import CORSMiddleware\n\nfrom strawberry import Schema\nfrom strawberry.asgi import GraphQL\nfrom strawberry.utils.importer import import_module_symbol\n\n\n@click.command(\"server\", short_help=\"Starts debug server\")\n@click.argument(\"schema\", type=str)\n@click.option(\"-h\", \"--host\", default=\"0.0.0.0\", type=str)\n@click.option(\"-p\", \"--port\", default=8000, type=int)\n@click.option(\n    \"--app-dir\",\n    default=\".\",\n    type=str,\n    show_default=True,\n    help=(\n        \"Look for the module in the specified directory, by adding this to the \"\n        \"PYTHONPATH. Defaults to the current working directory. \"\n        \"Works the same as `--app-dir` in uvicorn.\"\n    ),\n)\ndef server(schema, host, port, app_dir):\n    sys.path.insert(0, app_dir)\n\n    try:\n        schema_symbol = import_module_symbol(schema, default_symbol_name=\"schema\")\n    except (ImportError, AttributeError) as exc:\n        message = str(exc)\n        raise click.BadArgumentUsage(message)\n\n    if not isinstance(schema_symbol, Schema):\n        message = \"The `schema` must be an instance of strawberry.Schema\"\n        raise click.BadArgumentUsage(message)\n\n    reloader = hupper.start_reloader(\"strawberry.cli.run\", verbose=False)\n    schema_module = importlib.import_module(schema_symbol.__module__)\n    reloader.watch_files([schema_module.__file__])\n\n    app = Starlette(debug=True)\n    app.add_middleware(\n        CORSMiddleware, allow_headers=[\"*\"], allow_origins=[\"*\"], allow_methods=[\"*\"]\n    )\n\n    graphql_app = GraphQL(schema_symbol, debug=True)\n\n    paths = [\"/\", \"/graphql\"]\n    for path in paths:\n        app.add_route(path, graphql_app)\n        app.add_websocket_route(path, graphql_app)\n\n    print(f\"Running strawberry on http://{host}:{port}/ \ud83c\udf53\")\n    uvicorn.run(app, loop=\"none\", host=host, port=port, log_level=\"error\")\n", "path": "strawberry/cli/commands/server.py"}]}