Skip to content

Commit

Permalink
fix undefined $select when using resolveResult hook
Browse files Browse the repository at this point in the history
Without this code, an extra `$select: undefined` is added to queries.  This little update fixes that issue.
  • Loading branch information
marshallswain authored Nov 27, 2023
1 parent ff3e104 commit a275dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/schema/src/hooks/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const resolveResult = <H extends HookContext>(...resolvers: Resolver<any,
resolve,
query: {
...query,
...(!hasVirtualSelects ? { $select } : {})
...(!!$select && !hasVirtualSelects ? { $select } : {})
}
}

Expand Down

0 comments on commit a275dc7

Please sign in to comment.