prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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.
  
  </issue>
  <code>
  [start of strawberry/cli/commands/server.py]
  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 of strawberry/cli/commands/server.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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")
  
verification_info: {"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"}]}