wasmer_backend_api/
lib.rs

1// Allowed because it makes code more readable.
2#![allow(clippy::bool_comparison, clippy::match_like_matches_macro)]
3
4mod client;
5mod error;
6
7pub mod global_id;
8pub mod query;
9pub mod stream;
10#[cfg(feature = "sys")]
11pub mod subscription;
12pub mod types;
13
14use url::Url;
15
16pub use self::{client::WasmerClient, error::GraphQLApiFailure};
17
18/// Api endpoint for the dev environment.
19pub const ENDPOINT_DEV: &str = "https://registry.wasmer.wtf/graphql";
20/// Api endpoint for the prod environment.
21pub const ENDPOINT_PROD: &str = "https://registry.wasmer.io/graphql";
22
23/// API endpoint for the dev environment.
24pub fn endpoint_dev() -> Url {
25    Url::parse(ENDPOINT_DEV).unwrap()
26}
27
28/// API endpoint for the prod environment.
29pub fn endpoint_prod() -> Url {
30    Url::parse(ENDPOINT_PROD).unwrap()
31}