Skip to main content

morpho_rs_api/queries/
v1.rs

1//! V1 vault 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 multiple V1 vaults with filters.
14#[derive(GraphQLQuery)]
15#[graphql(
16    schema_path = "schema/morpho.graphql",
17    query_path = "queries/vaults_v1.graphql",
18    response_derives = "Debug, Clone",
19    variables_derives = "Debug, Clone"
20)]
21pub struct GetVaultsV1;
22
23/// Query for fetching a single V1 vault by address.
24#[derive(GraphQLQuery)]
25#[graphql(
26    schema_path = "schema/morpho.graphql",
27    query_path = "queries/vaults_v1.graphql",
28    response_derives = "Debug, Clone",
29    variables_derives = "Debug, Clone"
30)]
31pub struct GetVaultV1ByAddress;