Skip to content

Commit

Permalink
Updated DEBUG Variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavberi committed Sep 14, 2024
1 parent 05ee9bf commit 4826184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
from otypes import Context, PyObjectIdType
from queries import queries

# check whether running in debug mode
DEBUG = int(getenv("GLOBAL_DEBUG", 0))

# create query types
Query = create_type("Query", queries)

Expand All @@ -34,6 +31,9 @@ async def get_context() -> Context:
scalar_overrides={PyObjectId: PyObjectIdType},
)

# check whether running in debug mode
DEBUG = getenv("GLOBAL_DEBUG", "False").lower() in ("true", "1", "t")

# serve API with FastAPI router
gql_app = GraphQLRouter(schema, graphiql=True, context_getter=get_context)
app = FastAPI(
Expand Down

0 comments on commit 4826184

Please sign in to comment.