UNPKG

499 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.getResponseKeyFromInfo = void 0;
4/**
5 * Get the key under which the result of this resolver will be placed in the response JSON. Basically, just
6 * resolves aliases.
7 * @param info The info argument to the resolver.
8 */
9function getResponseKeyFromInfo(info) {
10 return info.fieldNodes[0].alias != null ? info.fieldNodes[0].alias.value : info.fieldName;
11}
12exports.getResponseKeyFromInfo = getResponseKeyFromInfo;