src/relay/resolver.js
function createEdgeInfo(resultset, offset, index) {
  const limit = offset - index;
  // retrieve full count from the first edge
  // or default 10
  let fullCount = resultset[0] &&
      resultset[0].fullCount &&
      parseInt(resultset[0].fullCount, 10);

  if (!resultset[0]) {
    fullCount = 0;
  }

  let hasNextPage = false;
  let hasPreviousPage = false;

  if (offset) {
    const requested = (index + 1) * limit;

    hasNextPage = requested < fullCount;
    hasPreviousPage = (requested > limit);
  }
  return {
    hasNextPage,
    hasPreviousPage
  };
}
function createEdgeInfo(resultset, offset, index) {
  const limit = offset - index;
  // retrieve full count from the first edge
  // or default 10
  let fullCount = resultset[0] &&
      resultset[0].fullCount &&
      parseInt(resultset[0].fullCount, 10);

  if (!resultset[0]) {
    fullCount = 0;
  }

  let hasNextPage = false;
  let hasPreviousPage = false;

  if (offset) {
    const requested = (index + 1) * limit;

    hasNextPage = requested < fullCount;
    hasPreviousPage = (requested > limit);
  }
  return {
    hasNextPage,
    hasPreviousPage
  };
}
function createEdgeInfo ( resultset , offset , index ) { const limit = offset - index ; // retrieve full count from the first edge // or default 10 let fullCount = resultset [ 0 ] && resultset [ 0 ] . fullCount && parseInt ( resultset [ 0 ] . fullCount , 10 ) ; if ( ! resultset [ 0 ] ) { fullCount = 0 ; } let hasNextPage = false ; let hasPreviousPage = false ; if ( offset ) { const requested = ( index + 1 ) * limit ; hasNextPage = requested < fullCount ; hasPreviousPage = ( requested > limit ) ; } return { hasNextPage , hasPreviousPage } ; }
Return location information
of an edge

@param resultset
@param offset
@param cursor
@returns {{hasMorePages: boolean, hasPreviousPage: boolean}}
Return location information of an edge