Skip to content

Commit

Permalink
Fix facets test
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 committed Jan 29, 2020
1 parent c8d6ddc commit e8b9d95
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ func ExampleTxn_Mutate_facets() {
}

type Root struct {
Me []Person `json:"me"`
Me []json.RawMessage `json:"me"`
}

var r Root
Expand All @@ -754,33 +754,42 @@ func ExampleTxn_Mutate_facets() {
fmt.Printf("%s\n", out)
// Output: [
// {
// "name": "Alice",
// "name|origin": "Indonesia",
// "name": "Alice",
// "dgraph.type": [
// "Person"
// ],
// "friends": [
// {
// "name": "Bob",
// "friends|since": "2009-11-10T23:00:00Z",
// "friends|family": "yes",
// "friends|age": 13,
// "friends|close": true,
// "dgraph.type": [
// "Person"
// ]
// }
// ],
// "friends|since": "0001-01-01T00:00:00Z",
// "friends|age": {
// "0": 13
// },
// "friends|close": {
// "0": true
// },
// "friends|family": {
// "0": "yes"
// },
// "friends|since": {
// "0": "2009-11-10T23:00:00Z"
// },
// "school": [
// {
// "name": "Wellington School",
// "school|since": "2009-11-10T23:00:00Z",
// "dgraph.type": [
// "Institution"
// ]
// }
// ],
// "dgraph.type": [
// "Person"
// ]
// "school|since": {
// "0": "2009-11-10T23:00:00Z"
// }
// }
// ]
}
Expand Down

0 comments on commit e8b9d95

Please sign in to comment.