Skip to content

Instantly share code, notes, and snippets.

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