From c2a08e0d8d900f8f05ad9e1724309133d35311fb Mon Sep 17 00:00:00 2001 From: Vincent Composieux Date: Sun, 10 Feb 2019 10:33:05 +0100 Subject: [PATCH] Added LICENSE file --- LICENSE | 21 +++++++++++++++++++++ README.md | 2 +- scalar.go | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a662a1d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Vincent Composieux + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 2a1150b..35db5c2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ graphql-go-upload [![TravisBuildStatus](https://api.travis-ci.org/eko/graphql-go-upload.svg?branch=master)](https://travis-ci.org/eko/graphql-go-upload) [![GoDoc](https://godoc.org/github.com/eko/graphql-go-upload?status.png)](https://godoc.org/github.com/eko/graphql-go-upload) -[![GoReportCard](https://goreportcard.com/badge/github.com/eko/graphql-go-upload)](https://goreportcard.com/badge/github.com/eko/graphql-go-upload) +[![GoReportCard](https://goreportcard.com/badge/github.com/eko/graphql-go-upload)](https://goreportcard.com/report/github.com/eko/graphql-go-upload) This library exposes a middleware for the [GraphQL-Go](https://github.com/graph-gophers/graphql-go) project in order to expose a new `Upload` scalar type and allow you to send `multipart/form-data` POST requests containing files and fields data. diff --git a/scalar.go b/scalar.go index 49c0004..d7c2ac5 100644 --- a/scalar.go +++ b/scalar.go @@ -40,7 +40,7 @@ func (u *GraphQLUpload) UnmarshalGraphQL(input interface{}) error { case map[string]interface{}: data, err := json.Marshal(input) if err != nil { - u = &GraphQLUpload{} + // Do nothing } else { json.Unmarshal(data, u) }