Refactor User struct to use pointer types for
UserName, Avatar, and Rank
This commit is contained in:
@@ -106,6 +106,9 @@ func NewSchema() (graphql.Schema, error) {
|
||||
for _, field := range fieldAST.SelectionSet.Selections {
|
||||
fieldAST, ok := field.(*ast.Field)
|
||||
if ok {
|
||||
//if fieldAST.Name.Value == "avatar" {
|
||||
// fieldAST.Name.Value = fmt.Sprintf("IFNULL(%s,'')", fieldAST.Name.Value)
|
||||
//}
|
||||
fields = append(fields, fieldAST.Name.Value)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user