diff --git a/query/graphql/planner/update.go b/query/graphql/planner/update.go index 8ed408193a..c20086e16b 100644 --- a/query/graphql/planner/update.go +++ b/query/graphql/planner/update.go @@ -138,7 +138,7 @@ func (n *updateNode) Close() error { return n.results.Close() } -func (n *updateNode) Source() planNode { return nil } +func (n *updateNode) Source() planNode { return n.results } // Explain method returns a map containing all attributes of this node that // are to be explained, subscribes / opts-in this node to be an explainablePlanNode. diff --git a/tests/integration/mutation/simple/update/explain_simple_update_test.go b/tests/integration/mutation/simple/update/explain_simple_update_test.go index c2e647e9e5..4022a5802e 100644 --- a/tests/integration/mutation/simple/update/explain_simple_update_test.go +++ b/tests/integration/mutation/simple/update/explain_simple_update_test.go @@ -69,6 +69,19 @@ func TestExplainSimpleMutationUpdateWithBooleanFilter(t *testing.T) { }, }, "ids": []string(nil), + "selectTopNode": dataMap{ + "renderNode": dataMap{ + "selectNode": dataMap{ + "filter": nil, + "scanNode": dataMap{ + "collectionID": "1", + "collectionName": "user", + "filter": nil, + "spans": []dataMap{}, + }, + }, + }, + }, }, }, }, @@ -128,6 +141,19 @@ func TestExplainSimpleMutationUpdateWithIdInFilter(t *testing.T) { "bae-0a24cf29-b2c2-5861-9d00-abd6250c475d", "bae-958c9334-73cf-5695-bf06-cf06826babfa", }, + "selectTopNode": dataMap{ + "renderNode": dataMap{ + "selectNode": dataMap{ + "filter": nil, + "scanNode": dataMap{ + "collectionID": "1", + "collectionName": "user", + "filter": nil, + "spans": []dataMap{}, + }, + }, + }, + }, }, }, }, @@ -180,6 +206,19 @@ func TestExplainSimpleMutationUpdateWithIdEqualsFilter(t *testing.T) { "ids": []string{ "bae-0a24cf29-b2c2-5861-9d00-abd6250c475d", }, + "selectTopNode": dataMap{ + "renderNode": dataMap{ + "selectNode": dataMap{ + "filter": nil, + "scanNode": dataMap{ + "collectionID": "1", + "collectionName": "user", + "filter": nil, + "spans": []dataMap{}, + }, + }, + }, + }, }, }, },