-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #544 from supabase/fix_comment_directive_parsing
fix a bug in which a closing parenthesis in @graphql directive failed to parse as json
- Loading branch information
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField"})' | ||
) | ||
); | ||
comment_directive | ||
--------------------- | ||
{"name": "myField"} | ||
(1 row) | ||
|
||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField with (parentheses)"})' | ||
); | ||
comment_directive | ||
---------------------------------------- | ||
{"name": "myField with (parentheses)"} | ||
(1 row) | ||
|
||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField with a (starting parenthesis"})' | ||
); | ||
comment_directive | ||
-------------------------------------------------- | ||
{"name": "myField with a (starting parenthesis"} | ||
(1 row) | ||
|
||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField with an ending parenthesis)"})' | ||
); | ||
comment_directive | ||
------------------------------------------------- | ||
{"name": "myField with an ending parenthesis)"} | ||
(1 row) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField"})' | ||
) | ||
); | ||
|
||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField with (parentheses)"})' | ||
); | ||
|
||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField with a (starting parenthesis"})' | ||
); | ||
|
||
select | ||
graphql.comment_directive( | ||
comment_ := '@graphql({"name": "myField with an ending parenthesis)"})' | ||
); |