Skip to content

Commit df4069c

Browse files
committed
Code review fixes and upgrade strawberry
1 parent 18f7273 commit df4069c

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

fastapi-sqlalchemy/alembic/versions/9bc8667ab6a6_add_initial_models.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818

1919
def upgrade():
20-
# ### commands auto generated by Alembic - please adjust! ###
2120
op.create_table(
2221
"directors",
2322
sa.Column("id", sa.Integer(), nullable=False),
@@ -45,15 +44,12 @@ def upgrade():
4544
)
4645
op.create_index(op.f("ix_movies_id"), "movies", ["id"], unique=False)
4746
op.create_index(op.f("ix_movies_imdb_id"), "movies", ["imdb_id"], unique=True)
48-
# ### end Alembic commands ###
4947

5048

5149
def downgrade():
52-
# ### commands auto generated by Alembic - please adjust! ###
5350
op.drop_index(op.f("ix_movies_imdb_id"), table_name="movies")
5451
op.drop_index(op.f("ix_movies_id"), table_name="movies")
5552
op.drop_table("movies")
5653
op.drop_index(op.f("ix_directors_name"), table_name="directors")
5754
op.drop_index(op.f("ix_directors_id"), table_name="directors")
5855
op.drop_table("directors")
59-
# ### end Alembic commands ###

fastapi-sqlalchemy/alembic/versions/bea5e58f3328_add_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
current_dir = Path(__file__).parent.resolve()
26-
data_file = current_dir.parent.parent.parent / Path("common-data") / Path("movies.json")
26+
data_file = current_dir.parent.parent.parent / "common-data" / "movies.json"
2727

2828

2929
def upgrade():

fastapi-sqlalchemy/api/schema.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ def on_request_end(self):
1919

2020
@strawberry.type
2121
class Query:
22-
@strawberry.field
23-
def ping(self) -> str:
24-
return "pong"
25-
2622
@strawberry.field
2723
def top_rated_movies(self, info, limit: int = 250) -> List[Movie]:
2824
db = info.context["db"]

fastapi-sqlalchemy/poetry.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fastapi-sqlalchemy/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python = "^3.7"
99
uvicorn = {extras = ["standard"], version = "^0.15.0"}
1010
SQLAlchemy = {extras = ["mypy"], version = "^1.4.23"}
1111
alembic = "^1.7.1"
12-
strawberry-graphql = {extras = ["asgi"], version = "^0.76.0"}
12+
strawberry-graphql = {extras = ["asgi"], version = "^0.77.0"}
1313
fastapi = "^0.68.1"
1414

1515

0 commit comments

Comments
 (0)