formatGraphQLError turns a parser or validator error into a short line.
(message string, line, column int)
| 222 | |
| 223 | // formatGraphQLError turns a parser or validator error into a short line. |
| 224 | func formatGraphQLError(message string, line, column int) string { |
| 225 | if line == 0 { |
| 226 | return message |
| 227 | } |
| 228 | return fmt.Sprintf("line %d, column %d: %s", line, column, message) |
| 229 | } |
| 230 | |
| 231 | // decodeBody decodes a JSON body, keeping numbers exact. |
| 232 | func decodeBody(body []byte) (any, error) { |