Closed tony closed 5 years ago
Ofcourse, geel free for a pull request. Also this library is not finished yet!
Op zo 13 okt. 2019 05:15 schreef Tony Narlock notifications@github.com:
Saw your issue at 99designs/gqlgen#646 https://github.com/99designs/gqlgen/issues/646, i can't use LGPL. Can you do MIT (same license as gqlgen)?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/web-ridge/gqlgen-sqlboiler/issues/1?email_source=notifications&email_token=ABRRARKAXQEHQNM3TRGQAJLQOKHGJA5CNFSM4JAFHXYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRNAUQA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRRARJ5MCBTWNGRUHURKJ3QOKHGJANCNFSM4JAFHXYA .
@tony Basic converts are working now for most of the basic types!
func UserToGraphQL(m *models.User) *graphql_models.User {
if m == nil {
return nil
}
r := &graphql_models.User{
ID: UintToStringUniqueID(m.ID, "User"),
Name: m.Name,
LastName: m.LastName,
Email: m.Email,
Password: m.Password,
RememberToken: NullDotStringToPointerString(m.RememberToken),
CreatedAt: NullDotTimeToPointerInt(m.CreatedAt),
UpdatedAt: NullDotTimeToPointerInt(m.UpdatedAt),
DeletedAt: NullDotTimeToPointerInt(m.DeletedAt),
SendNotificationsOnNewCalamity: BoolToInt(m.SendNotificationsOnNewCalamity),
}
if UintIsZero(m.RoleID) {
if m.R == nil || m.R.Role == nil {
r.Role = RoleWithUintID(m.RoleID)
} else {
r.Role = RoleToGraphQL(m.R.Role)
}
}
return r
}
Saw your issue at https://github.com/99designs/gqlgen/issues/646, i can't use LGPL. Can you do MIT (same license as gqlgen)?