diff --git a/src/language-graphql/printer-graphql.js b/src/language-graphql/printer-graphql.js index 70f0df48a..9ee35aa48 100644 --- a/src/language-graphql/printer-graphql.js +++ b/src/language-graphql/printer-graphql.js @@ -380,6 +380,7 @@ function genericPrint(path, options, print) { ]) ) : "", + n.repeatable ? " repeatable" : "", concat([" on ", join(" | ", path.map(print, "locations"))]) ]); } diff --git a/tests/graphql_directive_decl/__snapshots__/jsfmt.spec.js.snap b/tests/graphql_directive_decl/__snapshots__/jsfmt.spec.js.snap index 868f52f0f..15439bb2b 100644 --- a/tests/graphql_directive_decl/__snapshots__/jsfmt.spec.js.snap +++ b/tests/graphql_directive_decl/__snapshots__/jsfmt.spec.js.snap @@ -12,8 +12,10 @@ directive @a(as: String = 1) on QUERY directive @a(as: String, b: Int!) on QUERY directive @a(as: String! = 1 @deprecated) on QUERY directive @a(as: String! = 1 @deprecated) on QUERY | MUTATION +directive @a(as: String! = 1 @deprecated) repeatable on QUERY | MUTATION directive @a on QUERY +directive @a repeatable on QUERY directive @a(as: String) on QUERY @@ -30,8 +32,10 @@ directive @a(as: String = 1) on QUERY directive @a(as: String, b: Int!) on QUERY directive @a(as: String! = 1 @deprecated) on QUERY directive @a(as: String! = 1 @deprecated) on QUERY | MUTATION +directive @a(as: String! = 1 @deprecated) repeatable on QUERY | MUTATION directive @a on QUERY +directive @a repeatable on QUERY directive @a(as: String) on QUERY diff --git a/tests/graphql_directive_decl/directive_decl.graphql b/tests/graphql_directive_decl/directive_decl.graphql index 531c6112f..318e0552b 100644 --- a/tests/graphql_directive_decl/directive_decl.graphql +++ b/tests/graphql_directive_decl/directive_decl.graphql @@ -4,8 +4,10 @@ directive @a(as: String = 1) on QUERY directive @a(as: String, b: Int!) on QUERY directive @a(as: String! = 1 @deprecated) on QUERY directive @a(as: String! = 1 @deprecated) on QUERY | MUTATION +directive @a(as: String! = 1 @deprecated) repeatable on QUERY | MUTATION directive @a on QUERY +directive @a repeatable on QUERY directive @a(as: String) on QUERY