fn all_blocks(
        &self,
        first: Option<i32>,
        last: Option<i32>,
        before: Option<BlockCursor>,
        after: Option<BlockCursor>,
        context: &Context,
    ) -> FieldResult<BlockConnection> {
        let longest_chain = context
            .db
            .get_latest_block_hash()
            .and_then(|hash| context.db.get_block(&hash))
            .wait()?
            .ok_or(ErrorKind::InternalError(
                "tip is not in explorer".to_owned(),
            ))
            .map(|block| block.chain_length)?;

        let block0 = blockcfg::ChainLength::from(0u32);

        BlockConnection::new(
            block0.into(),
            longest_chain.into(),
            first,
            last,
            before,
            after,
            &context.db,
        )
    }
/// query all the blocks in a paginated view
query all the blocks in a paginated view
query all the blocks in a paginated view
fn all_blocks(
        &self,
        first: Option<i32>,
        last: Option<i32>,
        before: Option<BlockCursor>,
        after: Option<BlockCursor>,
        context: &Context,
    ) -> FieldResult<BlockConnection> {
        let longest_chain = context
            .db
            .get_latest_block_hash()
            .and_then(|hash| context.db.get_block(&hash))
            .wait()?
            .ok_or(ErrorKind::InternalError(
                "tip is not in explorer".to_owned(),
            ))
            .map(|block| block.chain_length)?;
        let block0 = blockcfg::ChainLength::from(0u32);
        BlockConnection::new(
            block0.into(),
            longest_chain.into(),
            first,
            last,
            before,
            after,
            &context.db,
        )
    }
fn all_blocks ( & self , first : Option < i32 > , last : Option < i32 > , before : Option < BlockCursor > , after : Option < BlockCursor > , context : & Context , ) -> FieldResult < BlockConnection > { let longest_chain = context . db . get_latest_block_hash ( ) . and_then ( | hash | context . db . get_block ( & hash ) ) . wait ( ) ? . ok_or ( ErrorKind :: InternalError ( " " . to_owned ( ) , ) ) . map ( | block | block . chain_length ) ? ; let block0 = blockcfg :: ChainLength :: from ( 0u32 ) ; BlockConnection :: new ( block0 . into ( ) , longest_chain . into ( ) , first , last , before , after , & context . db , ) }
query all the blocks in a paginated view
query all the blocks in a paginated view
&self
first
Option<i32>
last
Option<i32>
before
Option<BlockCursor>
after
Option<BlockCursor>
context
&Context
&self
first
Option<i32>
last
Option<i32>
before
Option<BlockCursor>
after
Option<BlockCursor>
context
&Context