Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
EmrysMyrddin committed Jul 25, 2023
1 parent af995bd commit 1ff2c0d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/utils/src/resolve-additional-resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ export function resolveAdditionalResolversWithoutImport(
const resolverData = { root, args, context, info, env: process.env };
const targetArgs: any = {};

deeplySetArgs(resolverData, { targetArgs }, 'targetArgs', additionalResolver.sourceArgs)
deeplySetArgs(
resolverData,
{ targetArgs },
'targetArgs',
additionalResolver.sourceArgs,
);

const options: any = {
...baseOptions,
Expand Down Expand Up @@ -320,16 +325,12 @@ export function resolveAdditionalResolvers(
);
}


function deeplySetArgs(resolverData: any, args: object, path: string, value: any) {
if (typeof value === 'string') {
dset(args, path, stringInterpolator.parse(
value.toString(),
resolverData,
))
dset(args, path, stringInterpolator.parse(value.toString(), resolverData));
} else {
for (const key in value) {
deeplySetArgs(resolverData, args, `${path}.${key}`, value[key])
deeplySetArgs(resolverData, args, `${path}.${key}`, value[key]);
}
}
}

0 comments on commit 1ff2c0d

Please sign in to comment.