daemon/indexing/apollo/index.js
function relatedUserResolver(walletAddress, info){
  const requestedFields = info.fieldNodes[0].selectionSet.selections
  const isIdOnly = requestedFields.filter(x => x.name.value !== 'walletAddress')
    .length === 0
  if (isIdOnly) {
    return { walletAddress: walletAddress }
  } else {
    return search.User.get(walletAddress)
  }
}
function relatedUserResolver(walletAddress, info){
  const requestedFields = info.fieldNodes[0].selectionSet.selections
  const isIdOnly = requestedFields.filter(x => x.name.value !== 'walletAddress')
    .length === 0
  if (isIdOnly) {
    return { walletAddress: walletAddress }
  } else {
    return search.User.get(walletAddress)
  }
}
function relatedUserResolver ( walletAddress , info ) { const requestedFields = info . fieldNodes [ 0 ] . selectionSet . selections const isIdOnly = requestedFields . filter ( x => x . name . value !== 'walletAddress' ) . length === 0 if ( isIdOnly ) { return { walletAddress : walletAddress } } else { return search . User . get ( walletAddress ) } }
Gets information on a related user.
Includes short-circut code to skip the user look up
if the walletAddress is the only field required.
@param {string} walletAddress
@param {object} info
Gets information on a related user . Includes short - circut code to skip the user look up if the walletAddress is the only field required .