getResponseKeyFromInfo.js 486 B

1234567891011
  1. Object.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. */
  7. function getResponseKeyFromInfo(info) {
  8. return info.fieldNodes[0].alias ? info.fieldNodes[0].alias.value : info.fieldName;
  9. }
  10. exports.getResponseKeyFromInfo = getResponseKeyFromInfo;
  11. //# sourceMappingURL=getResponseKeyFromInfo.js.map