1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! infrahub graphql client
//!
//! this crate provides a small, typed client for the infrahub graphql api.
//! start with [`Client`] and [`ClientConfig`], then use `execute_raw` or
//! `execute` for ad-hoc queries. for generated schema clients, use the
//! `infrahub-codegen` tool to build a separate crate.
//!
//! ## quick start
//!
//! ```no_run
//! use infrahub::{Client, ClientConfig};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let client = Client::new(ClientConfig::new("http://localhost:8000", "token"))?;
//! let response = client
//! .execute_raw("{ InfrahubInfo { deployment_id version } }", None, None)
//! .await?;
//! println!("{:?}", response.data);
//! # Ok(())
//! # }
//! ```
//!
//! ## generated clients
//!
//! use `infrahub-codegen` to generate a schema-specific crate, then use it
//! alongside this base client.
pub use Client;
pub use ClientConfig;
pub use ;
pub use ;
pub use Operation;
pub use ;
pub use FileUpload;