mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-03-28 02:05:37 +01:00
15 lines
467 B
Rust
15 lines
467 B
Rust
use crate::introspection::IntrospectionResponse;
|
|
use crate::{config::Config, engine::Engine, session::Session};
|
|
|
|
pub async fn get_schema() -> eyre::Result<IntrospectionResponse> {
|
|
let cfg = Config::default();
|
|
|
|
//TODO: Implement context for proc
|
|
let (conn, _proc) = Engine::new().start(&cfg).await?;
|
|
let session = Session::new();
|
|
let req_builder = session.start(&cfg, &conn)?;
|
|
let schema = session.schema(req_builder).await?;
|
|
|
|
Ok(schema)
|
|
}
|