Skip to content

Commit f473895

Browse files
committed
graph: Remove subgraph name length limit
1 parent 09c4e31 commit f473895

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graph/src/data/subgraph/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ impl SubgraphName {
207207

208208
// Parse into components and validate each
209209
for part in s.split('/') {
210-
// Each part must be non-empty and not too long
211-
if part.is_empty() || part.len() > 32 {
210+
// Each part must be non-empty
211+
if part.is_empty() {
212212
return Err(());
213213
}
214214

@@ -890,7 +890,7 @@ fn test_subgraph_name_validation() {
890890
assert!(SubgraphName::new("aaaa+aaaaa").is_err());
891891
assert!(SubgraphName::new("a/graphql").is_err());
892892
assert!(SubgraphName::new("graphql/a").is_err());
893-
assert!(SubgraphName::new("this-component-is-longer-than-the-length-limit").is_err());
893+
assert!(SubgraphName::new("this-component-is-very-long-but-we-dont-care").is_ok());
894894
}
895895

896896
#[test]

0 commit comments

Comments
 (0)