Refactor User struct to use pointer types for

UserName, Avatar, and Rank
This commit is contained in:
2023-11-21 14:10:39 +08:00
parent bd833c70b4
commit c7eb29db17
2 changed files with 6 additions and 3 deletions

View File

@@ -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)
}
}