MCPcopy Create free account
hub / github.com/cli/cli / formatGraphQLError

Function formatGraphQLError

script/ghmock/checker.go:224–229  ·  view source on GitHub ↗

formatGraphQLError turns a parser or validator error into a short line.

(message string, line, column int)

Source from the content-addressed store, hash-verified

222
223// formatGraphQLError turns a parser or validator error into a short line.
224func 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.
232func decodeBody(body []byte) (any, error) {

Callers 1

graphQLErrorTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected