Skip to content

Commit 237c659

Browse files
committed
Fetcher
1 parent db7c131 commit 237c659

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

packages/libraries/router/src/registry.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl HiveRegistry {
8383
}
8484

8585
// Resolve values
86-
let mut endpoint = config.endpoint.unwrap_or_default();
86+
let endpoint = config.endpoint.unwrap_or_default();
8787
let key = config.key.unwrap_or_default();
8888
let poll_interval: u64 = config.poll_interval.unwrap_or(10);
8989
let accept_invalid_certs = config.accept_invalid_certs.unwrap_or(false);
@@ -103,14 +103,6 @@ impl HiveRegistry {
103103
return Err(anyhow!("environment variable HIVE_CDN_ENDPOINT not found",));
104104
}
105105

106-
if !endpoint.ends_with("/supergraph") {
107-
if endpoint.ends_with("/") {
108-
endpoint.push_str("supergraph")
109-
} else {
110-
endpoint.push_str("/supergraph")
111-
}
112-
}
113-
114106
// Throw if key is empty
115107
if key.is_empty() {
116108
return Err(anyhow!("environment variable HIVE_CDN_KEY not found"));

packages/libraries/sdk-rs/src/supergraph_fetcher.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ impl SupergraphFetcher {
1414
key: String,
1515
accept_invalid_certs: bool,
1616
) -> Result<Self, String> {
17-
if endpoint.is_empty() {
18-
return Err("Supergraph endpoint is required".into());
19-
}
20-
if key.is_empty() {
21-
return Err("Supergraph key is required".into());
22-
}
2317
let mut endpoint = endpoint;
2418
if !endpoint.ends_with("/supergraph") {
2519
if endpoint.ends_with("/") {

0 commit comments

Comments
 (0)