prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  The export-schema command fails when trying to import local modules
  
  
  </issue>
  <code>
  [start of strawberry/cli/commands/export_schema.py]
  1 import click
  2 
  3 from strawberry import Schema
  4 from strawberry.printer import print_schema
  5 from strawberry.utils.importer import import_module_symbol
  6 
  7 
  8 @click.command(short_help="Exports the schema")
  9 @click.argument("schema", type=str)
  10 def export_schema(schema: str):
  11     try:
  12         schema_symbol = import_module_symbol(schema, default_symbol_name="schema")
  13     except (ImportError, AttributeError) as exc:
  14         message = str(exc)
  15         raise click.BadArgumentUsage(message)
  16     if not isinstance(schema_symbol, Schema):
  17         message = "The `schema` must be an instance of strawberry.Schema"
  18         raise click.BadArgumentUsage(message)
  19     print(print_schema(schema_symbol))
  20
  [end of strawberry/cli/commands/export_schema.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/export_schema.py b/strawberry/cli/commands/export_schema.py
  --- a/strawberry/cli/commands/export_schema.py
  +++ b/strawberry/cli/commands/export_schema.py
  @@ -1,3 +1,5 @@
  +import sys
  +
   import click
   
   from strawberry import Schema
  @@ -7,7 +9,20 @@
   
   @click.command(short_help="Exports the schema")
   @click.argument("schema", type=str)
  -def export_schema(schema: str):
  +@click.option(
  +    "--app-dir",
  +    default=".",
  +    type=str,
  +    show_default=True,
  +    help=(
  +        "Look for the module in the specified directory, by adding this to the "
  +        "PYTHONPATH. Defaults to the current working directory. "
  +        "Works the same as `--app-dir` in uvicorn."
  +    ),
  +)
  +def export_schema(schema: str, app_dir):
  +    sys.path.insert(0, app_dir)
  +
       try:
           schema_symbol = import_module_symbol(schema, default_symbol_name="schema")
       except (ImportError, AttributeError) as exc:
  
verification_info: {"golden_diff": "diff --git a/strawberry/cli/commands/export_schema.py b/strawberry/cli/commands/export_schema.py\n--- a/strawberry/cli/commands/export_schema.py\n+++ b/strawberry/cli/commands/export_schema.py\n@@ -1,3 +1,5 @@\n+import sys\n+\n import click\n \n from strawberry import Schema\n@@ -7,7 +9,20 @@\n \n @click.command(short_help=\"Exports the schema\")\n @click.argument(\"schema\", type=str)\n-def export_schema(schema: str):\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+)\n+def export_schema(schema: str, 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", "issue": "The export-schema command fails when trying to import local modules\n\n", "before_files": [{"content": "import click\n\nfrom strawberry import Schema\nfrom strawberry.printer import print_schema\nfrom strawberry.utils.importer import import_module_symbol\n\n\n@click.command(short_help=\"Exports the schema\")\n@click.argument(\"schema\", type=str)\ndef export_schema(schema: str):\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    if not isinstance(schema_symbol, Schema):\n        message = \"The `schema` must be an instance of strawberry.Schema\"\n        raise click.BadArgumentUsage(message)\n    print(print_schema(schema_symbol))\n", "path": "strawberry/cli/commands/export_schema.py"}]}