Add thiserror instead of exposing eyre anonymous errors

The change here is to make it easier for the consumer to debug the api.
Such that they can `match` on individual errors instead of having to
parse text.

eyre is convenient, but mostly from a consumers perspective
This commit is contained in:
2023-04-30 12:57:50 +02:00
committed by Kasper Juul Hermansen
parent 66ab2f552c
commit 3a9abb97c2
12 changed files with 157 additions and 71 deletions

View File

@@ -15,7 +15,7 @@ pub struct GraphQLError {
#[derive(Deserialize, Debug, Clone)]
#[allow(dead_code)]
pub struct GraphQLErrorMessage {
message: String,
pub message: String,
locations: Option<Vec<GraphQLErrorLocation>>,
extensions: Option<HashMap<String, String>>,
path: Option<Vec<GraphQLErrorPathParam>>,