GraphQLResponseError
data class GraphQLResponseError(val message: String, val locations: List<GraphQLResponseError.Location>? = null, val path: List<GraphQLPathSegment>? = null, val extensions: GraphQLValue.ObjectValue? = null)(source)
Backend-neutral, spec-compliant GraphQL error entry.
GraphQLResponseError is the neutral counterpart of the legacy co.anitrend.retrofit.graphql.model.attribute.GraphError. Unlike the legacy type, message is required and non-null because a spec-compliant error always carries a message.
Usage
val error = GraphQLResponseError(
message = "Cannot query field 'logins' on type 'User'.",
locations = listOf(GraphQLResponseError.Location(line = 1, column = 10)),
path = listOf(GraphQLPathSegment.Field("viewer")),
)Content copied to clipboard
See also
Constructors
Link copied to clipboard
constructor(message: String, locations: List<GraphQLResponseError.Location>? = null, path: List<GraphQLPathSegment>? = null, extensions: GraphQLValue.ObjectValue? = null)