base-init

This commit is contained in:
2024-01-23 10:56:31 +03:00
parent e0a13423cc
commit 28685cba3e
2 changed files with 7 additions and 0 deletions

View File

@@ -1,10 +1,16 @@
import strawberry
from strawberry.schema.config import StrawberryConfig
from services.auth import LoginRequiredMiddleware
from resolvers.load import Query
from resolvers.seen import Mutation
from services.db import Base, engine
schema = strawberry.Schema(
query=Query, mutation=Mutation, config=StrawberryConfig(auto_camel_case=False), extensions=[LoginRequiredMiddleware]
)
# Create the specified tables if they do not already exist
Base.metadata.create_all(bind=engine, checkfirst=True)