horizon-sdk 16.0.0

Canonical Rust data access layer for the Horizon platform
//! Schema-checked GraphQL operations for the Horizon API.
//!
//! `graphql_client` validates each document in `graphql/` at compile time
//! against `graphql/schema.graphql`, a committed copy that `horizon-app`'s
//! `schema:export` writes alongside its own, so a breaking schema change fails
//! the SDK build.

#![allow(
    clippy::all,
    clippy::nursery,
    clippy::pedantic,
    clippy::restriction,
    non_camel_case_types,
    reason = "graphql_client generates these modules and the scalar aliases must match schema names"
)]

use graphql_client::GraphQLQuery;

pub use crate::types::model::DataCollectionStatus;

type BigInt = String;
type Datetime = chrono::DateTime<chrono::Utc>;
type JSON = serde_json::Value;
type UUID = uuid::Uuid;

/// The `createDataCollection` mutation.
#[derive(GraphQLQuery)]
#[graphql(
    schema_path = "graphql/schema.graphql",
    query_path = "graphql/create_data_collection.graphql",
    extern_enums("DataCollectionStatus"),
    response_derives = "Debug",
    skip_serializing_none,
    variables_derives = "Debug"
)]
pub struct CreateDataCollection;

/// The `createDataCollectionInterval` mutation.
#[derive(GraphQLQuery)]
#[graphql(
    schema_path = "graphql/schema.graphql",
    query_path = "graphql/create_data_collection_interval.graphql",
    extern_enums("DataCollectionStatus"),
    response_derives = "Debug",
    skip_serializing_none,
    variables_derives = "Debug"
)]
pub struct CreateDataCollectionInterval;