Emi
01/26/2018, 1:42 PMNetwork error: Response not successful: Received status code 400
and can't figure out how to get the error from the response.nilan
01/26/2018, 1:50 PMdebug: true
is a good first step: https://github.com/graphql-boilerplates/node-graphql-server/blob/master/advanced/src/index.jsEmi
01/26/2018, 1:57 PMtry {
const { sectionId, createPost } = this.props;
const res = await createPost({
variables: {
sectionId
}
});
} catch (e) {
console.log(e); // it logs "Response not successful: Received status code 400" instead of the error response {error: "some error from the server"}
}
nilan
01/26/2018, 2:03 PM