(exeContext, parentType, sourceValue, path3, fields)
| 11535 | ); |
| 11536 | } |
| 11537 | function executeFields(exeContext, parentType, sourceValue, path3, fields) { |
| 11538 | const results = /* @__PURE__ */ Object.create(null); |
| 11539 | let containsPromise = false; |
| 11540 | try { |
| 11541 | for (const [responseName, fieldNodes] of fields.entries()) { |
| 11542 | const fieldPath = (0, _Path.addPath)(path3, responseName, parentType.name); |
| 11543 | const result = executeField( |
| 11544 | exeContext, |
| 11545 | parentType, |
| 11546 | sourceValue, |
| 11547 | fieldNodes, |
| 11548 | fieldPath |
| 11549 | ); |
| 11550 | if (result !== void 0) { |
| 11551 | results[responseName] = result; |
| 11552 | if ((0, _isPromise.isPromise)(result)) { |
| 11553 | containsPromise = true; |
| 11554 | } |
| 11555 | } |
| 11556 | } |
| 11557 | } catch (error) { |
| 11558 | if (containsPromise) { |
| 11559 | return (0, _promiseForObject.promiseForObject)(results).finally(() => { |
| 11560 | throw error; |
| 11561 | }); |
| 11562 | } |
| 11563 | throw error; |
| 11564 | } |
| 11565 | if (!containsPromise) { |
| 11566 | return results; |
| 11567 | } |
| 11568 | return (0, _promiseForObject.promiseForObject)(results); |
| 11569 | } |
| 11570 | function executeField(exeContext, parentType, source, fieldNodes, path3) { |
| 11571 | var _fieldDef$resolve; |
| 11572 | const fieldDef = getFieldDef(exeContext.schema, parentType, fieldNodes[0]); |
no test coverage detected