Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected registerArgs(target: Object, propertyKey: string, options?: RelayedQueryOptions,) {
const ConnectionArgsThunk = Container.get(CONNECTIONARGS_OBJECT);
const ConnectionArgs = ConnectionArgsThunk();
if (options && options.paginationInputType) {
// We want our pagination to be a named input rather than args
const name = typeof options.paginationInputType === 'string' ? options.paginationInputType : 'pagination';
Reflect.defineMetadata('autorelay:connectionArgs:key', name, target, propertyKey)
Arg(name, () => ConnectionArgs, { nullable: true })(target, propertyKey, 99999999);
} else {
Args(() => ConnectionArgs)(target, propertyKey, 99999999);
}
}
}