UNPKG

486 BJavaScriptView Raw
1Object.defineProperty(exports, "__esModule", { value: true });
2/**
3 * Get the key under which the result of this resolver will be placed in the response JSON. Basically, just
4 * resolves aliases.
5 * @param info The info argument to the resolver.
6 */
7function getResponseKeyFromInfo(info) {
8 return info.fieldNodes[0].alias ? info.fieldNodes[0].alias.value : info.fieldName;
9}
10exports.getResponseKeyFromInfo = getResponseKeyFromInfo;
11//# sourceMappingURL=getResponseKeyFromInfo.js.map
\No newline at end of file