gqlgen
gqlgen copied to clipboard
Override transport.MultipartForm UploadFileSize limit
What happened?
handler.NewDefaultServer
adds a default MultipartForm
transport which limits the UploadFileSize to 32MB. If I would like to override this file size limit, I think I would do something like, according to https://github.com/99designs/gqlgen/blob/master/example/fileupload/server/server.go#L29
server := handler.NewDefaultServer(...)
server.AddTransport(transport.MultipartForm{
MaxUploadSize: 100 << 20,
})
but I think this function will return the first transport.MultipartForm
https://github.com/99designs/gqlgen/blob/master/graphql/handler/server.go#L87
So the file size limit is not overrided
What did you expect?
Should allow later transport overrides previous ones
Minimal graphql.schema and models to reproduce
versions
-
gqlgen version
: v0.13.0 -
go version
: go1.16.3 - dep or go modules?
Can copy code from NewDefaultServer
and use NewServer
instead. That's what I do to remove not wanted items and add or modify others
Quite an annoying bug. Usually, you expect examples to be working and spend more time checking code elsewhere.
Is this issue still not resolved yet ?