You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to setup my queries and for the most part its being accepted by the rust compiler. However the Variables type is acting a bit weird. Basically I have to use the fully qualified syntax or I get an error "ambiguous associated type". So then I switch to the fully qualified syntax but then later in code the compiler will not allow me to instantiate an instance of the fully qualified type. What am I supposed to do?
I'm trying to setup my queries and for the most part its being accepted by the rust compiler. However the Variables type is acting a bit weird. Basically I have to use the fully qualified syntax or I get an error "ambiguous associated type". So then I switch to the fully qualified syntax but then later in code the compiler will not allow me to instantiate an instance of the fully qualified type. What am I supposed to do?
`
#[derive(GraphQLQuery)]
#[graphql(
query_path = "src/common/gql/transactions.graphql",
schema_path = "src/common/gql/schema.json",
response_derives = "Debug"
)]
pub struct TransactionsQuery;
#[allow(unused)]
pub async fn transactions(config: &Config, variables: ::Variables) -> Result<(), Box> {
let request_body = TransactionsQuery::build_query(variables);
let mut res = client.post(&config.arweave_gql_url)
.json(&request_body)
.send()
.await?;
let response_body: Response<::ResponseData> = res.json().await?;
println!("{:#?}", response_body);
}
async fn get(&self, tx_id: &str) -> Result<(), Box> {
let variables = ::Variables { // Fails here!
ids: Some(vec!["r5_3_wqF4KGDzLnpRv70sI_Z1pE5JAl71-Bi9yJA5-8".to_string()])
};
transactions(&self.config, variables).await?;
Ok(())
}
`
The text was updated successfully, but these errors were encountered: