Skip to content

Commit f4c98c1

Browse files
authoredMar 1, 2024··
multiple argument syntax highlighting (#3534)
1 parent e502c41 commit f4c98c1

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed
 

‎.changeset/green-houses-raise.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'cm6-graphql': patch
3+
---
4+
5+
fix: multiple argument syntax highlighting

‎packages/cm6-graphql/__tests__/cases.txt

+10
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,13 @@ Document(
145145
)
146146
)
147147
)
148+
149+
# multiple arguments separated by a commas
150+
151+
{
152+
picture(width: 200, height: 100)
153+
}
154+
155+
==>
156+
157+
Document(OperationDefinition(SelectionSet("{",Selection(Field(FieldName,Arguments("(",Argument(ArgumentAttributeName,IntValue),Argument(ArgumentAttributeName,IntValue),")"))),"}")))

‎packages/cm6-graphql/src/syntax.grammar

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Directive { DirectiveName Arguments? }
291291
Arguments { "(" Argument+ ")"}
292292

293293
// https://spec.graphql.org/October2021/#Argument
294-
Argument { ArgumentAttributeName ":" value }
294+
Argument { ArgumentAttributeName ":" value comma? }
295295

296296
ArgumentAttributeName { name }
297297

0 commit comments

Comments
 (0)
Please sign in to comment.