edgedb-python icon indicating copy to clipboard operation
edgedb-python copied to clipboard

"fastapi dev" flow

Open 1st1 opened this issue 7 months ago • 0 comments

  1. fastapi dev should work out of the box. Ideal setup: a user starts a new fastapi project, imports gel, runs 'gel init', and the rest (1️⃣ watching, 2️⃣ reflecting schema, 3️⃣ backups) is set up automatically.

  2. There should be a way to opt-out, via:

    • a setting in pyproject.toml [tools.gel]
      • scenario: you work alone, or the team doesn't want this)
    • via an env var GEL_FASTAPI_DEV=disabled
      • scenario: CI or some other weird edge case
    • in the future we should add support for .env.local themselves by having .no_gel_fastapi_dev file and ignoring it
  3. We need gel watch to accept command line arg gel watch --extend-gel-toml FILE with a location of a additional gel.toml file that might have additional hooks/settings. That additional file will not override, but will extend via

    gel.toml:

    [hooks]  # <--- new thing
    schema.update.after="cmd0"
    

    --extend-gel-toml:

    [hooks-extend]  # <--- new thing
    schema.update.after="cmd1"
    

    then the actual hook will be cmd0 && cmd1

1st1 avatar Jun 02 '25 18:06 1st1