Error

constructor(    message: String,     locations: List<Error.Location>?,     path: List<Any>?,     extensions: Map<String, Any?>?,     nonStandardFields: Map<String, Any?>?)

Deprecated (with error)

Use Error.Builder instead

Replace with

Error.Builder(message = message).locations(locations).path(path).extensions(extensions).build()