UNPKG

774 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.GqlArgumentsHost = void 0;
4const execution_context_host_1 = require("@nestjs/core/helpers/execution-context-host");
5class GqlArgumentsHost extends execution_context_host_1.ExecutionContextHost {
6 static create(context) {
7 const type = context.getType();
8 const gqlContext = new GqlArgumentsHost(context.getArgs());
9 gqlContext.setType(type);
10 return gqlContext;
11 }
12 getRoot() {
13 return this.getArgByIndex(0);
14 }
15 getArgs() {
16 return this.getArgByIndex(1);
17 }
18 getContext() {
19 return this.getArgByIndex(2);
20 }
21 getInfo() {
22 return this.getArgByIndex(3);
23 }
24}
25exports.GqlArgumentsHost = GqlArgumentsHost;