GraphQL without error handling

According to docs:
https://docs.webix.com/desktop__server_graphql.html#serversideresponse

… If the request fails or something goes wrong … we get " errors" field:

{
    "data":{"updatePackage":null},
    "errors":[{"message":"record not found","path":["updatePackage"]}]
}

But how to catch errors after load ?

Look at source code: https://github.com/webix-hub/webix/blob/master/sources/load/proxy/graphql.js

const GraphQL = {
	$proxy:true,
	save:function(data){
		return this.load(data);
	},
	load:function(view){
		var params = {
			query: this.source
		};
		if (arguments.length === 1){
			params.variables = view;
		}

		return ajax()
			.headers({ "Content-type": "application/json" })
			.post(this.url, params)
			.then(function(data){
				return unbox(data.json().data);
			});
	}
};

there is only data field to return .

Maybe should it be:

return ajax()
			.headers({ "Content-type": "application/json" })
			.post(this.url, params)
			.then(function(data){
				const res = data.json();
				if (res.errors) throw new Error(res.errors);
				return unbox(res.data);
			});

Anyway it’s very important to solve this.

Hello,

Yes, unfortunately, there is currently no real way of handling errors via the built-in proxy (unless you create a custom proxy based on it and provide that kind of logic yourself). We are aware of this issue and are planning on releasing a fix in the foreseeable future.

Regarding your suggestion, yes, a custom proxy object with the modification you proposed should look something like this: Code Snippet.