Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created December 10, 2021 05:07
Show Gist options
  • Save manakuro/eb7e913b01e1d44e9794c391cbfa963e to your computer and use it in GitHub Desktop.
Save manakuro/eb7e913b01e1d44e9794c391cbfa963e to your computer and use it in GitHub Desktop.
func (r *mutationResolver) CreateUser(ctx context.Context, input ent.CreateUserInput) (*ent.User, error) {
u, err := r.controller.User.Create(ctx, input)
if err != nil {
return nil, handler.HandleError(ctx, err)
}
return u, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment