( source: any, args, contextValue, info, )
| 1557 | * of calling that function while passing along args and context value. |
| 1558 | */ |
| 1559 | export const defaultFieldResolver: GraphQLFieldResolver<unknown, unknown> = function ( |
| 1560 | source: any, |
| 1561 | args, |
| 1562 | contextValue, |
| 1563 | info, |
| 1564 | ) { |
| 1565 | // ensure source is a value for which property access is acceptable. |
| 1566 | if (isObjectLike(source) || typeof source === 'function') { |
| 1567 | const property = source[info.fieldName]; |
| 1568 | if (typeof property === 'function') { |
| 1569 | return source[info.fieldName](args, contextValue, info); |
| 1570 | } |
| 1571 | return property; |
| 1572 | } |
| 1573 | }; |
| 1574 | |
| 1575 | /** |
| 1576 | * Implements the "Subscribe" algorithm described in the GraphQL specification, |
no test coverage detected
searching dependent graphs…