graphql-client
graphql-client copied to clipboard
How to use `graphql_client` via a crate that re-exports it?
I've been running into a roadblock trying to set up a crate that re-exports graphql_client
and allows users of the crate to define queries using the GraphQL
macro without having to add graphql_client
to their Cargo.toml
. The error that occurs is: failed to resolve: could not find graphql_client in the list of imported crates
.
I was able to get my crate to compile by changing this line in graphql_client_codegen
from:
fn build_query(variables: Self::Variables) -> ::graphql_client::QueryBody<Self::Variables> {
to
fn build_query(variables: Self::Variables) -> graphql_client::QueryBody<Self::Variables> {
What is the recommendation on how to do this? Is there a way to achieve this functionality without having to change the codegen crate?