Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created December 10, 2021 04:50
Show Gist options
  • Save manakuro/c7ed9d45070135a4a19fd28cfc9f45d0 to your computer and use it in GitHub Desktop.
Save manakuro/c7ed9d45070135a4a19fd28cfc9f45d0 to your computer and use it in GitHub Desktop.
func (r *queryResolver) User(ctx context.Context, id *ulid.ID) (*ent.User, error) {
u, err := r.controller.User.Get(ctx, id)
if err != nil {
return nil, err
}
return u, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment