Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for (const arg of directive.arguments) {
args[arg.name.value] =
arg.value.kind === 'StringValue'
? format(
arg.value.value,
Object.assign(
{},
{
parent: source,
args: fieldArgs,
context
}
),
{partial: true}
)
: arg.value.value || GraphQLJSON.parseLiteral(arg.value);
}
args = Object.assign({}, args, fieldArgs);
return (
directiveConfig &&
directiveConfig.resolve &&
directiveConfig.resolve(resolve, source, args, context, info)
);
}
parseLiteral(value) {
return GraphQLJSON.parseLiteral(value);
},
});