Skip to content

Commit

Permalink
Merge pull request #831 from yudppp/patch-1
Browse files Browse the repository at this point in the history
Fixed scalar reference documentation
  • Loading branch information
vvakame authored Aug 14, 2019
2 parents 6b70be0 + ca4cc73 commit 924f620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/reference/scalars.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Maps an arbitrary GraphQL value to a `interface{}` Go type.

## Custom scalars with user defined types

For user defined types you can implement the graphql.Marshal and graphql.Unmarshal interfaces and they will be called.
For user defined types you can implement the graphql.Marshaler and graphql.Unmarshaler interfaces and they will be called.

```go
package mypkg
Expand All @@ -62,7 +62,7 @@ import (

type YesNo bool

// UnmarshalGQL implements the graphql.Marshaler interface
// UnmarshalGQL implements the graphql.Unmarshaler interface
func (y *YesNo) UnmarshalGQL(v interface{}) error {
yes, ok := v.(string)
if !ok {
Expand Down

0 comments on commit 924f620

Please sign in to comment.