Skip to content

Commit 18f6723

Browse files
authored
Improve error description formatting for validation failure
Instead of printing a literal array (brackets and all!) of errors, print each error on its own indented line.
1 parent 226f24e commit 18f6723

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apollo-ios-codegen/Sources/ApolloCodegenLib/ApolloCodegen+Errors.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ extension ApolloCodegen {
2323
switch self {
2424
case let .graphQLSourceValidationFailure(lines):
2525
return """
26-
An error occured during validation of the GraphQL schema or operations! Check \(lines)
26+
An error occured during validation of the GraphQL schema or operations! Check:
27+
\(lines.joined(separator: "\n "))
2728
"""
2829
case .testMocksInvalidSwiftPackageConfiguration:
2930
return """

0 commit comments

Comments
 (0)