GraphQL: Fix directives separator (#2315)

I couldn't figure out what the separator was, I tried `,`, `on` but none of them worked. Turns out it is `|`!
master
Christopher Chedeau 2017-06-27 19:58:38 -07:00 committed by GitHub
parent 14caabd635
commit 019beb54e5
3 changed files with 5 additions and 1 deletions

View File

@ -281,7 +281,7 @@ function genericPrint(path, options, print) {
])
)
: "",
concat([" on ", join(", ", path.map(print, "locations"))])
concat([" on ", join(" | ", path.map(print, "locations"))])
]);
}

View File

@ -6,6 +6,7 @@ directive @a(as: String) on FIELD1
directive @a(as: String = 1) on FIELD1
directive @a(as: String, b: Int!) on FIELD1
directive @a(as: String! = 1 @deprecated) on FIELD1
directive @a(as: String! = 1 @deprecated) on FIELD1 | FIELD2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
directive @a on FIELD1
@ -17,4 +18,6 @@ directive @a(as: String, b: Int!) on FIELD1
directive @a(as: String! = 1 @deprecated) on FIELD1
directive @a(as: String! = 1 @deprecated) on FIELD1 | FIELD2
`;

View File

@ -3,3 +3,4 @@ directive @a(as: String) on FIELD1
directive @a(as: String = 1) on FIELD1
directive @a(as: String, b: Int!) on FIELD1
directive @a(as: String! = 1 @deprecated) on FIELD1
directive @a(as: String! = 1 @deprecated) on FIELD1 | FIELD2