Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
qhenkart committed Apr 22, 2019
1 parent ca96a15 commit 85643f5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions graphql/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ package graphql
import (
"encoding/json"
"io"

"github.com/qhenkart/gqlgen/graphql"
)

func MarshalInterface(v interface{}) Marshaler {
return graphql.WriterFunc(func(w io.Writer) {
err := json.NewEncoder(w).Encode(val)
return WriterFunc(func(w io.Writer) {
err := json.NewEncoder(w).Encode(v)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 85643f5

Please sign in to comment.