Skip to content

Commit

Permalink
error-handeling-on-executor
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik1729 authored Dec 20, 2023
1 parent 5eb33ed commit f5d62c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/server/helpers/execute-query-with-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ export const ExecuteQueryWithContext = (
},
});

let { data } = resp.data;
let { data,errors } = resp.data;
if(errors){
throw new Error(JSON.stringify(errors))
}

if (data) {
data = transformer(data);
Expand Down

0 comments on commit f5d62c4

Please sign in to comment.