Created
December 10, 2021 04:43
-
-
Save manakuro/3724b66f4a9f09caeb3d38762cfb0b4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (r *queryResolver) User(ctx context.Context, id *int) (*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