Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIT License? #1

Closed
tony opened this issue Oct 13, 2019 · 2 comments · Fixed by #2
Closed

MIT License? #1

tony opened this issue Oct 13, 2019 · 2 comments · Fixed by #2

Comments

@tony
Copy link
Contributor

tony commented Oct 13, 2019

Saw your issue at 99designs/gqlgen#646, i can't use LGPL. Can you do MIT (same license as gqlgen)?

@RichardLindhout
Copy link
Member

RichardLindhout commented Oct 14, 2019 via email

tony added a commit to tony/gqlgen-sqlboiler that referenced this issue Oct 15, 2019
@RichardLindhout
Copy link
Member

RichardLindhout commented Nov 7, 2019

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

RichardLindhout pushed a commit that referenced this issue May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants