From 651dc25dd15423f0c10cec3bb3a32fbd2da0468f Mon Sep 17 00:00:00 2001 From: Ariel Mashraki Date: Thu, 12 Sep 2019 02:49:23 -0700 Subject: [PATCH] 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 --- entc/integration/template/ent/template/node.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entc/integration/template/ent/template/node.tmpl b/entc/integration/template/ent/template/node.tmpl index c080e7e38..b4018adb6 100644 --- a/entc/integration/template/ent/template/node.tmpl +++ b/entc/integration/template/ent/template/node.tmpl @@ -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) {