Skip to main content

morpho_rs_api/queries/
simulation.rs

1//! Vault simulation GraphQL queries.
2
3use graphql_client::GraphQLQuery;
4
5use crate::types::scalars::FlexBigInt;
6
7/// Custom scalar type mappings for GraphQL.
8pub type Address = String;
9pub type BigInt = FlexBigInt;
10pub type MarketId = String;
11pub type HexString = String;
12
13/// Query for fetching a single vault with simulation data.
14#[derive(GraphQLQuery)]
15#[graphql(
16    schema_path = "schema/morpho.graphql",
17    query_path = "queries/vault_simulation.graphql",
18    response_derives = "Debug, Clone",
19    variables_derives = "Debug, Clone"
20)]
21pub struct GetVaultForSimulation;
22
23/// Query for fetching multiple vaults with simulation data.
24#[derive(GraphQLQuery)]
25#[graphql(
26    schema_path = "schema/morpho.graphql",
27    query_path = "queries/vault_simulation.graphql",
28    response_derives = "Debug, Clone",
29    variables_derives = "Debug, Clone"
30)]
31pub struct GetVaultsForSimulation;