Closed tobias-tengler closed 2 years ago
The MultiPart protocol is not supported yet. We will focus on more protocols with the June release. Same goes for defer which uses multipart in the response.
@michaelstaib What is the best alternative that can be used as a client till this feature is ready? I had a look at RestSharp and just create http request, works but is not nice solution. I am looking at other libraries and I am wondering if you can point me to the best one?
I don't think there is a C# library that covers the GraphQL multipart request specification from a client's perspective yet. Your best bet at the moment is probably either RestSharp or plain old HttpClient. :/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Since the Multipart request specification has now been implemented on the Server-side with version 11.1.0, I think it would be nice if StrawberryShake could take advantage of this.
Currently the
Upload
type is treated as a string. In my opinion there should be a new Type the user can instantiate, let's call itUploadable
for now. Which contains the (optional)Filename
as a string and theContent
as a Stream.Example:
For the above operation, StrawberryShake would generate the following signature for the matching user-facing
ExecuteAsync
method:The following
MultipartFormContent
would be sent to the GraphQL server:List of
Uploadable
s would be handled in a similar fashion according to the specification.What are your thoughts?