mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
graph/ent: add node template and codegen
Summary: This change allows to call `Client.Node` to get node info. ``` node, err := client.Node(ctx, id) ``` Reviewed By: dlvhdr Differential Revision: D17341682 fbshipit-source-id: bed1fe018cca7f5048a624b50b1f5cc6cc3507f3
This commit is contained in:
committed by
Facebook Github Bot
parent
5c9c99f5db
commit
651dc25dd1
@@ -83,7 +83,7 @@ type Edge struct {
|
||||
var (
|
||||
once sync.Once
|
||||
types []string
|
||||
typeNodes = make(map[string]func(ctx context.Context, id {{ $.IDType }})(*Node, error))
|
||||
typeNodes = make(map[string]func(context.Context, {{ $.IDType }})(*Node, error))
|
||||
)
|
||||
|
||||
func (c *Client) Node(ctx context.Context, id {{ $.IDType }}) (*Node, error) {
|
||||
|
||||
Reference in New Issue
Block a user