git-bug/vendor/github.com/99designs/gqlgen/codegen/complexity.go
2019-05-15 15:04:57 +02:00

12 lines
195 B
Go

package codegen
func (o *Object) UniqueFields() map[string][]*Field {
m := map[string][]*Field{}
for _, f := range o.Fields {
m[f.GoFieldName] = append(m[f.GoFieldName], f)
}
return m
}