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 third party library to handle POST/GET request with batch and uploads feature #578

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jpascal
Copy link

@jpascal jpascal commented Oct 29, 2020

Middleware and an Upload scalar to add support for GraphQL multipart requests (file uploads via queries and mutations) to various golang GraphQL servers.

Usage

server := &http.Server{
	Addr: "0.0.0.0:5000", 
	Handler: handler.New(func(request *handler.Request) interface{} {
		return graphql.Do(graphql.Params{
			RequestString:  request.Query,
			OperationName:  request.OperationName,
			VariableValues: request.Variables,
			Schema:         schema.New(),
			Context:        request.Context,
		})
	}, &handler.Config {MaxBodySize: 1024}),
}
    server.ListenAndServe()

@jpascal jpascal changed the title Add third party libraries to handle POST/GET request with batch and uploads feature Add third party library to handle POST/GET request with batch and uploads feature Oct 29, 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.

1 participant