How to use the @nestjs/graphql.GqlArgumentsHost.create function in @nestjs/graphql

To help you get started, we’ve selected a few @nestjs/graphql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github penta-jelly / re-radio / server / src / core / exception.filter.ts View on Github external
catch(exception: CatchableException, host: ArgumentsHost) {
    const ctx = GqlArgumentsHost.create(host);
    const info = ctx.getInfo();
    const rawArgs = JSON.stringify(ctx.getArgs());
    this.log(exception, info, rawArgs);
    return this.transformException(exception);
  }
github jo0ger / node-server / src / common / filter / any-exception.filter.ts View on Github external
catch (exception: any, host: ArgumentsHost) {
    const gqlHost = GqlArgumentsHost.create(host)
    const { req, res } = gqlHost.getContext()
    return exception
  }
}