moonproof-indexer-client 0.2.2

Rust client for the Midnight indexer's GraphQL API
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum IndexerError {
    #[error("HTTP transport error: {0}")]
    Http(#[from] reqwest::Error),

    #[error("GraphQL error: {0}")]
    GraphQl(String),

    #[error("Indexer returned no data and no errors")]
    EmptyResponse,

    #[error("Invalid response shape: {0}")]
    InvalidResponse(String),

    #[error("Invalid URL: {0}")]
    InvalidUrl(#[from] url::ParseError),
}