Skip to content

Commit

Permalink
Fixes #1039
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Aug 23, 2022
1 parent 722ba08 commit 181a0be
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parser/src/graphql.pest
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fragment_spread = { "..." ~ !type_condition ~ name ~ directives? }
inline_fragment = { "..." ~ type_condition? ~ directives? ~ selection_set }

fragment_definition = { "fragment" ~ name ~ type_condition ~ directives? ~ selection_set }
type_condition = { "on" ~ name }
type_condition = ${ "on" ~ WHITESPACE+ ~ name }

// Service //

Expand Down
2 changes: 1 addition & 1 deletion parser/src/parse/generated.rs

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions parser/tests/recursion_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,21 @@ fn test_recursion_limit() {
Error::RecursionLimitExceeded
);
}

#[test]
fn test_issue_1039() {
let query = r#"
fragment onboardingFull on OnboardingState {
license
}
query globalConfig {
globalConfig {
onboarding {
...onboardingFull
}
}
}
"#;
parse_query(query).unwrap();
}

0 comments on commit 181a0be

Please sign in to comment.