Skip to content
Snippets Groups Projects
Unverified Commit b555a00d authored by Pawan Rawal's avatar Pawan Rawal
Browse files

For Go client, run mutations that are part of the query string.

parent fd5b1887
No related branches found
No related tags found
No related merge requests found
......@@ -650,6 +650,15 @@ func (s *grpcServer) Run(ctx context.Context,
return resp, err
}
// If mutations are part of the query, we run them through the mutation handler
// same as the http client.
if res.Mutation != nil && (len(res.Mutation.Set) > 0 || len(res.Mutation.Del) > 0) {
if allocIds, err = mutationHandler(ctx, res.Mutation); err != nil {
x.TraceError(ctx, x.Wrapf(err, "Error while handling mutations"))
return resp, err
}
}
// Mutations are sent as part of the mutation object
if req.Mutation != nil && (len(req.Mutation.Set) > 0 || len(req.Mutation.Del) > 0) {
if allocIds, err = runMutations(ctx, req.Mutation); err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment