package
0.0.0-20190603091140-d91554c37e14
Repository: https://github.com/vaniila/hyper.git
Documentation: pkg.go.dev

# README

Example graphql upload server

How to use

$ go run main.go

$ curl -v -d "query=query{file}" http://localhost:4000/graphql
{"data":{"file":null},"errors":[{"message":"file has not been uploaded yet","locations":[]}]}

$ curl -v -XPOST -F "file=@./image.png" -F "query=mutation{upload}" http://localhost:4000/graphql
{"data":{"upload":"File uploaded: image/png type, 91653 bytes"}}

$ curl -v -d "query=query{file}" http://localhost:4000/graphql
{"data":{"file":"File exists: image/png type, 91653 bytes"}}