Closed trannon closed 4 days ago
hi @trannon, sorry about that, but have disabled multipart uploads by default, you can check the breaking change here: https://strawberry.rocks/docs/breaking-changes/0.243.0
I see, thank you for the quick response.
In my case, I am using the FastAPI integration and therefore I was able to restore the prior behavior by setting the multipart_uploads_enabled
flag as indicated in the new integration docs:
schema = strawberry.Schema(...)
graphql_app = GraphQLRouter(schema, multipart_uploads_enabled=True)
app = FastAPI()
app.include_router(graphql_app, prefix="/gql")
This is for an internal tool and therefore the security implications are not a factor.
@trannon thanks for getting back to us! Glad it's all good now 😊
Describe the Bug
I recently updated from Strawberry version 0.237.2 to 0.243.1. Under the prior version, I was able to submit queries to my graphql endpoints using a
multipart/form-data
POST like the following:However, under the newer version I started receiving a "Unsupported content type" 400 error with the same request.
This format is needed to send files and more complicated request use cases (with variables).
System Information
Steps to reproduce
This can be reproduced by creating a simple strawberry endpoint by following the "Getting Started" docs to create a
schema.py
file like this:Start the server by running
strawberry server schema
.Under both versions (0.237.2 and 0.243.1), the following curl request WORKS:
The following request format works under the older version 0.237.2, but does NOT work under the newer version 0.243.1:
Upvote & Fund