Skip to content

Commit

Permalink
fix parsing of repeatable directives when cleaning up the sdl
Browse files Browse the repository at this point in the history
  • Loading branch information
reallistic committed Nov 19, 2024
1 parent e4a8101 commit 82ece57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ariadne/contrib/federation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
f"{_i_token_delimiter}directive"
f"(?:{_i_token_delimiter})?@({_i_token_name})"
f"(?:(?:{_i_token_delimiter})?{_i_token_arguments})?"
f"{_i_token_delimiter}on"
f"{_i_token_delimiter}(?:repeatable)?(?:{_i_token_delimiter})?on"
f"{_i_token_delimiter}(?:[|]{_i_token_delimiter})?{_i_token_location}"
f"(?:{_i_token_delimiter}[|]{_i_token_delimiter}{_i_token_location})*"
")"
Expand Down
2 changes: 2 additions & 0 deletions tests/federation/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def test_purge_directives_remove_custom_directives():
directive @another on FIELD
directive @plural repeatable on FIELD
type Query {
field1: String @custom
field2: String @other
Expand Down

0 comments on commit 82ece57

Please sign in to comment.