code: 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);
  }
docs: resolving field using directive resolver