We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72813c7 commit 846cbd0Copy full SHA for 846cbd0
src/resolvers/helpers/projection.js
@@ -7,6 +7,10 @@ import type {
7
export function projectionHelper(resolveParams: ExtendedResolveParams): void {
8
const projection = resolveParams.projection;
9
if (projection) {
10
- resolveParams.query = resolveParams.query.select(projection); // eslint-disable-line
+ const flatProjection = {};
11
+ Object.keys(projection).forEach(key => {
12
+ flatProjection[key] = !!projection[key];
13
+ });
14
+ resolveParams.query = resolveParams.query.select(flatProjection); // eslint-disable-line
15
}
16
0 commit comments