Skip to content

Commit

Permalink
Workaround for empty results
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed May 11, 2023
1 parent 8068b87 commit 8fba6cc
Show file tree
Hide file tree
Showing 3 changed files with 478 additions and 131 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-icons-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-tools/delegate': patch
---

Workaround for empty results
6 changes: 5 additions & 1 deletion packages/delegate/src/checkResultAndHandleErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { DelegationContext } from './types.js';
import { resolveExternalValue } from './resolveExternalValue.js';

export function checkResultAndHandleErrors<TContext extends Record<string, any>>(
result: ExecutionResult,
// TODO: investigate the reason
result: ExecutionResult = {
data: null,
errors: [],
},
delegationContext: DelegationContext<TContext>
): any {
const {
Expand Down

0 comments on commit 8fba6cc

Please sign in to comment.