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?
@ebardie nobody is paid to work on this crate. PRs are welcome, several people have permissions to merge.
Sorry for my tone, I do appreciate the time and effort that makes the crate available to all.
I expressed myself unclearly. My frustration is that the more_quaified_paths feature hasn't been stabilsed in the compiler in the past two years, and not with this crate. Again though, the Rust compiler work is fueled by other people not at my expense, and my frustration isn't focused on the people but the process.
No worries, I'm aware how conveying tone in github issues is, I'm guilty of being a bit too dry sometimes :) I'd love for this to be fixed in either graphql-client or the compiler, of course...
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: