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;
10pub mod subscription;
11pub mod types;
12
13use url::Url;
14
15pub use self::{client::WasmerClient, error::GraphQLApiFailure};
16
17/// Api endpoint for the dev environment.
18pub const ENDPOINT_DEV: &str = "https://registry.wasmer.wtf/graphql";
19/// Api endpoint for the prod environment.
20pub const ENDPOINT_PROD: &str = "https://registry.wasmer.io/graphql";
21
22/// API endpoint for the dev environment.
23pub fn endpoint_dev() -> Url {
24    Url::parse(ENDPOINT_DEV).unwrap()
25}
26
27/// API endpoint for the prod environment.
28pub fn endpoint_prod() -> Url {
29    Url::parse(ENDPOINT_PROD).unwrap()
30}