Closed Dolfik1 closed 4 years ago
WIP
Summary of the changes
@Dolfik1 I will have to read into the multi-part spec how this feature is intended to be. With the new Utf8 parser that we are introducing with version 9 we are completely going away from working with strings. Basically, we are now using spans on byte to parse. This improves performance and reduces memory allocation. So, when we are introducing new parsers we have to do that in a similar way.
Do not worry about this part, I will look at that and try to introduce that in the new Utf8RequestParser
.
I have moved this to version 9.1.0 so we have enough time to get it right. Thanks for your work on this!
@Dolfik1 can you merge in the last changes from the master, then we will start moving forward on this one.
@Dolfik1 and thanks for you patience here. We will include it with version 9.1.
@Dolfik1 can you merge in the last changes from the master, then we will start moving forward on this one.
I am little bit busy at this moment, but I will try to merge this branch with master today or tomorrow.
just out of interest which graphql client do you use @Dolfik1 ? are there still clients out there which use multipart transport technology? I know apollo used them in the early days but replaced batching with json arrays.
@OneCyrus this is more about file uploads than batching... https://github.com/jaydenseric/graphql-upload
I still not like the spec of this. Since the upload scalar is only an input type and cannot be used as output type. This is in contrast to any other scalar.
Still this is used by Apollo and other graphql implementations.
I am currently refactoring our server implementation so that we are having a more modular system. This means that you will be able to add just the server modules that you want. So, with this you can actually say I do want to opt out of the upload scalar.
Work on this is ongoing here: https://github.com/ChilliCream/hotchocolate/pull/903
@OneCyrus regarding batching....
work on this is ongoing.... we have the basics in ... we now are looking at @export
and stuff like that.
@OneCyrus regarding batching....
work on this is ongoing.... we have the basics in ... we now are looking at
@export
and stuff like that.695
just thought because there is a MultipartQueryMiddleware in this PR which is not how apollo works anymore. https://blog.apollographql.com/batching-client-graphql-queries-a685f5bcd41b
@OneCyrus I know ... but this really more about file upload... still you could batch with this. But the batching story we are working on is separate from this one.
The actual batching is integrated in the post and get middleware.....
We will introduce a new batch executor for that.
But this pr is sitting here anyway without really moving forward. At one point I will have to look into how to handle files I think.
regarding batching ... I think we will move in a different direction than Apollo. I think that they put the result into a json list is not good since now you have to wait until all results are received.
But we should really talk about that here: https://github.com/ChilliCream/hotchocolate/issues/695
@Dolfik1 what was the state of this? Was it working already? I would like to get this into the next version.
Since nobody is picking this up we will park it in the multipart_request branch for now.
Hello @michaelstaib , i'm using latest version of the library and cann;t find Upload Type? is it not merged yet?
No, it was not finished. We parked it. Would you like to work on it?
Is this something that will be worked on in the near future? Looking for something to upload files/images via GraphQL using HotChocolate. Bumped into this PR but I'm sad it isn't finished yet.
Similar to @DeluxZ this would be a nice feature... Im trying to upload files using Relay which requires multipart form data for the 'uploadables' to work out of the box. Im going to attempt to just use a base64 string within the json instead as a workaround.
Summary of the changes