morpho_rs_api/queries/
user.rs

1//! User 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 user's vault positions (V1 and V2).
14#[derive(GraphQLQuery)]
15#[graphql(
16    schema_path = "schema/morpho.graphql",
17    query_path = "queries/user.graphql",
18    response_derives = "Debug, Clone",
19    variables_derives = "Debug, Clone"
20)]
21pub struct GetUserVaultPositions;
22
23/// Query for fetching a user's account overview including all positions.
24#[derive(GraphQLQuery)]
25#[graphql(
26    schema_path = "schema/morpho.graphql",
27    query_path = "queries/user.graphql",
28    response_derives = "Debug, Clone",
29    variables_derives = "Debug, Clone"
30)]
31pub struct GetUserAccountOverview;