api: Fixed client hiding graphql errors

This commit is contained in:
2018-09-19 18:54:10 +02:00
parent 9af816d8f2
commit 6591ad0245
-7
View File
@@ -20,13 +20,6 @@ function query(query, variables = {}, options = {}) {
body: JSON.stringify({query: query.length > 256 ? compressQuery(query || "") : query, variables, operationName: options.operationName}),
credentials: "include",
}).then(res => {
if (!res.ok) {
return Promise.reject([{
message: `HTTP: ${res.statusText}`,
location: null,
}])
}
return res.json()
}).then(json => {
if (json.errors != null && json.errors.length > 0) {