I am new to Neo4J GraphQL. I have got the below request which works for me but if there is any mistake with input, I can see an error in the network tab under response. I am using Apollo-client. How can I access the error in the response and print it on the console? Appreciate your response.
client_id="7b8c903a-3402";
text= "Some Text";
const preppedQuery = gql`
mutation CreateMaps(
$client_id: String!
$text: String!
) {
createMaps(
input: [{ client_id: $client_id, text: $text }]
) {
info {
nodesCreated
relationshipsCreated
}
maps {
uid
}
}
}
`;
const gqlMutation = {
mutation: gql`
${preppedQuery}
`,
variables: {
client_id,
text,
},
};
const res = await client.mutate(gqlMutation);