Skip to content

Commit e084d7b

Browse files
authored
Don't drop repeatable keyword when formatting directive (#256)
1 parent 25e09f9 commit e084d7b

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

formatter/formatter.go

+4
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ func (f *formatter) FormatDirectiveDefinition(def *ast.DirectiveDefinition) {
360360
f.FormatArgumentDefinitionList(def.Arguments)
361361
}
362362

363+
if def.IsRepeatable {
364+
f.WriteWord("repeatable")
365+
}
366+
363367
if len(def.Locations) != 0 {
364368
f.WriteWord("on")
365369

Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
directive @bar repeatable on FIELD | OBJECT
12
directive @foo on FIELD | OBJECT
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
directive @foo on FIELD | OBJECT
2+
directive @bar repeatable on FIELD | OBJECT
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
directive @foo on FIELD|OBJECT
2+
directive @bar repeatable on FIELD|OBJECT

0 commit comments

Comments
 (0)