notifier/resolvers/schema.py

16 lines
497 B
Python
Raw Normal View History

2023-12-17 22:20:13 +00:00
import strawberry
from strawberry.schema.config import StrawberryConfig
2023-12-17 11:42:04 +00:00
2023-12-17 11:47:05 +00:00
from services.auth import LoginRequiredMiddleware
2023-12-22 09:09:03 +00:00
from resolvers.load import Query
from resolvers.seen import Mutation
2024-01-23 07:56:31 +00:00
from services.db import Base, engine
2023-11-26 10:18:57 +00:00
2023-12-17 11:42:04 +00:00
schema = strawberry.Schema(
query=Query, mutation=Mutation, config=StrawberryConfig(auto_camel_case=False), extensions=[LoginRequiredMiddleware]
)
2024-01-23 07:56:31 +00:00
# Create the specified tables if they do not already exist
Base.metadata.create_all(bind=engine, checkfirst=True)