Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cutomization error for MaxUploadSize #1093

Closed

Conversation

keisku
Copy link

@keisku keisku commented Mar 6, 2020

Hi, I want to customize error even if using MaxUploadSize, so I added this file.
And I fixed an error when I stated the example app.
This PullRequest is related to #1089 (comment).

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@keisku keisku changed the title add cutomization error for MaxUploadSize Add cutomization error for MaxUploadSize Mar 6, 2020

srv := handler.New(fileupload.NewExecutableSchema(fileupload.Config{Resolvers: resolver}))

srv.AddTransport(transport.MultipartForm{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example is supposed to show how to configure the transport directly, not use the defaults

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not start example app on master without this changes.

What I did

  1. git checkout master
  2. go run
❯ go run example/fileupload/server/server.go 
2020/04/22 13:20:32 connect to http://localhost:8087/ for GraphQL playground
  1. checking this error on developer tool on Google Chrome.

スクリーンショット 2020-04-22 13 21 09

this example is supposed to show how to configure the transport directly, not use the defaults

could you check this commit?

ID: i + 1,
Name: req.File.Filename,
Content: string(content),
ContentType: req.File.ContentType,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes seem unrelated?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to #1074 changes, I think it is related.

@keisku keisku requested a review from vektah April 25, 2020 08:50
@stale
Copy link

stale bot commented Jul 24, 2020

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.

@stale stale bot added the stale label Jul 24, 2020
@vektah
Copy link
Collaborator

vektah commented Jul 26, 2020

Closing this as I don't think error messages need to be customized. If I ship this one, then theres another 100 prs full of similar requests.

If you think the default isn't good, propose an update
If you really do need to change it for your own reasons, create a copy of this transport and change it.

@stale stale bot removed the stale label Jul 26, 2020
@vektah vektah closed this Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants