src/custom.js
function resolveWithDirective(resolve, source, directive, context, info) {
  source = source || ((info || {}).variableValues || {}).input_0 || {};
  let directiveConfig = info.schema._directives.filter(
    d => directive.name.value === d.name,
  )[0];

  let args = {};

  for (let arg of directive.arguments) {
    args[arg.name.value] = arg.value.value;
  }

  return directiveConfig.resolve(resolve, source, args, context, info);
}
function resolveWithDirective(resolve, source, directive, context, info) {
  source = source || ((info || {}).variableValues || {}).input_0 || {};
  let directiveConfig = info.schema._directives.filter(
    d => directive.name.value === d.name,
  )[0];

  let args = {};

  for (let arg of directive.arguments) {
    args[arg.name.value] = arg.value.value;
  }

  return directiveConfig.resolve(resolve, source, args, context, info);
}
function resolveWithDirective ( resolve , source , directive , context , info ) { source = source || ( ( info || { } ) . variableValues || { } ) . input_0 || { } ; let directiveConfig = info . schema . _directives . filter ( d => directive . name . value === d . name , ) [ 0 ] ; let args = { } ; for ( let arg of directive . arguments ) { args [ arg . name . value ] = arg . value . value ; } return directiveConfig . resolve ( resolve , source , args , context , info ) ; }
resolving field using directive resolver
resolving field using directive resolver