INNER CODE UNIT · Rust
generate_module_token_stream
graphql-rust/graphql-client · graphql_client_codegen/src/lib.rs:96
pub fn generate_module_token_stream(
query_path: std::path::PathBuf,
schema_path: &std::path::Path,
options: GraphQLClientCodegenOptions,
) -> Result<TokenStream, BoxError> {
let query = get_set_query_from_file(query_path.as_path());
let schema = get_set_schema_from_file(schema_path);
generate_module_token_stream_inner(&query, &schema, options)
}
/// Generates Rust code given a query string, a path to a schema file, and options.
pub fn generate_module_token_stream_from_string(
query_string: &str,
schema_path: &std::path::Path,
options: GraphQLClientCodegenOptions,
) -> Result<TokenStream, BoxError> {
let query = (query_string.to_string(), query_document(query_string)?);