Upgraded graphene to strawberry for python 3.13 compatibility#3
Open
ryanschostag wants to merge 9 commits into
Open
Upgraded graphene to strawberry for python 3.13 compatibility#3ryanschostag wants to merge 9 commits into
ryanschostag wants to merge 9 commits into
Conversation
… remove Graphene feat: replace deprecated `starlette.graphql.GraphQLApp` with `strawberry.fastapi.GraphQLRouter` and provide Strawberry schemas/mounts in: - `tutorial2/usecase1.py`, `tutorial2/usecase2.py` - `tutorial3/main.py` - `tutorial4/main.py` - `tutorial5/main.py` - `tutorial6/main.py` - `tutorial7/main.py` - `tutorial8/main.py` - `tutorial9/main.py` feat: convert Graphene schema modules to Strawberry types: - `tutorial3/schema.py` -> `Course` - `tutorial4/schema.py` -> `Employee` - `tutorial5/schema.py` -> `Weather` - `tutorial8/schema.py` -> `Player` interface, `FootballPlayer`, `CricketPlayer` - `tutorial9/schema.py` -> `FootballPlayer`, `CricketPlayer`, `Invalid` feat: convert Graphene mapping modules to Strawberry `Query` implementations: - `tutorial3/mapping.py`, `tutorial4/mapping.py`, `tutorial5/mapping.py`, `tutorial8/mapping.py`, `tutorial9/mapping.py` fix: correct data and resolver bugs, remove minor issues and cleanup - `tutorial2/usecase1.py`: fix typo `computer sience` → `computer science`; correct resolver parameter `into` → `info`. - `tutorial2/usecase2.py`: remove redundant imports and avoid shadowing built-in `int`; convert to Strawberry types. - `tutorial4/data.py`: use context manager (`with open`) and remove explicit `close()`. - `tutorial5/data.py`, `tutorial9/data.py`: remove duplicated `data=data = [...]`. - formatting/whitespace/trailing-newline cleanups across tutorials. fix: remove all `import graphene` usages across the tutorial modules. Notes: - External packages `fastapi` and `strawberry` are required at runtime; static diagnostics may appear until dependencies are installed. - Functionality preserved: resolvers now return typed Strawberry objects and routes are mounted at `/graphql` consistently.
… error, but import .data does not
…ant definitions in main
…r the data.csv file in tutorial4/data.csv where data.py could not find data.csv
…not through import errors duing app startup in uvicorn when running uvicorn from the root directory
…: Feat: replaced graphene with strawberry in tutorial modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
graphenewithstrawberrymainmodule whereapplives foruvicornuvicorn --host localhost --port 23647 --reload tutorial9.main:app